登录
注册
开源
企业版
高校版
搜索
帮助中心
使用条款
关于我们
开源
企业版
高校版
私有云
模力方舟
AI 队友
登录
注册
代码拉取完成,页面将自动刷新
开源项目
>
数据库相关
>
数据库服务
&&
捐赠
捐赠前请先登录
取消
前往登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
Watch
不关注
关注所有动态
仅关注版本发行动态
关注但不提醒动态
443
Star
1.5K
Fork
1.8K
openGauss
/
openGauss-server
代码
Issues
973
Pull Requests
166
Wiki
统计
流水线
服务
质量分析
Jenkins for Gitee
腾讯云托管
腾讯云 Serverless
悬镜安全
阿里云 SAE
Codeblitz
SBOM
我知道了,不再自动展开
更新失败,请稍后重试!
移除标识
内容风险标识
本任务被
标识为内容中包含有代码安全 Bug 、隐私泄露等敏感信息,仓库外成员不可访问
跨事务游标FETCH数据导致宕机
已验收
#IBETOE
缺陷
april01xxx
创建于
2024-12-31 10:56
<!-- #请认真填写以下信息,否则可能由于无法定位,导致issue无法解决而被取消 --> 【标题描述】:开启线程池和GlobalSysCache的情况下,跨事务游标FETCH数据宕机 【测试类型:SQL功能/存储功能/接口功能/工具功能/性能/并发/压力长稳/故障注入/安全/资料/编码规范】SQL功能 【测试版本:x.x.x】 6.0.0 【操作系统和硬件信息】(查询命令: cat /etc/system-release, uname -a):CentOS 【测试环境】(单机/1主x备x级联备):单机 【被测功能】:跨事务游标(WITH HOLD) 【测试类型】:SQL功能 【数据库版本】(查询命令: gaussdb -V):6.0.0 【预置条件】:开启线程池和GlobalSysCache 【操作步骤】(请填写详细的操作步骤): ```sql create table t(c1 int, c2 text, c3 text); insert into t values (generate_series(1,10000), md5(random()::text), md5(random()::text)); set work_mem = '64kB'; declare cur_sdx_32360_10 no scroll binary cursor with hold for select * from t; fetch forward 2 from cur_sdx_32360_10; move forward 1 in cur_sdx_32360_10; close cur_sdx_32360_10; ``` 【预期输出】: 【实际输出】: 【原因分析】: 1. 这个问题的根因 2. 问题推断过程 3. 还有哪些原因可能造成类似现象 4. 该问题是否有临时规避措施 5. 问题解决方案 6. 预计修复问题时间 【日志信息】(请附上日志文件、截图、coredump信息): ```bash (gdb) bt #0 BBOX_CreateCoredump (file_name=file_name@entry=0x0) at bbox_create.cpp:404 #1 0x0000560d1fddab11 in bbox_handler (sig=<optimized out>, si=<optimized out>, uc=<optimized out>) at gs_bbox.cpp:116 #2 <signal handler called> #3 0x0000560d2088987b in Delete (file=file@entry=2) at fd.cpp:954 #4 0x0000560d2088d465 in FileAccess (file=2) at fd.cpp:1197 #5 0x0000560d20893896 in FilePWrite (file=2, buffer=0x7f2672d078b0 "0f2986093b8561c4P", amount=5376, offset=794624, wait_event_info=wait_event_info@entry=167772161, fastExtendSize=fastExtendSize@entry=0) at fd.cpp:2222 #6 0x0000560d20894052 in BufFileDumpBuffer (file=file@entry=0x7f2672d07850) at buffile.cpp:517 #7 0x0000560d20894231 in BufFileFlush (file=file@entry=0x7f2672d07850) at buffile.cpp:666 #8 0x0000560d2089505f in BufFileFlush (file=0x7f2672d07850) at buffile.cpp:714 #9 BufFileSeek (file=0x7f2672d07850, fileno=<optimized out>, offset=<optimized out>, whence=whence@entry=0) at buffile.cpp:734 #10 0x0000560d1fbf171d in tuplestore_gettuple (state=0x7f2661af0050, forward=<optimized out>, should_free=0x7f2685d166df) at tuplestore.cpp:1047 #11 0x0000560d1fbf21e2 in tuplestore_gettupleslot (state=<optimized out>, forward=forward@entry=true, copy=copy@entry=false, slot=slot@entry=0x7f266bd81418) at tuplestore.cpp:1145 #12 0x0000560d2019f4dd in RunFromStore (portal=portal@entry=0x7f266473e270, direction=direction@entry=ForwardScanDirection, count=count@entry=2, dest=dest@entry=0x7f267aba2498) at pquery.cpp:1586 #13 0x0000560d201a17e1 in PortalRunSelect (portal=portal@entry=0x7f266473e270, forward=<optimized out>, count=2, dest=0x7f267aba2498) at pquery.cpp:1392 #14 0x0000560d201a1adc in DoPortalRunFetch (portal=portal@entry=0x7f266473e270, fdirection=<optimized out>, fdirection@entry=FETCH_FORWARD, count=<optimized out>, count@entry=2, dest=dest@entry=0x7f267aba2498) at pquery.cpp:2289 #15 0x0000560d201a32da in PortalRunFetch (portal=portal@entry=0x7f266473e270, fdirection=FETCH_FORWARD, count=2, dest=dest@entry=0x7f267aba2498) at pquery.cpp:2051 #16 0x0000560d1ffa6904 in PerformPortalFetch (stmt=stmt@entry=0x7f267ac60b18, dest=dest@entry=0x7f267aba2498, completionTag=completionTag@entry=0x7f2685d18a90 "") at portalcmds.cpp:199 #17 0x0000560d201ac61d in standard_ProcessUtility (processutility_cxt=processutility_cxt@entry=0x7f2685d18a20, dest=dest@entry=0x7f267aba2498, sent_to_remote=<optimized out>, completion_tag=completion_tag@entry=0x7f2685d18a90 "", context=context@entry=PROCESS_UTILITY_TOPLEVEL, isCTAS=<optimized out>) at utility.cpp:3031 #18 0x00007f27be460f81 in gsaudit_ProcessUtility_hook (processutility_cxt=0x7f2685d18a20, dest=0x7f267aba2498, sentToRemote=<optimized out>, completionTag=0x7f2685d18a90 "", context=PROCESS_UTILITY_TOPLEVEL, isCTAS=<optimized out>) at gs_policy_plugin.cpp:819 #19 0x0000560d201b1f2f in pgaudit_ProcessUtility (processutility_cxt=0x7f2685d18a20, dest=<optimized out>, sentToRemote=<optimized out>, completionTag=<optimized out>, context=<optimized out>, isCTAS=<optimized out>) at auditfuncs.cpp:1419 #20 0x0000560d201b04c5 in ProcessUtility (processutility_cxt=processutility_cxt@entry=0x7f2685d18a20, dest=dest@entry=0x7f267aba2498, sent_to_remote=sent_to_remote@entry=false, completion_tag=completion_tag@entry=0x7f2685d18a90 "", context=context@entry=PROCESS_UTILITY_TOPLEVEL, isCTAS=isCTAS@entry=false) at utility.cpp:1586 #21 0x0000560d2019f395 in PortalRunUtility (portal=portal@entry=0x7f266473e050, utilityStmt=0x7f267ac60b18, isTopLevel=isTopLevel@entry=true, dest=dest@entry=0x7f267aba2498, completionTag=completionTag@entry=0x7f2685d18a90 "") at pquery.cpp:1734 #22 0x0000560d201a3007 in FillPortalStore (portal=portal@entry=0x7f266473e050, isTopLevel=isTopLevel@entry=true) at pquery.cpp:1528 #23 0x0000560d201a4197 in PortalRun (portal=portal@entry=0x7f266473e050, count=count@entry=9223372036854775807, isTopLevel=isTopLevel@entry=true, dest=dest@entry=0x7f267ac60c38, altdest=altdest@entry=0x7f267ac60c38, completionTag=completionTag@entry=0x7f2685d18e20 "") at pquery.cpp:1144 #24 0x0000560d201910ec in exec_simple_query (query_string=<optimized out>, query_string@entry=0x7f267ac60050 "fetch forward 2 from cur_sdx_32360_10;", messageType=messageType@entry=QUERY_MESSAGE, msg=msg@entry=0x7f2685d192e0) at postgres.cpp:3043 #25 0x0000560d20196b98 in PostgresMain (argc=<optimized out>, argv=argv@entry=0x7f2683b2daf0, dbname=<optimized out>, username=<optimized out>) at postgres.cpp:9265 #26 0x0000560d200eb8c2 in BackendRun (port=port@entry=0x7f2685d1a920) at postmaster.cpp:9598 #27 0x0000560d20113c20 in GaussDbThreadMain<(knl_thread_role)2> (arg=0x7f26c090bc60) at postmaster.cpp:14197 #28 0x0000560d200eb955 in InternalThreadFunc (args=<optimized out>) at postmaster.cpp:14827 #29 0x00007f27a859dea5 in start_thread (arg=0x7f2685d4f700) at pthread_create.c:307 #30 0x00007f27a82c696d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 ``` 【测试代码】:
<!-- #请认真填写以下信息,否则可能由于无法定位,导致issue无法解决而被取消 --> 【标题描述】:开启线程池和GlobalSysCache的情况下,跨事务游标FETCH数据宕机 【测试类型:SQL功能/存储功能/接口功能/工具功能/性能/并发/压力长稳/故障注入/安全/资料/编码规范】SQL功能 【测试版本:x.x.x】 6.0.0 【操作系统和硬件信息】(查询命令: cat /etc/system-release, uname -a):CentOS 【测试环境】(单机/1主x备x级联备):单机 【被测功能】:跨事务游标(WITH HOLD) 【测试类型】:SQL功能 【数据库版本】(查询命令: gaussdb -V):6.0.0 【预置条件】:开启线程池和GlobalSysCache 【操作步骤】(请填写详细的操作步骤): ```sql create table t(c1 int, c2 text, c3 text); insert into t values (generate_series(1,10000), md5(random()::text), md5(random()::text)); set work_mem = '64kB'; declare cur_sdx_32360_10 no scroll binary cursor with hold for select * from t; fetch forward 2 from cur_sdx_32360_10; move forward 1 in cur_sdx_32360_10; close cur_sdx_32360_10; ``` 【预期输出】: 【实际输出】: 【原因分析】: 1. 这个问题的根因 2. 问题推断过程 3. 还有哪些原因可能造成类似现象 4. 该问题是否有临时规避措施 5. 问题解决方案 6. 预计修复问题时间 【日志信息】(请附上日志文件、截图、coredump信息): ```bash (gdb) bt #0 BBOX_CreateCoredump (file_name=file_name@entry=0x0) at bbox_create.cpp:404 #1 0x0000560d1fddab11 in bbox_handler (sig=<optimized out>, si=<optimized out>, uc=<optimized out>) at gs_bbox.cpp:116 #2 <signal handler called> #3 0x0000560d2088987b in Delete (file=file@entry=2) at fd.cpp:954 #4 0x0000560d2088d465 in FileAccess (file=2) at fd.cpp:1197 #5 0x0000560d20893896 in FilePWrite (file=2, buffer=0x7f2672d078b0 "0f2986093b8561c4P", amount=5376, offset=794624, wait_event_info=wait_event_info@entry=167772161, fastExtendSize=fastExtendSize@entry=0) at fd.cpp:2222 #6 0x0000560d20894052 in BufFileDumpBuffer (file=file@entry=0x7f2672d07850) at buffile.cpp:517 #7 0x0000560d20894231 in BufFileFlush (file=file@entry=0x7f2672d07850) at buffile.cpp:666 #8 0x0000560d2089505f in BufFileFlush (file=0x7f2672d07850) at buffile.cpp:714 #9 BufFileSeek (file=0x7f2672d07850, fileno=<optimized out>, offset=<optimized out>, whence=whence@entry=0) at buffile.cpp:734 #10 0x0000560d1fbf171d in tuplestore_gettuple (state=0x7f2661af0050, forward=<optimized out>, should_free=0x7f2685d166df) at tuplestore.cpp:1047 #11 0x0000560d1fbf21e2 in tuplestore_gettupleslot (state=<optimized out>, forward=forward@entry=true, copy=copy@entry=false, slot=slot@entry=0x7f266bd81418) at tuplestore.cpp:1145 #12 0x0000560d2019f4dd in RunFromStore (portal=portal@entry=0x7f266473e270, direction=direction@entry=ForwardScanDirection, count=count@entry=2, dest=dest@entry=0x7f267aba2498) at pquery.cpp:1586 #13 0x0000560d201a17e1 in PortalRunSelect (portal=portal@entry=0x7f266473e270, forward=<optimized out>, count=2, dest=0x7f267aba2498) at pquery.cpp:1392 #14 0x0000560d201a1adc in DoPortalRunFetch (portal=portal@entry=0x7f266473e270, fdirection=<optimized out>, fdirection@entry=FETCH_FORWARD, count=<optimized out>, count@entry=2, dest=dest@entry=0x7f267aba2498) at pquery.cpp:2289 #15 0x0000560d201a32da in PortalRunFetch (portal=portal@entry=0x7f266473e270, fdirection=FETCH_FORWARD, count=2, dest=dest@entry=0x7f267aba2498) at pquery.cpp:2051 #16 0x0000560d1ffa6904 in PerformPortalFetch (stmt=stmt@entry=0x7f267ac60b18, dest=dest@entry=0x7f267aba2498, completionTag=completionTag@entry=0x7f2685d18a90 "") at portalcmds.cpp:199 #17 0x0000560d201ac61d in standard_ProcessUtility (processutility_cxt=processutility_cxt@entry=0x7f2685d18a20, dest=dest@entry=0x7f267aba2498, sent_to_remote=<optimized out>, completion_tag=completion_tag@entry=0x7f2685d18a90 "", context=context@entry=PROCESS_UTILITY_TOPLEVEL, isCTAS=<optimized out>) at utility.cpp:3031 #18 0x00007f27be460f81 in gsaudit_ProcessUtility_hook (processutility_cxt=0x7f2685d18a20, dest=0x7f267aba2498, sentToRemote=<optimized out>, completionTag=0x7f2685d18a90 "", context=PROCESS_UTILITY_TOPLEVEL, isCTAS=<optimized out>) at gs_policy_plugin.cpp:819 #19 0x0000560d201b1f2f in pgaudit_ProcessUtility (processutility_cxt=0x7f2685d18a20, dest=<optimized out>, sentToRemote=<optimized out>, completionTag=<optimized out>, context=<optimized out>, isCTAS=<optimized out>) at auditfuncs.cpp:1419 #20 0x0000560d201b04c5 in ProcessUtility (processutility_cxt=processutility_cxt@entry=0x7f2685d18a20, dest=dest@entry=0x7f267aba2498, sent_to_remote=sent_to_remote@entry=false, completion_tag=completion_tag@entry=0x7f2685d18a90 "", context=context@entry=PROCESS_UTILITY_TOPLEVEL, isCTAS=isCTAS@entry=false) at utility.cpp:1586 #21 0x0000560d2019f395 in PortalRunUtility (portal=portal@entry=0x7f266473e050, utilityStmt=0x7f267ac60b18, isTopLevel=isTopLevel@entry=true, dest=dest@entry=0x7f267aba2498, completionTag=completionTag@entry=0x7f2685d18a90 "") at pquery.cpp:1734 #22 0x0000560d201a3007 in FillPortalStore (portal=portal@entry=0x7f266473e050, isTopLevel=isTopLevel@entry=true) at pquery.cpp:1528 #23 0x0000560d201a4197 in PortalRun (portal=portal@entry=0x7f266473e050, count=count@entry=9223372036854775807, isTopLevel=isTopLevel@entry=true, dest=dest@entry=0x7f267ac60c38, altdest=altdest@entry=0x7f267ac60c38, completionTag=completionTag@entry=0x7f2685d18e20 "") at pquery.cpp:1144 #24 0x0000560d201910ec in exec_simple_query (query_string=<optimized out>, query_string@entry=0x7f267ac60050 "fetch forward 2 from cur_sdx_32360_10;", messageType=messageType@entry=QUERY_MESSAGE, msg=msg@entry=0x7f2685d192e0) at postgres.cpp:3043 #25 0x0000560d20196b98 in PostgresMain (argc=<optimized out>, argv=argv@entry=0x7f2683b2daf0, dbname=<optimized out>, username=<optimized out>) at postgres.cpp:9265 #26 0x0000560d200eb8c2 in BackendRun (port=port@entry=0x7f2685d1a920) at postmaster.cpp:9598 #27 0x0000560d20113c20 in GaussDbThreadMain<(knl_thread_role)2> (arg=0x7f26c090bc60) at postmaster.cpp:14197 #28 0x0000560d200eb955 in InternalThreadFunc (args=<optimized out>) at postmaster.cpp:14827 #29 0x00007f27a859dea5 in start_thread (arg=0x7f2685d4f700) at pthread_create.c:307 #30 0x00007f27a82c696d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 ``` 【测试代码】:
评论 (
5
)
登录
后才可以发表评论
状态
已验收
待办的
已确认
已答复
已取消
挂起
修复中
已完成
待回归
测试中
已验收
负责人
未设置
chenxiaobin
chenxiaobin19
负责人
协作者
+负责人
+协作者
douxin
ywzq1161327784
负责人
协作者
+负责人
+协作者
标签
未设置
项目
未立项任务
未立项任务
里程碑
未关联里程碑
未关联里程碑
Pull Requests
未关联
未关联
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
未关联
分支 (20)
标签 (29)
master
tp_poc
datavec_poc
7.0.0-RC2
6.0.0
5.0.0
7.0.0-RC1
master_bak08271930
bugfix_0725
3.0.0
iud_dev
dev_board
5.1.0
kms
2.0.0
3.1.0
2.1.0
1.1.0
1.0.1
1.0.0
v6.0.2
v7.0.0-RC1
v6.0.1
v3.0.6
v6.0.0
v3.0.5B009
v5.0.3
v5.0.2
v6.0.0-RC1
v3.0.5
v5.0.1
v5.1.0
5.1.0
v5.0.0
v3.0.3
v3.1.1
v3.0.2
v3.1.0
v2.0.5
v3.0.1
v2.0.4
v2.0.3
v3.0.0
v2.1.0
v2.0.1
v2.0.0
v1.1.0
v1.0.1
v1.0.0
开始日期   -   截止日期
-
置顶选项
不置顶
置顶等级:高
置顶等级:中
置顶等级:低
优先级
不指定
严重
主要
次要
不重要
预计工期
(小时)
参与者(2)
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 帐号,请先登录后再操作。
立即登录
没有帐号,去注册