已关闭
[Bug]: B库alter table产生core #8430
ywzq1161327784创建于  8月26日关闭于  24 天前
ywzq1161327784
ywzq1161327784成员
8月26日 创建

测试类型

SQL功能

测试版本

7.0.0LTS

问题描述

B库alter table产生core

操作系统和硬件信息

不限

测试环境

企业版单机

被测功能

B库alter table

预置条件

无

操作步骤

drop table if exists t1 cascade;
create table t1(f1 int, f2 varchar(20), f3 int, primary key(f1, f3));
insert into t1 values(1, 'a', 1), (2, 'b', 2);
\d+ t1
select * from t1;

alter table t1 modify f1 text after f3, add f10 int default 10 after f2;
\d+ t1
select * from t1;

预期输出

执行成功

实际输出

执行core
image.png

core堆栈

(gdb) bt
#0  0x0000aaae27e07d64 in heap_form_tuple_impl (isnull=0xfffbfccb60c8,
    values=0xfffbfccb6060, tupleDescriptor=0xfffbfcac8438)
    at /usr1/douxin/openGauss-server/src/gausskernel/storage/access/common/heaptuple.cpp:844
#1  heap_form_tuple (tupleDescriptor=0xfffbfcac8438,
    values=0xfffbfccb6060, isnull=0xfffbfccb60c8)
    at /usr1/douxin/openGauss-server/src/gausskernel/storage/access/common/heaptuple.cpp:916
#2  0x0000fffbf99eb304 in ATRewriteTableInternal (tab=0xfffbfd7ff200,
    oldrel=0xfffbfca7f468, newrel=0xfffbfcac9168)
    at /usr1/douxin/openGauss-server/contrib/dolphin/tablecmds.cpp:11686
#3  0x0000fffbf99ebd98 in ATRewriteTable (tab=0xfffbfd7ff200,
    oldrel=0xfffbfca7f468, newrel=0xfffbfcac9168)
    at /usr1/douxin/openGauss-server/contrib/dolphin/tablecmds.cpp:11839
#4  0x0000fffbf9a403d0 in ExecRewriteRowTable (tab=0xfffbfd7ff200,
    NewTableSpace=0, lockmode=8)
    at /usr1/douxin/openGauss-server/contrib/dolphin/tablecmds.cpp:34796
#5  0x0000fffbf99e7d3c in ATRewriteTables (parsetree=0xfffbfcbd4778,
    wqueue=0xfffbfc7da278, lockmode=8)
    at /usr1/douxin/openGauss-server/contrib/dolphin/tablecmds.cpp:10798
#6  0x0000fffbf99e31d8 in ATController (parsetree=0xfffbfcbd4778,
    rel=0xfffbfca7f468, cmds=0xfffbfd7ff850, recurse=true, lockmode=8,
    fromReplace=false)
    at /usr1/douxin/openGauss-server/contrib/dolphin/tablecmds.cpp:9042
#7  0x0000fffbf99e2364 in AlterTable (relid=23293, lockmode=8,
    stmt=0xfffbfcbd4778)
    at /usr1/douxin/openGauss-server/contrib/dolphin/tablecmds.cpp:8630
#8  0x0000fffbf99b35c0 in ProcessUtilitySlow (parse_tree=0xfffbfcbd4778,
    query_string=0xfffbfd604060 "alter table t1 modify f1 text after f3, ad--Type <RET> for more, q to quit, c to continue without paging--
d f10 int default 10 after f2;", params=0x0, dest=0xfffbfcbd4890,
    sent_to_remote=false, completion_tag=0xfffbfc7de878 "",
    context=PROCESS_UTILITY_TOPLEVEL, isCTAS=false)
    at /usr1/douxin/openGauss-server/contrib/dolphin/plugin_utility.cpp:5427
#9  0x0000fffbf99b30e0 in standard_ProcessUtility (
    processutility_cxt=0xfffbfc7de368, dest=0xfffbfcbd4890,
    sent_to_remote=false, completion_tag=0xfffbfc7de878 "",
    context=PROCESS_UTILITY_TOPLEVEL, isCTAS=false)
    at /usr1/douxin/openGauss-server/contrib/dolphin/plugin_utility.cpp:5179
