402 Star 1.4K Fork 1.5K

GVPopenGauss / openGauss-server

 / 详情

array系列某些函数调用会coredump

已验收
缺陷 成员
创建于  
2023-06-21 09:41

【标题描述】:
【测试类型:SQL功能/存储功能/接口功能/工具功能/性能/并发/压力长稳/故障注入/安全/资料/编码规范】【测试版本:2.0.0】 问题描述

【操作系统和硬件信息】(查询命令: cat /etc/system-release, uname -a):

【测试环境】(单机/1主x备x级联备):
gaussdb (openGauss 5.1.0 build 15f09368) compiled at 2023-06-20 17:23:33 commit 0 last mr debug

【被测功能】:

【测试类型】:

【数据库版本】(查询命令: gaussdb -V):

【预置条件】:

【操作步骤】(请填写详细的操作步骤):

 select * from array_varchar_exists(array[1,2,3], 'a');

【预期输出】:
报错:array_varchar_exists must be call in procedure

【实际输出】:
core dump

【原因分析】:

  1. 这个问题的根因
  2. 问题推断过程
  3. 还有哪些原因可能造成类似现象
  4. 该问题是否有临时规避措施
  5. 问题解决方案
  6. 预计修复问题时间

【日志信息】(请附上日志文件、截图、coredump信息):

#0  0x00000000014a63b4 in sys_wait4 (upid=2643723, stat_addr=0xfffc2a7c8628, options=1073741824, ru=0x0) at bbox_syscall_support.cpp:36
#1  0x00000000014a75d8 in sys_waitpid (pid=2643723, status=0xfffc2a7c8628, options=1073741824) at bbox_syscall_support.cpp:516
#2  0x00000000014a9128 in BBOX_GetClonePidResult (iClonePid=2643723, pstArgs=0xfffc2a7c86a0, iCloneErrno=9) at bbox_threads.cpp:572
#3  0x00000000014a9a30 in BBOX_GetAllThreads (enType=GET_TYPE_DUMP, pDone=0x149aa90 <BBOX_FinishDumpFile(void*)>, pDoneArgs=0xfffc2a7c87d8, pCallback=
    0x14a2d34 <BBOX_DoDumpElfCore(BBOX_GetAllThreadDone, void*, int, pid_t*, va_list)>) at bbox_threads.cpp:700
#4  0x000000000149ae18 in BBOX_CreateCoredump (file_name=0xfffc2a7c8908 "/data1/core//core-gaussdb-2639714-2023_06_21_09_14_13-bbox.lz4") at bbox_create.cpp:440
#5  0x00000000014ab784 in bbox_handler (sig=11, si=0xfffc2a7c8e40, uc=0xfffc2a7c8ec0) at gs_bbox.cpp:112
#6  <signal handler called>
#7  0x0000000000e1bbc8 in array_varchar_exists (fcinfo=0xfffc2800c428) at arrayfuncs.cpp:1790
#8  0x0000000001af2748 in ExecMakeFunctionResultNoSets<false, false> (fcache=0xfffc2800c288, econtext=0xfffc2800c9f8, isNull=0xfffc2a7ca2f3, isDone=0x0) at execQual.cpp:2829
#9  0x0000000001ae19c0 in ExecEvalFunc (fcache=0xfffc2800c288, econtext=0xfffc2800c9f8, isNull=0xfffc2a7ca2f3, isDone=0x0) at execQual.cpp:3566
#10 0x00000000015b67dc in ExecEvalExprSwitchContext (state=0xfffc2800c288, econtext=0xfffc2800c9f8, isNull=0xfffc2a7ca2f3, isDone=0x0)
    at ../../../../src/include/executor/executor.h:385
#11 0x00000000015c1a58 in evaluate_expr (expr=0xfffc280148b0, result_type=16, result_typmod=-1, result_collation=0, can_ignore=false) at clauses.cpp:4839
#12 0x00000000015c0484 in evaluate_function (funcid=7882, result_type=16, result_typmod=-1, result_collid=0, input_collid=100, args=0xfffc28014758, func_tuple=0xfffc28885f20,
    context=0xfffc2a7ca708) at clauses.cpp:4303
