登录
注册
开源
企业版
高校版
搜索
帮助中心
使用条款
关于我们
开源
企业版
高校版
私有云
模力方舟
登录
注册
代码拉取完成,页面将自动刷新
开源项目
>
数据库相关
>
数据库服务
&&
捐赠
捐赠前请先登录
取消
前往登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
Watch
不关注
关注所有动态
仅关注版本发行动态
关注但不提醒动态
443
Star
1.5K
Fork
1.8K
openGauss
/
openGauss-server
代码
Issues
968
Pull Requests
166
Wiki
统计
流水线
服务
质量分析
Jenkins for Gitee
腾讯云托管
腾讯云 Serverless
悬镜安全
阿里云 SAE
Codeblitz
SBOM
我知道了,不再自动展开
更新失败,请稍后重试!
移除标识
内容风险标识
本任务被
标识为内容中包含有代码安全 Bug 、隐私泄露等敏感信息,仓库外成员不可访问
B兼容下,关闭auto_recompile_function,触发器下insert插入出现re-compile后会导致数据库core掉【YJ】
已验收
#IBECUE
缺陷
zhangxubo
成员
创建于
2024-12-28 15:43
<!-- #请认真填写以下信息,否则可能由于无法定位,导致issue无法解决而被取消 --> 【标题描述】: B兼容下,关闭auto_recompile_function,触发器下insert插入出现re-compile后会导致数据库core掉 【测试类型:SQL功能/存储功能/接口功能/工具功能/性能/并发/压力长稳/故障注入/安全/资料/编码规范】【测试版本:x.x.x】 问题描述 【操作系统和硬件信息】(查询命令: cat /etc/system-release, uname -a): x86 【测试环境】(单机/1主x备x级联备): 单机 【被测功能】: 触发器 + insert 【测试类型】: B兼容 【数据库版本】(查询命令: gaussdb -V): 6.0.0 【预置条件】: 阈值条件见附件 1227corereadme.txt, 表结构sql见附件 1227core.sql: ``` ## 设置guc gs_guc reload -D /data2/zxb/datanode/dn1 -c "enable_set_variable_b_format=on" ## 建表结构 gsql -d db5 -p 1200 -f 1227core.sql ## 预先插入数据 ### 设置sql_mode, 如果插入过程又出现re-compile,sql_mode去掉auto_recompile_function等到下一次插入会core掉。 set dolphin.sql_mode='sql_mode_strict,sql_mode_full_group,pipes_as_concat,ansi_quotes,no_zero_date,pad_char_to_full_length'; insert into yc_define (yc_name,yc_alias,yc_type,yc_type_sub,set_channel,current_channel,if_yt,yc_val,status,q,yc_range,if_sample,if_limit,dead_area,zero_val,conf_mode,meaness_h,meaness_l,if_send_1,if_send_2,if_send_3,if_send_4,if_send_5,if_send_6,if_send_7,if_send_8,flag_1,flag_2,flag_3,int_2,int_3,int_5,int_6,int_8,channel_delta_alarm,channel_value_err,wf_name,unit,store_to_tsdb,is_cal,avg10m_tmp,std10m_tmp,max10m_tmp,min10m_tmp,is_cascade,recv_time,flag_type_id,source,flag_4,flag_5,flag_6,flag_7,flag_8,int_1,int_4,int_7,float_1,float_2,string_1,string_2,yc_id) values ('风场F022洺 E3CBClosureCounter','F022.T5_L3.WTG131.WCNV.CBClosureCounter',0,0,0,0,0,50.000000,0,0,0,1,0,0.000000,0.000000,0,0.000000,0.000000,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.000000,0,'','',0,0,-1.000000,-1.000000,-1.000000,999999.000000,1,0,0,0,0,0,0,0,0,0,0,0,0.000000,0.000000,'','',62039938); ``` sql_mode加上 auto_recompile_function 虽然不会导致core,但是频繁进行编译对性能影响很大。客户场景是关闭该配置。没有表结构变更情况下不需要重新编译。 堆栈: ``` #0 BBOX_CreateCoredump (file_name=file_name@entry=0x0) at bbox_create.cpp:404 #1 0x000055bfe7f823f1 in bbox_handler (sig=<optimized out>, si=<optimized out>, uc=<optimized out>) at gs_bbox.cpp:116 #2 bbox_handler (sig=<optimized out>, si=<optimized out>, uc=<optimized out>) at gs_bbox.cpp:103 #3 <signal handler called> #4 0x000055bfe78ba6cd in list_copy (oldlist=0x7f9eedebcfa8) at list.cpp:1517 #5 0x000055bfe8c01c93 in copy_plpgsql_datum (datum=<optimized out>) at pl_exec.cpp:3109 #6 0x000055bfe8c1a363 in plpgsql_exec_trigger (func=func@entry=0x7f9f32858050, trigdata=0x7f9eed5382d0) at pl_exec.cpp:2367 #7 0x00007f9eee76089b in b_plpgsql_call_handler () at pl_handler.cpp:975 #8 0x000055bfe81d0ba3 in ExecCallTriggerFunc (trigdata=trigdata@entry=0x7f9eed5382d0, tgindx=tgindx@entry=0, finfo=0x7f9eede0e528, instr=<optimized out>, per_tuple_context=0x7f9eedd70050) at trigger.cpp:2149 #9 0x000055bfe81dd936 in ExecBRInsertTriggers (estate=estate@entry=0x7f9eede0e050, relinfo=relinfo@entry=0x7f9eede0e2f8, slot=slot@entry=0x7f9eede24600) at trigger.cpp:2300 #10 0x000055bfe845b71a in ExecInsertT<false> (state=state@entry=0x7f9eede20050, slot=slot@entry=0x7f9eede24600, planSlot=<optimized out>, estate=estate@entry=0x7f9eede0e050, canSetTag=<optimized out>, options=options@entry=0, partitionList=<optimized out>, partExprKeyStr=<optimized out>, replaceNull=<optimized out>) at nodeModifyTable.cpp:282 #11 0x000055bfe84583c2 in ExecModifyTable (state=0x7f9eede20050) at nodeModifyTable.cpp:3812 #12 0x000055bfe83dfd4e in ExecProcNode (node=0x7f9eede20050) at ../../../../src/include/executor/executor.h:294 #13 ExecutePlan (motJitContext=<optimized out>, dest=<optimized out>, direction=<optimized out>, numberTuples=<optimized out>, sendTuples=<optimized out>, operation=<optimized out>, planstate=0x7f9eede20050, estate=0x7f9eede0e050) at execMain.cpp:2285 #14 standard_ExecutorRun (queryDesc=0x7f9f0e280850, direction=<optimized out>, count=<optimized out>) at execMain.cpp:663 #15 0x000055bfe82313f5 in explain_ExecutorRun (queryDesc=<optimized out>, direction=<optimized out>, count=<optimized out>) at auto_explain.cpp:122 #16 0x000055bfe83dfecc in ExecutorRun (queryDesc=queryDesc@entry=0x7f9f0e280850, direction=direction@entry=ForwardScanDirection, count=count@entry=0) at execMain.cpp:513 #17 0x000055bfe83523d1 in ProcessQuery (plan=plan@entry=0x7f9f1eea1428, sourceText=0x7f9eed6e2050 "insert into yc_define (yc_name,yc_alias,yc_type,yc_type_sub,set_channel,current_channel,if_yt,yc_val,status,q,yc_range,if_sample,if_limit,dead_area,zero_val,conf_mode,meaness_h,meaness_l,if_send_1,if_"..., params=<optimized out>, isMOTTable=<optimized out>, motJitContext=motJitContext@entry=0x0, dest=dest@entry=0x7f9eefa4ee08, completionTag=0x7f9eed538ea0 "") at pquery.cpp:294 #18 0x000055bfe8355003 in PortalRunMulti(PortalData*, bool, _DestReceiver*, _DestReceiver*, char*) () at pquery.cpp:1871 #19 0x000055bfe83567b4 in PortalRun(PortalData*, long, bool, _DestReceiver*, _DestReceiver*, char*) () at pquery.cpp:1184 #20 0x000055bfe8343fcc in exec_simple_query(char const*, MessageType, StringInfoData*) () at postgres.cpp:3044 #21 0x000055bfe8349247 in PostgresMain(int, char**, char const*, char const*) () at postgres.cpp:9266 #22 0x000055bfe8297d35 in BackendRun (port=port@entry=0x7f9eed53a920) at postmaster.cpp:9612 #23 0x000055bfe82c8088 in GaussDbThreadMain<(knl_thread_role)1> (arg=0x7f9f4186ca18) at postmaster.cpp:12021 #24 0x000055bfe8297dc5 in InternalThreadFunc (args=<optimized out>) at postmaster.cpp:14841 #25 0x00007fa020b36ea5 in start_thread () from /lib64/libpthread.so.0 #26 0x00007fa02085fb0d in clone () from /lib64/libc.so.6 ```  【原因分析】: 1. 这个问题的根因 2. 问题推断过程 3. 还有哪些原因可能造成类似现象 4. 该问题是否有临时规避措施 5. 问题解决方案 6. 预计修复问题时间 【日志信息】(请附上日志文件、截图、coredump信息): 【测试代码】:
<!-- #请认真填写以下信息,否则可能由于无法定位,导致issue无法解决而被取消 --> 【标题描述】: B兼容下,关闭auto_recompile_function,触发器下insert插入出现re-compile后会导致数据库core掉 【测试类型:SQL功能/存储功能/接口功能/工具功能/性能/并发/压力长稳/故障注入/安全/资料/编码规范】【测试版本:x.x.x】 问题描述 【操作系统和硬件信息】(查询命令: cat /etc/system-release, uname -a): x86 【测试环境】(单机/1主x备x级联备): 单机 【被测功能】: 触发器 + insert 【测试类型】: B兼容 【数据库版本】(查询命令: gaussdb -V): 6.0.0 【预置条件】: 阈值条件见附件 1227corereadme.txt, 表结构sql见附件 1227core.sql: ``` ## 设置guc gs_guc reload -D /data2/zxb/datanode/dn1 -c "enable_set_variable_b_format=on" ## 建表结构 gsql -d db5 -p 1200 -f 1227core.sql ## 预先插入数据 ### 设置sql_mode, 如果插入过程又出现re-compile,sql_mode去掉auto_recompile_function等到下一次插入会core掉。 set dolphin.sql_mode='sql_mode_strict,sql_mode_full_group,pipes_as_concat,ansi_quotes,no_zero_date,pad_char_to_full_length'; insert into yc_define (yc_name,yc_alias,yc_type,yc_type_sub,set_channel,current_channel,if_yt,yc_val,status,q,yc_range,if_sample,if_limit,dead_area,zero_val,conf_mode,meaness_h,meaness_l,if_send_1,if_send_2,if_send_3,if_send_4,if_send_5,if_send_6,if_send_7,if_send_8,flag_1,flag_2,flag_3,int_2,int_3,int_5,int_6,int_8,channel_delta_alarm,channel_value_err,wf_name,unit,store_to_tsdb,is_cal,avg10m_tmp,std10m_tmp,max10m_tmp,min10m_tmp,is_cascade,recv_time,flag_type_id,source,flag_4,flag_5,flag_6,flag_7,flag_8,int_1,int_4,int_7,float_1,float_2,string_1,string_2,yc_id) values ('风场F022洺 E3CBClosureCounter','F022.T5_L3.WTG131.WCNV.CBClosureCounter',0,0,0,0,0,50.000000,0,0,0,1,0,0.000000,0.000000,0,0.000000,0.000000,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.000000,0,'','',0,0,-1.000000,-1.000000,-1.000000,999999.000000,1,0,0,0,0,0,0,0,0,0,0,0,0.000000,0.000000,'','',62039938); ``` sql_mode加上 auto_recompile_function 虽然不会导致core,但是频繁进行编译对性能影响很大。客户场景是关闭该配置。没有表结构变更情况下不需要重新编译。 堆栈: ``` #0 BBOX_CreateCoredump (file_name=file_name@entry=0x0) at bbox_create.cpp:404 #1 0x000055bfe7f823f1 in bbox_handler (sig=<optimized out>, si=<optimized out>, uc=<optimized out>) at gs_bbox.cpp:116 #2 bbox_handler (sig=<optimized out>, si=<optimized out>, uc=<optimized out>) at gs_bbox.cpp:103 #3 <signal handler called> #4 0x000055bfe78ba6cd in list_copy (oldlist=0x7f9eedebcfa8) at list.cpp:1517 #5 0x000055bfe8c01c93 in copy_plpgsql_datum (datum=<optimized out>) at pl_exec.cpp:3109 #6 0x000055bfe8c1a363 in plpgsql_exec_trigger (func=func@entry=0x7f9f32858050, trigdata=0x7f9eed5382d0) at pl_exec.cpp:2367 #7 0x00007f9eee76089b in b_plpgsql_call_handler () at pl_handler.cpp:975 #8 0x000055bfe81d0ba3 in ExecCallTriggerFunc (trigdata=trigdata@entry=0x7f9eed5382d0, tgindx=tgindx@entry=0, finfo=0x7f9eede0e528, instr=<optimized out>, per_tuple_context=0x7f9eedd70050) at trigger.cpp:2149 #9 0x000055bfe81dd936 in ExecBRInsertTriggers (estate=estate@entry=0x7f9eede0e050, relinfo=relinfo@entry=0x7f9eede0e2f8, slot=slot@entry=0x7f9eede24600) at trigger.cpp:2300 #10 0x000055bfe845b71a in ExecInsertT<false> (state=state@entry=0x7f9eede20050, slot=slot@entry=0x7f9eede24600, planSlot=<optimized out>, estate=estate@entry=0x7f9eede0e050, canSetTag=<optimized out>, options=options@entry=0, partitionList=<optimized out>, partExprKeyStr=<optimized out>, replaceNull=<optimized out>) at nodeModifyTable.cpp:282 #11 0x000055bfe84583c2 in ExecModifyTable (state=0x7f9eede20050) at nodeModifyTable.cpp:3812 #12 0x000055bfe83dfd4e in ExecProcNode (node=0x7f9eede20050) at ../../../../src/include/executor/executor.h:294 #13 ExecutePlan (motJitContext=<optimized out>, dest=<optimized out>, direction=<optimized out>, numberTuples=<optimized out>, sendTuples=<optimized out>, operation=<optimized out>, planstate=0x7f9eede20050, estate=0x7f9eede0e050) at execMain.cpp:2285 #14 standard_ExecutorRun (queryDesc=0x7f9f0e280850, direction=<optimized out>, count=<optimized out>) at execMain.cpp:663 #15 0x000055bfe82313f5 in explain_ExecutorRun (queryDesc=<optimized out>, direction=<optimized out>, count=<optimized out>) at auto_explain.cpp:122 #16 0x000055bfe83dfecc in ExecutorRun (queryDesc=queryDesc@entry=0x7f9f0e280850, direction=direction@entry=ForwardScanDirection, count=count@entry=0) at execMain.cpp:513 #17 0x000055bfe83523d1 in ProcessQuery (plan=plan@entry=0x7f9f1eea1428, sourceText=0x7f9eed6e2050 "insert into yc_define (yc_name,yc_alias,yc_type,yc_type_sub,set_channel,current_channel,if_yt,yc_val,status,q,yc_range,if_sample,if_limit,dead_area,zero_val,conf_mode,meaness_h,meaness_l,if_send_1,if_"..., params=<optimized out>, isMOTTable=<optimized out>, motJitContext=motJitContext@entry=0x0, dest=dest@entry=0x7f9eefa4ee08, completionTag=0x7f9eed538ea0 "") at pquery.cpp:294 #18 0x000055bfe8355003 in PortalRunMulti(PortalData*, bool, _DestReceiver*, _DestReceiver*, char*) () at pquery.cpp:1871 #19 0x000055bfe83567b4 in PortalRun(PortalData*, long, bool, _DestReceiver*, _DestReceiver*, char*) () at pquery.cpp:1184 #20 0x000055bfe8343fcc in exec_simple_query(char const*, MessageType, StringInfoData*) () at postgres.cpp:3044 #21 0x000055bfe8349247 in PostgresMain(int, char**, char const*, char const*) () at postgres.cpp:9266 #22 0x000055bfe8297d35 in BackendRun (port=port@entry=0x7f9eed53a920) at postmaster.cpp:9612 #23 0x000055bfe82c8088 in GaussDbThreadMain<(knl_thread_role)1> (arg=0x7f9f4186ca18) at postmaster.cpp:12021 #24 0x000055bfe8297dc5 in InternalThreadFunc (args=<optimized out>) at postmaster.cpp:14841 #25 0x00007fa020b36ea5 in start_thread () from /lib64/libpthread.so.0 #26 0x00007fa02085fb0d in clone () from /lib64/libc.so.6 ```  【原因分析】: 1. 这个问题的根因 2. 问题推断过程 3. 还有哪些原因可能造成类似现象 4. 该问题是否有临时规避措施 5. 问题解决方案 6. 预计修复问题时间 【日志信息】(请附上日志文件、截图、coredump信息): 【测试代码】:
附件
1227corereadme.txt
(3.87 KB)
预览
下载
zhangxubo
2024-12-28 15:44
1227core.sql
(29.06 KB)
下载
zhangxubo
2024-12-28 15:44
评论 (
4
)
登录
后才可以发表评论
状态
已验收
待办的
已确认
已答复
已取消
挂起
修复中
已完成
待回归
测试中
已验收
负责人
未设置
chenxiaobin
chenxiaobin19
负责人
协作者
+负责人
+协作者
标签
未设置
项目
未立项任务
未立项任务
里程碑
未关联里程碑
未关联里程碑
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
开始日期   -   截止日期
-
置顶选项
不置顶
置顶等级:高
置顶等级:中
置顶等级:低
优先级
不指定
严重
主要
次要
不重要
预计工期
(小时)
参与者(1)
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 帐号,请先登录后再操作。
立即登录
没有帐号,去注册