#10 0x0000aaae27a30eac in standard_ProcessUtility (
    processutility_cxt=0xfffbfc7de368, dest=0xfffbfcbd4890,
    sent_to_remote=false, completion_tag=0xfffbfc7de878 "",
    context=PROCESS_UTILITY_TOPLEVEL, isCTAS=false)
    at /usr1/douxin/openGauss-server/src/gausskernel/process/tcop/utility.cpp:2611
#11 0x0000fffd32779e10 in gsaudit_ProcessUtility_hook (
    processutility_cxt=0xfffbfc7de368, dest=0xfffbfcbd4890,
    sentToRemote=false, completionTag=0xfffbfc7de878 "",
    context=PROCESS_UTILITY_TOPLEVEL, isCTAS=false)
    at /usr1/douxin/openGauss-server/contrib/security_plugin/gs_policy_plugin.cpp:819
#12 0x0000aaae279f19ec in pgaudit_ProcessUtility (
    processutility_cxt=0xfffbfc7de368, dest=0xfffbfcbd4890,
    sentToRemote=false, completionTag=0xfffbfc7de878 "",
    context=PROCESS_UTILITY_TOPLEVEL, isCTAS=false)
    at /usr1/douxin/openGauss-server/src/gausskernel/process/tcop/auditfuncs.cpp:1474
--Type <RET> for more, q to quit, c to continue without paging--
#13 0x0000aaae2729a290 in instr_trace_ProcessUtility (
    processutility_cxt=0xfffbfc7de368, dest=0xfffbfcbd4890,
    sent_to_remote=false, completion_tag=0xfffbfc7de878 "",
    context=PROCESS_UTILITY_TOPLEVEL, isCTAS=false)
    at /usr1/douxin/openGauss-server/src/gausskernel/cbb/instruments/trace/instr_trace.cpp:934
#14 0x0000aaae27aa98c4 in hypo_utility_hook (
    processutility_cxt=0xfffbfc7de368, dest=0xfffbfcbd4890,
    sentToRemote=false, completionTag=0xfffbfc7de878 "",
    context=PROCESS_UTILITY_TOPLEVEL, isCtas=false)
    at /usr1/douxin/openGauss-server/src/gausskernel/dbmind/kernel/hypopg_index.cpp:166
#15 0x0000aaae27a2f7c0 in ProcessUtility (
    processutility_cxt=0xfffbfc7de368, dest=0xfffbfcbd4890,
    sent_to_remote=false, completion_tag=0xfffbfc7de878 "",
    context=PROCESS_UTILITY_TOPLEVEL, isCTAS=false)
    at /usr1/douxin/openGauss-server/src/gausskernel/process/tcop/utility.cpp:1600
#16 0x0000aaae27a270e4 in PortalRunUtility (portal=0xfffbfd950060,
    utilityStmt=0xfffbfcbd4778, isTopLevel=true, dest=0xfffbfcbd4890,
    completionTag=0xfffbfc7de878 "")
    at /usr1/douxin/openGauss-server/src/gausskernel/process/tcop/pquery.cpp:1790
#17 0x0000aaae27a275b4 in PortalRunMulti (portal=0xfffbfd950060,
    isTopLevel=true, dest=0xfffbfcbd4890, altdest=0xfffbfcbd4890,
    completionTag=0xfffbfc7de878 "")
    at /usr1/douxin/openGauss-server/src/gausskernel/process/tcop/pquery.cpp:1966
#18 0x0000aaae27a25604 in PortalRun (portal=0xfffbfd950060,
--Type <RET> for more, q to quit, c to continue without paging--
    count=9223372036854775807, isTopLevel=true, dest=0xfffbfcbd4890,
    altdest=0xfffbfcbd4890, completionTag=0xfffbfc7de878 "")
    at /usr1/douxin/openGauss-server/src/gausskernel/process/tcop/pquery.cpp:1229
#19 0x0000aaae27a03cf8 in exec_simple_query (
    query_string=0xfffbfd604060 "alter table t1 modify f1 text after f3, add f10 int default 10 after f2;", messageType=QUERY_MESSAGE,
    msg=0xfffbfc7de9f8)
    at /usr1/douxin/openGauss-server/src/gausskernel/process/tcop/postgres.cpp:3377
