登录
注册
开源
企业版
高校版
搜索
帮助中心
使用条款
关于我们
开源
企业版
高校版
私有云
模力方舟
AI 队友
登录
注册
轻量养虾,开箱即用!低 Token + 稳定算力,Gitee & 模力方舟联合出品的 PocketClaw 正式开售!点击了解详情~
代码拉取完成,页面将自动刷新
开源项目
>
数据库相关
>
数据库服务
&&
捐赠
捐赠前请先登录
取消
前往登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
Watch
不关注
关注所有动态
仅关注版本发行动态
关注但不提醒动态
443
Star
1.5K
Fork
1.8K
openGauss
/
openGauss-server
代码
Issues
982
Pull Requests
153
Wiki
统计
流水线
服务
质量分析
Jenkins for Gitee
腾讯云托管
腾讯云 Serverless
悬镜安全
阿里云 SAE
Codeblitz
SBOM
开发画像分析
我知道了,不再自动展开
更新失败,请稍后重试!
移除标识
内容风险标识
本任务被
标识为内容中包含有代码安全 Bug 、隐私泄露等敏感信息,仓库外成员不可访问
分区表 drop index concurrently 和 reindex partition 同时执行,在 debug 版本有概率触发 Assert
已验收
#IAOKGK
缺陷
sungwu
创建于
2024-09-03 18:31
【标题描述】: 【测试类型:SQL功能/并发】【测试版本:5.0.0】 问题描述: 分区表同时执行表上索引的 concurrently drop 和 reindex index partition 并发执行,有概率触发 Assert 【操作系统和硬件信息】(查询命令: cat /etc/system-release, uname -a): 【测试环境】(单机/1主x备x级联备): 单机/主备 【被测功能】: drop index concurrently 和 reindex index partition 【测试类型】: 功能测试/并发测试 【数据库版本】(查询命令: gaussdb -V): gsql ((openGauss 5.0.2 build 4dec4e00) compiled at 2024-09-03 【预置条件】: 启动单节点或集群,创建测试表和测试索引 【操作步骤】(请填写详细的操作步骤): 1. 建表,插入数据,创建索引 2. 启动两个会话,其中一个执行 drop index concurrently ,另一个执行 reindex index partition 3. 有概率触发 drop index 中的 Assert 4. 如果复现概率不高,可以通过在代码中增加 sleep 操作提高问题触发概率 【预期输出】: 预期执行成功或者报错,但进程还在 【实际输出】: 触发 coredump 【原因分析】: 1. drop index concurrently 对表和索引加锁级别为 2. 问题推断过程 3. 还有哪些原因可能造成类似现象 4. 该问题是否有临时规避措施 5. 问题解决方案 6. 预计修复问题时间 【日志信息】(请附上日志文件、截图、coredump信息): #0 BBOX_CreateCoredump (file_name=0x7fe3a37c4030 "/data/core//core-gaussdb-15634-2024_09_03_18_28_28-bbox.lz4") at bbox_create.cpp:404 #1 0x00000000014cf9ff in bbox_handler (sig=6, si=0x7fe3a37c46b0, uc=0x7fe3a37c4580) at gs_bbox.cpp:112 #2 <signal handler called> #3 0x00007fe4e26ca387 in raise () from /lib64/libc.so.6 #4 0x00007fe4e26cba78 in abort () from /lib64/libc.so.6 #5 0x00000000011b5c2c in ExceptionalCondition (conditionName=0x415d7ee "!(!indexForm->indisvalid)", errorType=0x415b1d7 "FailedAssertion", fileName=0x415c098 "index.cpp", lineNumber=5119) at assert.cpp:46 #6 0x0000000000b6c4a3 in index_set_state_flags (indexId=16418, action=INDEX_DROP_SET_DEAD) at index.cpp:5119 #7 0x0000000000b6443c in index_concurrently_set_dead (heapId=16384, indexId=16418) at index.cpp:1904 #8 0x0000000000b6537f in index_drop (indexId=16418, concurrent=true, concurrent_lock_mode=false) at index.cpp:2490 #9 0x0000000000b3f1e6 in doDeletion (object=0x7fe3a5fd75d8, flags=2) at dependency.cpp:1248 #10 0x0000000000b3ed91 in deleteOneObject (object=0x7fe3a5fd75d8, depRel=0x7fe3a37c58a0, flags=2) at dependency.cpp:1145 #11 0x0000000000b3cdaf in deleteObjectsInList (targetObjects=0x7fe3a7ffcfc0, depRel=0x7fe3a37c58a0, flags=2) at dependency.cpp:234 #12 0x0000000000b3d539 in performMultipleDeletions (objects=0x7fe3a7ffcd30, behavior=DROP_RESTRICT, flags=2, isPkgDropTypes=false) at dependency.cpp:489 #13 0x0000000001776d95 in RemoveRelations (drop=0x7fe3a7ced5d0, tmp_queryString=0x7fe3a7ffcc60, exec_type=0x7fe3a37c59e4) at tablecmds.cpp:3775 #14 0x00000000019d97d6 in ExecDropStmt (parse_tree=0x7fe3a7ced5d0, query_string=0x7fe3a7cec060 "drop index concurrently btreeidx_01;", sent_to_remote=false, is_top_level=true) at utility.cpp:7066 #15 0x00000000019d876d in ProcessUtilitySlow (parse_tree=0x7fe3a7ced5d0, query_string=0x7fe3a7cec060 "drop index concurrently btreeidx_01;", params=0x0, dest=0x7fe3a7ced6e8, sent_to_remote=false, completion_tag=0x7fe3a37c8b10 "", context=PROCESS_UT #16 0x00000000019d416a in standard_ProcessUtility (processutility_cxt=0x7fe3a37c8700, dest=0x7fe3a7ced6e8, sent_to_remote=false, completion_tag=0x7fe3a37c8b10 "", context=PROCESS_UTILITY_TOPLEVEL, isCTAS=false) at utility.cpp:3019 #17 0x00007fe4d7159901 in gsaudit_ProcessUtility_hook (processutility_cxt=0x7fe3a37c8700, dest=0x7fe3a7ced6e8, sentToRemote=false, completionTag=0x7fe3a37c8b10 "", context=PROCESS_UTILITY_TOPLEVEL, isCTAS=false) at gs_policy_plugin.cpp:819 ---Type <return> to continue, or q <return> to quit--- #18 0x00000000019e89b5 in pgaudit_ProcessUtility (processutility_cxt=0x7fe3a37c8700, dest=0x7fe3a7ced6e8, sentToRemote=false, completionTag=0x7fe3a37c8b10 "", context=PROCESS_UTILITY_TOPLEVEL, isCTAS=false) at auditfuncs.cpp:1419 #19 0x0000000001a3fbba in hypo_utility_hook (processutility_cxt=0x7fe3a37c8700, dest=0x7fe3a7ced6e8, sentToRemote=false, completionTag=0x7fe3a37c8b10 "", context=PROCESS_UTILITY_TOPLEVEL, isCtas=false) at hypopg_index.cpp:167 #20 0x00000000019d1af8 in ProcessUtility (processutility_cxt=0x7fe3a37c8700, dest=0x7fe3a7ced6e8, sent_to_remote=false, completion_tag=0x7fe3a37c8b10 "", context=PROCESS_UTILITY_TOPLEVEL, isCTAS=false) at utility.cpp:1563 #21 0x00000000019cc9da in PortalRunUtility (portal=0x7fe3a66e2060, utilityStmt=0x7fe3a7ced5d0, isTopLevel=true, dest=0x7fe3a7ced6e8, completionTag=0x7fe3a37c8b10 "") at pquery.cpp:1723 #22 0x00000000019ccf33 in PortalRunMulti (portal=0x7fe3a66e2060, isTopLevel=true, dest=0x7fe3a7ced6e8, altdest=0x7fe3a7ced6e8, completionTag=0x7fe3a37c8b10 "") at pquery.cpp:1901 #23 0x00000000019cb3cf in PortalRun (portal=0x7fe3a66e2060, count=9223372036854775807, isTopLevel=true, dest=0x7fe3a7ced6e8, altdest=0x7fe3a7ced6e8, completionTag=0x7fe3a37c8b10 "") at pquery.cpp:1181 #24 0x00000000019b2132 in exec_simple_query (query_string=0x7fe3a7cec060 "drop index concurrently btreeidx_01;", messageType=QUERY_MESSAGE, msg=0x7fe3a37c8d20) at postgres.cpp:2970 #25 0x00000000019bf93a in PostgresMain (argc=1, argv=0x7fe3a7407268, dbname=0x7fe3a74062a0 "postgres", username=0x7fe3a7406258 "wusong") at postgres.cpp:9074 #26 0x00000000019000aa in BackendRun (port=0x7fe3a37c9210) at postmaster.cpp:9249 #27 0x0000000001910fbf in GaussDbThreadMain<(knl_thread_role)1> (arg=0x7fe402886fa0) at postmaster.cpp:13686 #28 0x000000000190c88c in InternalThreadFunc (args=0x7fe402886fa0) at postmaster.cpp:14307 #29 0x00000000024e2ff9 in ThreadStarterFunc (arg=0x7fe402886f90) at gs_thread.cpp:382 #30 0x00007fe4e2a69ea5 in start_thread () from /lib64/libpthread.so.0 #31 0x00007fe4e2792b0d in clone () from /lib64/libc.so.6 【测试代码】: create table btreeindex_t1(c1 int,c2 int,c3 int,c4 text,c5 text,c6 text,c7 int) partition by range(c1) subpartition by list(c7) ( partition btreeindex_t1_p1 values less than (20001) ( subpartition btreeindex_t1_p1_1 values (1), subpartition btreeindex_t1_p1_2 values (2) ), partition btreeindex_t1_p2 values less than (40000) ( subpartition btreeindex_t1_p2_1 values (3), subpartition btreeindex_t1_p2_2 values (4) ) ); insert into btreeindex_t1 select a,a,a,a || 'MOG',a || 'DB',a || 'YYY',1 from generate_series(1,10000) as a; insert into btreeindex_t1 select a,a,a,a || 'MOG',a || 'DB',a || 'YYY',2 from generate_series(10001,20000) as a; insert into btreeindex_t1 select a,a,a,a || 'MOG',a || 'DB',a || 'YYY',3 from generate_series(20001,30000) as a; insert into btreeindex_t1 select a,a,a,a || 'MOG',a || 'DB',a || 'YYY',4 from generate_series(30001,38000) as a; create index btreeidx_01 on btreeindex_t1 using btree(c1,c2,c3,c4,c5,c6,c7) local; -- 2. 一个会话执行 drop index concurrently drop index concurrently btreeidx_01; -- 3. 另一个会话执行 reindex index btreeidx_01 partition btreeindex_t1_p1_1_c1_c2_c3_c4_c5_c6_c7_idx;
【标题描述】: 【测试类型:SQL功能/并发】【测试版本:5.0.0】 问题描述: 分区表同时执行表上索引的 concurrently drop 和 reindex index partition 并发执行,有概率触发 Assert 【操作系统和硬件信息】(查询命令: cat /etc/system-release, uname -a): 【测试环境】(单机/1主x备x级联备): 单机/主备 【被测功能】: drop index concurrently 和 reindex index partition 【测试类型】: 功能测试/并发测试 【数据库版本】(查询命令: gaussdb -V): gsql ((openGauss 5.0.2 build 4dec4e00) compiled at 2024-09-03 【预置条件】: 启动单节点或集群,创建测试表和测试索引 【操作步骤】(请填写详细的操作步骤): 1. 建表,插入数据,创建索引 2. 启动两个会话,其中一个执行 drop index concurrently ,另一个执行 reindex index partition 3. 有概率触发 drop index 中的 Assert 4. 如果复现概率不高,可以通过在代码中增加 sleep 操作提高问题触发概率 【预期输出】: 预期执行成功或者报错,但进程还在 【实际输出】: 触发 coredump 【原因分析】: 1. drop index concurrently 对表和索引加锁级别为 2. 问题推断过程 3. 还有哪些原因可能造成类似现象 4. 该问题是否有临时规避措施 5. 问题解决方案 6. 预计修复问题时间 【日志信息】(请附上日志文件、截图、coredump信息): #0 BBOX_CreateCoredump (file_name=0x7fe3a37c4030 "/data/core//core-gaussdb-15634-2024_09_03_18_28_28-bbox.lz4") at bbox_create.cpp:404 #1 0x00000000014cf9ff in bbox_handler (sig=6, si=0x7fe3a37c46b0, uc=0x7fe3a37c4580) at gs_bbox.cpp:112 #2 <signal handler called> #3 0x00007fe4e26ca387 in raise () from /lib64/libc.so.6 #4 0x00007fe4e26cba78 in abort () from /lib64/libc.so.6 #5 0x00000000011b5c2c in ExceptionalCondition (conditionName=0x415d7ee "!(!indexForm->indisvalid)", errorType=0x415b1d7 "FailedAssertion", fileName=0x415c098 "index.cpp", lineNumber=5119) at assert.cpp:46 #6 0x0000000000b6c4a3 in index_set_state_flags (indexId=16418, action=INDEX_DROP_SET_DEAD) at index.cpp:5119 #7 0x0000000000b6443c in index_concurrently_set_dead (heapId=16384, indexId=16418) at index.cpp:1904 #8 0x0000000000b6537f in index_drop (indexId=16418, concurrent=true, concurrent_lock_mode=false) at index.cpp:2490 #9 0x0000000000b3f1e6 in doDeletion (object=0x7fe3a5fd75d8, flags=2) at dependency.cpp:1248 #10 0x0000000000b3ed91 in deleteOneObject (object=0x7fe3a5fd75d8, depRel=0x7fe3a37c58a0, flags=2) at dependency.cpp:1145 #11 0x0000000000b3cdaf in deleteObjectsInList (targetObjects=0x7fe3a7ffcfc0, depRel=0x7fe3a37c58a0, flags=2) at dependency.cpp:234 #12 0x0000000000b3d539 in performMultipleDeletions (objects=0x7fe3a7ffcd30, behavior=DROP_RESTRICT, flags=2, isPkgDropTypes=false) at dependency.cpp:489 #13 0x0000000001776d95 in RemoveRelations (drop=0x7fe3a7ced5d0, tmp_queryString=0x7fe3a7ffcc60, exec_type=0x7fe3a37c59e4) at tablecmds.cpp:3775 #14 0x00000000019d97d6 in ExecDropStmt (parse_tree=0x7fe3a7ced5d0, query_string=0x7fe3a7cec060 "drop index concurrently btreeidx_01;", sent_to_remote=false, is_top_level=true) at utility.cpp:7066 #15 0x00000000019d876d in ProcessUtilitySlow (parse_tree=0x7fe3a7ced5d0, query_string=0x7fe3a7cec060 "drop index concurrently btreeidx_01;", params=0x0, dest=0x7fe3a7ced6e8, sent_to_remote=false, completion_tag=0x7fe3a37c8b10 "", context=PROCESS_UT #16 0x00000000019d416a in standard_ProcessUtility (processutility_cxt=0x7fe3a37c8700, dest=0x7fe3a7ced6e8, sent_to_remote=false, completion_tag=0x7fe3a37c8b10 "", context=PROCESS_UTILITY_TOPLEVEL, isCTAS=false) at utility.cpp:3019 #17 0x00007fe4d7159901 in gsaudit_ProcessUtility_hook (processutility_cxt=0x7fe3a37c8700, dest=0x7fe3a7ced6e8, sentToRemote=false, completionTag=0x7fe3a37c8b10 "", context=PROCESS_UTILITY_TOPLEVEL, isCTAS=false) at gs_policy_plugin.cpp:819 ---Type <return> to continue, or q <return> to quit--- #18 0x00000000019e89b5 in pgaudit_ProcessUtility (processutility_cxt=0x7fe3a37c8700, dest=0x7fe3a7ced6e8, sentToRemote=false, completionTag=0x7fe3a37c8b10 "", context=PROCESS_UTILITY_TOPLEVEL, isCTAS=false) at auditfuncs.cpp:1419 #19 0x0000000001a3fbba in hypo_utility_hook (processutility_cxt=0x7fe3a37c8700, dest=0x7fe3a7ced6e8, sentToRemote=false, completionTag=0x7fe3a37c8b10 "", context=PROCESS_UTILITY_TOPLEVEL, isCtas=false) at hypopg_index.cpp:167 #20 0x00000000019d1af8 in ProcessUtility (processutility_cxt=0x7fe3a37c8700, dest=0x7fe3a7ced6e8, sent_to_remote=false, completion_tag=0x7fe3a37c8b10 "", context=PROCESS_UTILITY_TOPLEVEL, isCTAS=false) at utility.cpp:1563 #21 0x00000000019cc9da in PortalRunUtility (portal=0x7fe3a66e2060, utilityStmt=0x7fe3a7ced5d0, isTopLevel=true, dest=0x7fe3a7ced6e8, completionTag=0x7fe3a37c8b10 "") at pquery.cpp:1723 #22 0x00000000019ccf33 in PortalRunMulti (portal=0x7fe3a66e2060, isTopLevel=true, dest=0x7fe3a7ced6e8, altdest=0x7fe3a7ced6e8, completionTag=0x7fe3a37c8b10 "") at pquery.cpp:1901 #23 0x00000000019cb3cf in PortalRun (portal=0x7fe3a66e2060, count=9223372036854775807, isTopLevel=true, dest=0x7fe3a7ced6e8, altdest=0x7fe3a7ced6e8, completionTag=0x7fe3a37c8b10 "") at pquery.cpp:1181 #24 0x00000000019b2132 in exec_simple_query (query_string=0x7fe3a7cec060 "drop index concurrently btreeidx_01;", messageType=QUERY_MESSAGE, msg=0x7fe3a37c8d20) at postgres.cpp:2970 #25 0x00000000019bf93a in PostgresMain (argc=1, argv=0x7fe3a7407268, dbname=0x7fe3a74062a0 "postgres", username=0x7fe3a7406258 "wusong") at postgres.cpp:9074 #26 0x00000000019000aa in BackendRun (port=0x7fe3a37c9210) at postmaster.cpp:9249 #27 0x0000000001910fbf in GaussDbThreadMain<(knl_thread_role)1> (arg=0x7fe402886fa0) at postmaster.cpp:13686 #28 0x000000000190c88c in InternalThreadFunc (args=0x7fe402886fa0) at postmaster.cpp:14307 #29 0x00000000024e2ff9 in ThreadStarterFunc (arg=0x7fe402886f90) at gs_thread.cpp:382 #30 0x00007fe4e2a69ea5 in start_thread () from /lib64/libpthread.so.0 #31 0x00007fe4e2792b0d in clone () from /lib64/libc.so.6 【测试代码】: create table btreeindex_t1(c1 int,c2 int,c3 int,c4 text,c5 text,c6 text,c7 int) partition by range(c1) subpartition by list(c7) ( partition btreeindex_t1_p1 values less than (20001) ( subpartition btreeindex_t1_p1_1 values (1), subpartition btreeindex_t1_p1_2 values (2) ), partition btreeindex_t1_p2 values less than (40000) ( subpartition btreeindex_t1_p2_1 values (3), subpartition btreeindex_t1_p2_2 values (4) ) ); insert into btreeindex_t1 select a,a,a,a || 'MOG',a || 'DB',a || 'YYY',1 from generate_series(1,10000) as a; insert into btreeindex_t1 select a,a,a,a || 'MOG',a || 'DB',a || 'YYY',2 from generate_series(10001,20000) as a; insert into btreeindex_t1 select a,a,a,a || 'MOG',a || 'DB',a || 'YYY',3 from generate_series(20001,30000) as a; insert into btreeindex_t1 select a,a,a,a || 'MOG',a || 'DB',a || 'YYY',4 from generate_series(30001,38000) as a; create index btreeidx_01 on btreeindex_t1 using btree(c1,c2,c3,c4,c5,c6,c7) local; -- 2. 一个会话执行 drop index concurrently drop index concurrently btreeidx_01; -- 3. 另一个会话执行 reindex index btreeidx_01 partition btreeindex_t1_p1_1_c1_c2_c3_c4_c5_c6_c7_idx;
评论 (
7
)
登录
后才可以发表评论
状态
已验收
待办的
已确认
已答复
已取消
挂起
修复中
已完成
待回归
测试中
已验收
负责人
未设置
laishenghao
dodders
负责人
协作者
+负责人
+协作者
刘伟
llzx373
负责人
协作者
+负责人
+协作者
douxin
ywzq1161327784
负责人
协作者
+负责人
+协作者
sungwu
sungwu_admin
负责人
协作者
+负责人
+协作者
标签
未设置
项目
未立项任务
未立项任务
里程碑
未关联里程碑
未关联里程碑
Pull Requests
未关联
未关联
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
未关联
分支 (
-
)
标签 (
-
)
开始日期   -   截止日期
-
置顶选项
不置顶
置顶等级:高
置顶等级:中
置顶等级:低
优先级
不指定
严重
主要
次要
不重要
预计工期
(小时)
参与者(7)
C++
1
https://gitee.com/opengauss/openGauss-server.git
git@gitee.com:opengauss/openGauss-server.git
opengauss
openGauss-server
openGauss-server
点此查找更多帮助
搜索帮助
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册