#13 0x00000000015be3f8 in simplify_function (funcid=7882, result_type=16, result_typmod=-1, result_collid=0, input_collid=100, args_p=0xfffc2a7ca6c8, process_args=true,
    allow_non_const=true, context=0xfffc2a7ca708) at clauses.cpp:3752
#14 0x00000000015bb76c in eval_const_expressions_mutator (node=0xfffc28005538, context=0xfffc2a7ca708) at clauses.cpp:2610
#15 0x00000000015badb8 in eval_const_expressions (root=0xfffc282c0060, node=0xfffc28005538) at clauses.cpp:2380
#16 0x000000000152ae6c in preprocess_expression (root=0xfffc282c0060, expr=0xfffc28005538, kind=2) at planner.cpp:2042
#17 0x0000000001529ec4 in subquery_planner (glob=0xfffc28876718, parse=0xfffc28004288, parent_root=0x0, hasRecursion=false, tuple_fraction=0, subroot=0xfffc2a7caa38, options=1,
    diskeys=0x0, subqueryRestrictInfo=0x0) at planner.cpp:1712
#18 0x0000000001525d74 in standard_planner (parse=0xfffc28004288, cursorOptions=0, boundParams=0x0) at planner.cpp:665
#19 0x000000000156fcc8 in pgxc_planner (query=0xfffc28004288, cursorOptions=0, boundParams=0x0) at pgxcplan_single.cpp:174
#20 0x0000000001525244 in planner (parse=0xfffc28004288, cursorOptions=0, boundParams=0x0) at planner.cpp:393
#21 0x00000000019e8510 in pg_plan_query (querytree=0xfffc28004288, cursorOptions=0, boundParams=0x0, underExplain=false) at postgres.cpp:1385
#22 0x00000000019e8998 in pg_plan_queries (querytrees=0xfffc288769f8, cursorOptions=0, boundParams=0x0) at postgres.cpp:1518
#23 0x00000000019ebe6c in exec_simple_query (query_string=0xfffc28582060 "select * from array_varchar_exists(array[1,2,3], 'a');", messageType=QUERY_MESSAGE, msg=0xfffc2a7cb2c8)
    at postgres.cpp:2817
#24 0x00000000019fbf98 in PostgresMain (argc=1, argv=0xfffc293eb268, dbname=0xfffc293ea2a0 "postgres", username=0xfffc293ea258 "carrot") at postgres.cpp:9000
#25 0x000000000191e7c0 in BackendRun (port=0xfffc2a7cb858) at postmaster.cpp:9226
#26 0x0000000001932cf8 in GaussDbThreadMain<(knl_thread_role)1> (arg=0xfffc75356fa0) at postmaster.cpp:13637
#27 0x000000000192d55c in InternalThreadFunc (args=0xfffc75356fa0) at postmaster.cpp:14256
#28 0x0000000002565860 in ThreadStarterFunc (arg=0xfffc75356f90) at gs_thread.cpp:380
#29 0x0000fffd5ce587ac in start_thread (arg=0xfffd5cb9ff10) at pthread_create.c:486
#30 0x0000fffd5cda548c in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:78

【测试代码】:

评论 (4)

胡正超 创建了缺陷

Hey @胡正超, Welcome to openGauss Community.
All of the projects in openGauss Community are maintained by @opengauss_bot.
That means the developers can comment below every pull request or issue to trigger Bot Commands.
Please follow instructions at Here to find the details.

Hi @胡正超, please use the command /sig xxx to add a SIG label to this issue.
For example: /sig sqlengine or /sig storageengine or /sig om or /sig ai and so on.
You can find more SIG labels from Here.
If you have no idea about that, please contact with @xiangxinyong , @zhangxubo .

胡正超 负责人设置为胡正超
胡正超 任务状态待办的 修改为已确认
胡正超 任务状态已确认 修改为修复中
胡正超 任务状态修复中 修改为已完成

验收版本及验收结果:
输入图片说明

jiexiao1413 任务状态已完成 修改为已验收

5.0.1验收通过
输入图片说明

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(4)
13084139 opengauss bot 1686829535
C++
1
https://gitee.com/opengauss/openGauss-server.git
git@gitee.com:opengauss/openGauss-server.git
opengauss
openGauss-server
openGauss-server

搜索帮助