#20 0x0000aaae27a15370 in ProcessCommandUpperQ (
    input_message=0xfffbfc7de9f8,
    send_ready_for_query=@0xfffbfc7de968: false,
    query_started=@0xfffbfc7de969: true)
    at /usr1/douxin/openGauss-server/src/gausskernel/process/tcop/postgres.cpp:10097
#21 0x0000aaae27a14954 in PostgresMain (argc=1, argv=0xfffbfd15bca0,
    dbname=0xfffbfd15aa88 "testb", username=0xfffbfd15aa40 "douxin")
    at /usr1/douxin/openGauss-server/src/gausskernel/process/tcop/postgres.cpp:9859
#22 0x0000aaae2799c0e8 in BackendRun (port=0xfffbfc7def18)
    at /usr1/douxin/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:10320
#23 0x0000aaae279b1bfc in GaussDbThreadMain<(knl_thread_role)1> (
    arg=0xfffd229c6830)
    at /usr1/douxin/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:15180
#24 0x0000aaae279ac008 in InternalThreadFunc (args=0xfffd229c6830)
    at /usr1/douxin/openGauss-server/src/gausskernel/process/postmaster/pos--Type <RET> for more, q to quit, c to continue without paging--
tmaster.cpp:15912
#25 0x0000aaae288976c4 in ThreadStarterFunc (arg=0xfffd229c6820)
    at /usr1/douxin/openGauss-server/src/common/port/port_srv/gs_thread.cpp:383
#26 0x0000fffd32b6878c in start_thread (arg=0xfffd327cff40)
    at pthread_create.c:486
#27 0x0000fffd32ab51bc in thread_start ()
    at ../sysdeps/unix/sysv/linux/aarch64/clone.S:80

日志信息

详见实际输出

提单组织

内部开发

测试代码

likedislike
ywzq1161327784ywzq1161327784成员
8月26日 添加了label:bug
opengauss_bot
opengauss_bot成员
8月26日 评论:

This issue requires an assignee. Since you haven't specified one, we've assigned TestManager as the default assignee for this issue.

likedislike
opengauss_botopengauss_bot成员
8月26日 将 TestManager 设为负责人
opengauss_botopengauss_bot成员
8月26日 添加了label:sig/Community
opengauss_bot
opengauss_bot成员
8月26日 评论:

Welcome To openGauss Community

Hey @ywzq1161327784 , thanks for your contribution to the community.

Bot Usage Manual

I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands. You can self-configure the PR merge rules for this repository. For more details, please refer to Here.

Contact Guide

If you have any questions, please contact the SIG: Community ,
and any of the maintainers: @CarrotGo, @chendong76, @chenxiaobin19, @congzhou2603, @dodders, @hwworkholic, @jemappellehc, @muyulinzhong, @quemingjian, @shenzheng4, @shirley_zhengx, @superlchf, @totaj, @wlff234, @wofanzheng, @ywzq1161327784 ,
and any of the committers: @Igali, @bihua111, @cailei19, @h_ray, @levy53071, @libiao2024, @lihaixiao, @mrzack, @wangfeihuo, @wuyuechuan, @xiong_xjun, @zhangfengzhi123, @zhangxubo, @zhangzq131, @zjh_hw .

likedislike
ywzq1161327784ywzq1161327784成员
8月26日 修改了issue 的描述
ywzq1161327784ywzq1161327784成员
8月26日 修改了issue 的描述
ywzq1161327784ywzq1161327784成员
8月26日 移除了负责人 TestManager
opengauss_bot
opengauss_bot成员
8月26日 评论:

This issue requires an assignee. Since you haven't specified one, we've assigned TestManager as the default assignee for this issue.

likedislike
opengauss_botopengauss_bot成员
8月26日 将 TestManager 设为负责人
此处折叠了6条事件消息 查看更多
ywzq1161327784ywzq1161327784成员
9月3日 issue状态由 待办的 改变为 已完成
liyangx成员
9月9日 评论:

20260909转测包自验:
QQ_1788947212279.png

likedislike
Lliyangx成员
9月9日 issue状态由 已完成 改变为 待回归
yangl_
yangl_成员
24 天前 评论:

回归时间:2026.09.15
回归结论:通过
回归过程:
image.png
image.png

likedislike
yangl_yangl_成员
24 天前 issue状态由 待回归 改变为 已验收
yangl_yangl_成员
24 天前 关闭了 issue