登录
注册
开源
企业版
高校版
搜索
帮助中心
使用条款
关于我们
开源
企业版
高校版
私有云
模力方舟
AI 队友
登录
注册
代码拉取完成,页面将自动刷新
捐赠
捐赠前请先登录
取消
前往登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
Watch
不关注
关注所有动态
仅关注版本发行动态
关注但不提醒动态
31
Star
32
Fork
225
openGauss
/
Plugin
代码
Issues
50
Pull Requests
1
Wiki
统计
流水线
服务
JavaDoc
PHPDoc
质量分析
Jenkins for Gitee
腾讯云托管
腾讯云 Serverless
悬镜安全
阿里云 SAE
Codeblitz
SBOM
我知道了,不再自动展开
更新失败,请稍后重试!
移除标识
内容风险标识
本任务被
标识为内容中包含有代码安全 Bug 、隐私泄露等敏感信息,仓库外成员不可访问
【测试类型:SQL功能】【测试版本:7.0.0】工具测试是发现内存泄露
待办的
#IBY9SB
缺陷
李春龙
创建于
2025-04-02 14:58
【标题描述】: 工具测试是发现内存泄露 【测试类型:SQL功能】【测试版本:7.0.0】工具测试是发现内存泄露 【操作系统和硬件信息】(查询命令: cat /etc/system-release, uname -a): 【测试环境】(单机/1主x备x级联备): 【被测功能】: 【测试类型】: 【数据库版本】(查询命令: gaussdb -V): 【预置条件】: 【操作步骤】(请填写详细的操作步骤): 1. 执行编译: ./configure --gcc-version=10.3.1 CC=g++ CFLAGS='-O0 -D__USE_NUMA -D__ARM_LSE' --prefix=$GAUSSHOME --3rd=$BINARYLIBS --enable-debug --enable-cassert --enable-mot --enable-thread-safety --with-readline --without-zlib --enable-memory-check make -sj make install -sj 2.执行测试 make plugin_check 【预期输出】: 无内存泄露 【实际输出】: ================================================================= ==1986510==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x604000a80000 at pc 0x7f4c71b7ac91 bp 0x7f4bce991830 sp 0x7f4bce990fe0 READ of size 11 at 0x604000a80000 thread T98 (worker) #0 0x7f4c71b7ac90 in __interceptor_strlen ../../.././libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:370 #1 0x7f4c4b3f49ac in cstring_to_text(char const*) /data/bomou/og/openGauss-server/contrib/dolphin/plugin_utils/adt/varlena.cpp:438 #2 0x7f4c4b3fcc14 in textin(FunctionCallInfoData*) /data/bomou/og/openGauss-server/contrib/dolphin/plugin_utils/adt/varlena.cpp:1143 #3 0x19d8237 in InputFunctionCall(FmgrInfo*, char*, unsigned int, int, bool, unsigned int) /data/bomou/og/openGauss-server/src/common/backend/utils/fmgr/fmgr.cpp:2220 #4 0x2f98e0e in BuildTupleFromCStrings(AttInMetadata*, char**) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execTuples.cpp:951 #5 0x1adae73 in show_all_settings(FunctionCallInfoData*) /data/bomou/og/openGauss-server/src/common/backend/utils/misc/guc.cpp:10587 #6 0x2f32a18 in ExecMakeTableFunctionResult(ExprState*, ExprContext*, tupleDesc*, bool, FunctionScanState*) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execQual.cpp:3315 #7 0x30ef222 in FunctionNext /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/nodeFunctionscan.cpp:63 #8 0x2f92698 in ExecScanFetch /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execScan.cpp:83 #9 0x2f92b9b in ExecScan(ScanState*, TupleTableSlot* (*)(ScanState*), bool (*)(ScanState*, TupleTableSlot*)) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execScan.cpp:172 #10 0x30ef2f7 in ExecFunctionScan /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/nodeFunctionscan.cpp:96 #11 0x2f1fe41 in ExecProcNodeFirst /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execProcnode.cpp:788 #12 0x2effbdb in ExecProcNode ../../../../src/include/executor/executor.h:295 #13 0x2f0c208 in ExecutePlan /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execMain.cpp:2301 #14 0x2f03813 in standard_ExecutorRun(QueryDesc*, ScanDirection, long) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execMain.cpp:685 #15 0x29e5355 in explain_ExecutorRun /data/bomou/og/openGauss-server/src/gausskernel/optimizer/commands/auto_explain.cpp:122 #16 0x2f0249c in ExecutorRun(QueryDesc*, ScanDirection, long) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execMain.cpp:523 #17 0x2d54d16 in PortalRunSelect /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/pquery.cpp:1457 #18 0x2d52e20 in PortalRun(PortalData*, long, bool, _DestReceiver*, _DestReceiver*, char*) /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/pquery.cpp:1175 #19 0x2d19c76 in exec_simple_query /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/postgres.cpp:3088 #20 0x2d372b4 in PostgresMain(int, char**, char const*, char const*) /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/postgres.cpp:9355 #21 0x2b8328d in BackendRun /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:9750 #22 0x2ba66a8 in int GaussDbThreadMain<(knl_thread_role)1>(knl_thread_arg*) /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:14431 #23 0x2b9eb7a in InternalThreadFunc /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:15079 #24 0x487a8f1 in ThreadStarterFunc /data/bomou/og/openGauss-server/src/common/port/gs_thread.cpp:383 #25 0x7f4c606aefec (/lib64/libpthread.so.0+0x8fec) 0x604000a80000 is located 0 bytes to the right of 48-byte region [0x604000a7ffd0,0x604000a80000) allocated by thread T98 (worker) here: #0 0x7f4c71be7faf in __interceptor_malloc ../../.././libsanitizer/asan/asan_malloc_linux.cpp:145 #1 0x1b5a949 in void* MemoryProtectFunctions::gs_memprot_malloc<(MemType)0>(unsigned long, bool) /data/bomou/og/openGauss-server/src/common/backend/utils/mmgr/memprot.cpp:834 #2 0x1b69c3f in DoAllocMemoryInternal(MemoryContextData*, unsigned long, char const*, int, MemoryProtectFuncDef*, bool, bool) /data/bomou/og/openGauss-server/src/common/backend/utils/mmgr/AsanMemoryAllocator.cpp:474 #3 0x1b6e43c in void* AsanMemoryAllocator::AllocSetAlloc<true, false, false>(MemoryContextData*, unsigned long, unsigned long, char const*, int) /data/bomou/og/openGauss-server/src/common/backend/utils/mmgr/AsanMemoryAllocator.cpp:556 #4 0x1b43214 in MemoryAllocFromContext(MemoryContextData*, unsigned long, char const*, int) /data/bomou/og/openGauss-server/src/common/backend/utils/mmgr/mcxt.cpp:1197 #5 0x1b434c4 in MemoryContextAllocDebug(MemoryContextData*, unsigned long, char const*, int) /data/bomou/og/openGauss-server/src/common/backend/utils/mmgr/mcxt.cpp:1234 #6 0x1b465f3 in MemoryContextStrdupDebug(MemoryContextData*, char const*, char const*, int) /data/bomou/og/openGauss-server/src/common/backend/utils/mmgr/mcxt.cpp:1877 #7 0x1adc3d1 in _ShowOption /data/bomou/og/openGauss-server/src/common/backend/utils/misc/guc.cpp:10810 #8 0x1ad78e3 in GetConfigOptionByNum(int, char const**, bool*) /data/bomou/og/openGauss-server/src/common/backend/utils/misc/guc.cpp:10174 #9 0x1adac86 in show_all_settings(FunctionCallInfoData*) /data/bomou/og/openGauss-server/src/common/backend/utils/misc/guc.cpp:10574 #10 0x2f32a18 in ExecMakeTableFunctionResult(ExprState*, ExprContext*, tupleDesc*, bool, FunctionScanState*) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execQual.cpp:3315 #11 0x30ef222 in FunctionNext /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/nodeFunctionscan.cpp:63 #12 0x2f92698 in ExecScanFetch /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execScan.cpp:83 #13 0x2f92b9b in ExecScan(ScanState*, TupleTableSlot* (*)(ScanState*), bool (*)(ScanState*, TupleTableSlot*)) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execScan.cpp:172 #14 0x30ef2f7 in ExecFunctionScan /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/nodeFunctionscan.cpp:96 #15 0x2f1fe41 in ExecProcNodeFirst /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execProcnode.cpp:788 #16 0x2effbdb in ExecProcNode ../../../../src/include/executor/executor.h:295 #17 0x2f0c208 in ExecutePlan /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execMain.cpp:2301 #18 0x2f03813 in standard_ExecutorRun(QueryDesc*, ScanDirection, long) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execMain.cpp:685 #19 0x29e5355 in explain_ExecutorRun /data/bomou/og/openGauss-server/src/gausskernel/optimizer/commands/auto_explain.cpp:122 #20 0x2f0249c in ExecutorRun(QueryDesc*, ScanDirection, long) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execMain.cpp:523 #21 0x2d54d16 in PortalRunSelect /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/pquery.cpp:1457 #22 0x2d52e20 in PortalRun(PortalData*, long, bool, _DestReceiver*, _DestReceiver*, char*) /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/pquery.cpp:1175 #23 0x2d19c76 in exec_simple_query /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/postgres.cpp:3088 #24 0x2d372b4 in PostgresMain(int, char**, char const*, char const*) /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/postgres.cpp:9355 #25 0x2b8328d in BackendRun /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:9750 #26 0x2ba66a8 in int GaussDbThreadMain<(knl_thread_role)1>(knl_thread_arg*) /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:14431 #27 0x2b9eb7a in InternalThreadFunc /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:15079 #28 0x487a8f1 in ThreadStarterFunc /data/bomou/og/openGauss-server/src/common/port/gs_thread.cpp:383 #29 0x7f4c606aefec (/lib64/libpthread.so.0+0x8fec) Thread T98 (worker) created by T0 here: #0 0x7f4c71b933e2 in __interceptor_pthread_create ../../.././libsanitizer/asan/asan_interceptors.cpp:214 #1 0x487b707 in gs_thread_create_ex(gs_thread_t*, void* (*)(void*), int, void*, cpu_set_t*) /data/bomou/og/openGauss-server/src/common/port/gs_thread.cpp:824 #2 0x2b9ed50 in initialize_thread(ThreadArg*) /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:15095 #3 0x2b9f6a5 in initialize_worker_thread(knl_thread_role, Port*, void*) /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:15179 #4 0x2b804a1 in BackendStartup /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:9275 #5 0x2b5df05 in ServerLoop /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:4113 #6 0x2b57d27 in PostmasterMain(int, char**) /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:3202 #7 0x2ac13a6 in main /data/bomou/og/openGauss-server/src/gausskernel/process/main/main.cpp:352 #8 0x7f4c6050ab66 in __libc_start_main (/lib64/libc.so.6+0x25b66) SUMMARY: AddressSanitizer: heap-buffer-overflow ../../.././libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:370 in __interceptor_strlen Shadow bytes around the buggy address: 0x0c0880147fb0: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd 0x0c0880147fc0: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd 0x0c0880147fd0: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd 0x0c0880147fe0: fa fa fd fd fd fd fd fd fa fa 00 00 00 00 00 00 0x0c0880147ff0: fa fa fd fd fd fd fd fd fa fa 00 00 00 00 00 00 =>0x0c0880148000:[fa]fa fd fd fd fd fd fd fa fa fa fa fa fa fa fa 0x0c0880148010: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd 0x0c0880148020: fa fa fd fd fd fd fd fd fa fa fa fa fa fa fa fa 0x0c0880148030: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd 0x0c0880148040: fa fa fd fd fd fd fd fd fa fa fa fa fa fa fa fa 0x0c0880148050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc ================================================================= ==1986510==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x604000a80000 at pc 0x7f4c71b77b03 bp 0x7f4bce9917e0 sp 0x7f4bce990f90 READ of size 10 at 0x604000a80000 thread T98 (worker) #0 0x7f4c71b77b02 in __interceptor_memcpy ../../.././libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:806 #1 0x4a5e1a2 in memcpy_s (/data/bomou/og/openGauss-server/contrib/dolphin/tmp_check/install/data/bomou/og/install/bin/gaussdb+0x4a5e1a2) #2 0x7f4c4b3f49be in cstring_to_text(char const*) /data/bomou/og/openGauss-server/contrib/dolphin/plugin_utils/adt/varlena.cpp:438 #3 0x7f4c4b3fcc14 in textin(FunctionCallInfoData*) /data/bomou/og/openGauss-server/contrib/dolphin/plugin_utils/adt/varlena.cpp:1143 #4 0x19d8237 in InputFunctionCall(FmgrInfo*, char*, unsigned int, int, bool, unsigned int) /data/bomou/og/openGauss-server/src/common/backend/utils/fmgr/fmgr.cpp:2220 #5 0x2f98e0e in BuildTupleFromCStrings(AttInMetadata*, char**) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execTuples.cpp:951 #6 0x1adae73 in show_all_settings(FunctionCallInfoData*) /data/bomou/og/openGauss-server/src/common/backend/utils/misc/guc.cpp:10587 #7 0x2f32a18 in ExecMakeTableFunctionResult(ExprState*, ExprContext*, tupleDesc*, bool, FunctionScanState*) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execQual.cpp:3315 #8 0x30ef222 in FunctionNext /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/nodeFunctionscan.cpp:63 #9 0x2f92698 in ExecScanFetch /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execScan.cpp:83 #10 0x2f92b9b in ExecScan(ScanState*, TupleTableSlot* (*)(ScanState*), bool (*)(ScanState*, TupleTableSlot*)) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execScan.cpp:172 #11 0x30ef2f7 in ExecFunctionScan /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/nodeFunctionscan.cpp:96 #12 0x2f1fe41 in ExecProcNodeFirst /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execProcnode.cpp:788 #13 0x2effbdb in ExecProcNode ../../../../src/include/executor/executor.h:295 #14 0x2f0c208 in ExecutePlan /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execMain.cpp:2301 #15 0x2f03813 in standard_ExecutorRun(QueryDesc*, ScanDirection, long) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execMain.cpp:685 #16 0x29e5355 in explain_ExecutorRun /data/bomou/og/openGauss-server/src/gausskernel/optimizer/commands/auto_explain.cpp:122 #17 0x2f0249c in ExecutorRun(QueryDesc*, ScanDirection, long) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execMain.cpp:523 #18 0x2d54d16 in PortalRunSelect /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/pquery.cpp:1457 #19 0x2d52e20 in PortalRun(PortalData*, long, bool, _DestReceiver*, _DestReceiver*, char*) /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/pquery.cpp:1175 #20 0x2d19c76 in exec_simple_query /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/postgres.cpp:3088 #21 0x2d372b4 in PostgresMain(int, char**, char const*, char const*) /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/postgres.cpp:9355 #22 0x2b8328d in BackendRun /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:9750 #23 0x2ba66a8 in int GaussDbThreadMain<(knl_thread_role)1>(knl_thread_arg*) /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:14431 #24 0x2b9eb7a in InternalThreadFunc /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:15079 #25 0x487a8f1 in ThreadStarterFunc /data/bomou/og/openGauss-server/src/common/port/gs_thread.cpp:383 #26 0x7f4c606aefec (/lib64/libpthread.so.0+0x8fec) 0x604000a80000 is located 0 bytes to the right of 48-byte region [0x604000a7ffd0,0x604000a80000) allocated by thread T98 (worker) here: #0 0x7f4c71be7faf in __interceptor_malloc ../../.././libsanitizer/asan/asan_malloc_linux.cpp:145 #1 0x1b5a949 in void* MemoryProtectFunctions::gs_memprot_malloc<(MemType)0>(unsigned long, bool) /data/bomou/og/openGauss-server/src/common/backend/utils/mmgr/memprot.cpp:834 #2 0x1b69c3f in DoAllocMemoryInternal(MemoryContextData*, unsigned long, char const*, int, MemoryProtectFuncDef*, bool, bool) /data/bomou/og/openGauss-server/src/common/backend/utils/mmgr/AsanMemoryAllocator.cpp:474 #3 0x1b6e43c in void* AsanMemoryAllocator::AllocSetAlloc<true, false, false>(MemoryContextData*, unsigned long, unsigned long, char const*, int) /data/bomou/og/openGauss-server/src/common/backend/utils/mmgr/AsanMemoryAllocator.cpp:556 #4 0x1b43214 in MemoryAllocFromContext(MemoryContextData*, unsigned long, char const*, int) /data/bomou/og/openGauss-server/src/common/backend/utils/mmgr/mcxt.cpp:1197 #5 0x1b434c4 in MemoryContextAllocDebug(MemoryContextData*, unsigned long, char const*, int) /data/bomou/og/openGauss-server/src/common/backend/utils/mmgr/mcxt.cpp:1234 #6 0x1b465f3 in MemoryContextStrdupDebug(MemoryContextData*, char const*, char const*, int) /data/bomou/og/openGauss-server/src/common/backend/utils/mmgr/mcxt.cpp:1877 #7 0x1adc3d1 in _ShowOption /data/bomou/og/openGauss-server/src/common/backend/utils/misc/guc.cpp:10810 #8 0x1ad78e3 in GetConfigOptionByNum(int, char const**, bool*) /data/bomou/og/openGauss-server/src/common/backend/utils/misc/guc.cpp:10174 #9 0x1adac86 in show_all_settings(FunctionCallInfoData*) /data/bomou/og/openGauss-server/src/common/backend/utils/misc/guc.cpp:10574 #10 0x2f32a18 in ExecMakeTableFunctionResult(ExprState*, ExprContext*, tupleDesc*, bool, FunctionScanState*) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execQual.cpp:3315 #11 0x30ef222 in FunctionNext /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/nodeFunctionscan.cpp:63 #12 0x2f92698 in ExecScanFetch /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execScan.cpp:83 #13 0x2f92b9b in ExecScan(ScanState*, TupleTableSlot* (*)(ScanState*), bool (*)(ScanState*, TupleTableSlot*)) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execScan.cpp:172 #14 0x30ef2f7 in ExecFunctionScan /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/nodeFunctionscan.cpp:96 #15 0x2f1fe41 in ExecProcNodeFirst /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execProcnode.cpp:788 #16 0x2effbdb in ExecProcNode ../../../../src/include/executor/executor.h:295 #17 0x2f0c208 in ExecutePlan /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execMain.cpp:2301 #18 0x2f03813 in standard_ExecutorRun(QueryDesc*, ScanDirection, long) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execMain.cpp:685 #19 0x29e5355 in explain_ExecutorRun /data/bomou/og/openGauss-server/src/gausskernel/optimizer/commands/auto_explain.cpp:122 #20 0x2f0249c in ExecutorRun(QueryDesc*, ScanDirection, long) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execMain.cpp:523 #21 0x2d54d16 in PortalRunSelect /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/pquery.cpp:1457 #22 0x2d52e20 in PortalRun(PortalData*, long, bool, _DestReceiver*, _DestReceiver*, char*) /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/pquery.cpp:1175 #23 0x2d19c76 in exec_simple_query /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/postgres.cpp:3088 #24 0x2d372b4 in PostgresMain(int, char**, char const*, char const*) /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/postgres.cpp:9355 #25 0x2b8328d in BackendRun /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:9750 #26 0x2ba66a8 in int GaussDbThreadMain<(knl_thread_role)1>(knl_thread_arg*) /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:14431 #27 0x2b9eb7a in InternalThreadFunc /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:15079 #28 0x487a8f1 in ThreadStarterFunc /data/bomou/og/openGauss-server/src/common/port/gs_thread.cpp:383 #29 0x7f4c606aefec (/lib64/libpthread.so.0+0x8fec) SUMMARY: AddressSanitizer: heap-buffer-overflow ../../.././libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:806 in __interceptor_memcpy Shadow bytes around the buggy address: 0x0c0880147fb0: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd 0x0c0880147fc0: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd 0x0c0880147fd0: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd 0x0c0880147fe0: fa fa fd fd fd fd fd fd fa fa 00 00 00 00 00 00 0x0c0880147ff0: fa fa fd fd fd fd fd fd fa fa 00 00 00 00 00 00 =>0x0c0880148000:[fa]fa fd fd fd fd fd fd fa fa fa fa fa fa fa fa 0x0c0880148010: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd 0x0c0880148020: fa fa fd fd fd fd fd fd fa fa fa fa fa fa fa fa 0x0c0880148030: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd 0x0c0880148040: fa fa fd fd fd fd fd fd fa fa fa fa fa fa fa fa 0x0c0880148050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc 【原因分析】: 1. 这个问题的根因 2. 问题推断过程 3. 还有哪些原因可能造成类似现象 4. 该问题是否有临时规避措施 5. 问题解决方案 6. 预计修复问题时间 【日志信息】(请附上日志文件、截图、coredump信息): 【测试代码】:
【标题描述】: 工具测试是发现内存泄露 【测试类型:SQL功能】【测试版本:7.0.0】工具测试是发现内存泄露 【操作系统和硬件信息】(查询命令: cat /etc/system-release, uname -a): 【测试环境】(单机/1主x备x级联备): 【被测功能】: 【测试类型】: 【数据库版本】(查询命令: gaussdb -V): 【预置条件】: 【操作步骤】(请填写详细的操作步骤): 1. 执行编译: ./configure --gcc-version=10.3.1 CC=g++ CFLAGS='-O0 -D__USE_NUMA -D__ARM_LSE' --prefix=$GAUSSHOME --3rd=$BINARYLIBS --enable-debug --enable-cassert --enable-mot --enable-thread-safety --with-readline --without-zlib --enable-memory-check make -sj make install -sj 2.执行测试 make plugin_check 【预期输出】: 无内存泄露 【实际输出】: ================================================================= ==1986510==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x604000a80000 at pc 0x7f4c71b7ac91 bp 0x7f4bce991830 sp 0x7f4bce990fe0 READ of size 11 at 0x604000a80000 thread T98 (worker) #0 0x7f4c71b7ac90 in __interceptor_strlen ../../.././libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:370 #1 0x7f4c4b3f49ac in cstring_to_text(char const*) /data/bomou/og/openGauss-server/contrib/dolphin/plugin_utils/adt/varlena.cpp:438 #2 0x7f4c4b3fcc14 in textin(FunctionCallInfoData*) /data/bomou/og/openGauss-server/contrib/dolphin/plugin_utils/adt/varlena.cpp:1143 #3 0x19d8237 in InputFunctionCall(FmgrInfo*, char*, unsigned int, int, bool, unsigned int) /data/bomou/og/openGauss-server/src/common/backend/utils/fmgr/fmgr.cpp:2220 #4 0x2f98e0e in BuildTupleFromCStrings(AttInMetadata*, char**) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execTuples.cpp:951 #5 0x1adae73 in show_all_settings(FunctionCallInfoData*) /data/bomou/og/openGauss-server/src/common/backend/utils/misc/guc.cpp:10587 #6 0x2f32a18 in ExecMakeTableFunctionResult(ExprState*, ExprContext*, tupleDesc*, bool, FunctionScanState*) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execQual.cpp:3315 #7 0x30ef222 in FunctionNext /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/nodeFunctionscan.cpp:63 #8 0x2f92698 in ExecScanFetch /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execScan.cpp:83 #9 0x2f92b9b in ExecScan(ScanState*, TupleTableSlot* (*)(ScanState*), bool (*)(ScanState*, TupleTableSlot*)) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execScan.cpp:172 #10 0x30ef2f7 in ExecFunctionScan /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/nodeFunctionscan.cpp:96 #11 0x2f1fe41 in ExecProcNodeFirst /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execProcnode.cpp:788 #12 0x2effbdb in ExecProcNode ../../../../src/include/executor/executor.h:295 #13 0x2f0c208 in ExecutePlan /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execMain.cpp:2301 #14 0x2f03813 in standard_ExecutorRun(QueryDesc*, ScanDirection, long) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execMain.cpp:685 #15 0x29e5355 in explain_ExecutorRun /data/bomou/og/openGauss-server/src/gausskernel/optimizer/commands/auto_explain.cpp:122 #16 0x2f0249c in ExecutorRun(QueryDesc*, ScanDirection, long) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execMain.cpp:523 #17 0x2d54d16 in PortalRunSelect /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/pquery.cpp:1457 #18 0x2d52e20 in PortalRun(PortalData*, long, bool, _DestReceiver*, _DestReceiver*, char*) /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/pquery.cpp:1175 #19 0x2d19c76 in exec_simple_query /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/postgres.cpp:3088 #20 0x2d372b4 in PostgresMain(int, char**, char const*, char const*) /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/postgres.cpp:9355 #21 0x2b8328d in BackendRun /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:9750 #22 0x2ba66a8 in int GaussDbThreadMain<(knl_thread_role)1>(knl_thread_arg*) /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:14431 #23 0x2b9eb7a in InternalThreadFunc /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:15079 #24 0x487a8f1 in ThreadStarterFunc /data/bomou/og/openGauss-server/src/common/port/gs_thread.cpp:383 #25 0x7f4c606aefec (/lib64/libpthread.so.0+0x8fec) 0x604000a80000 is located 0 bytes to the right of 48-byte region [0x604000a7ffd0,0x604000a80000) allocated by thread T98 (worker) here: #0 0x7f4c71be7faf in __interceptor_malloc ../../.././libsanitizer/asan/asan_malloc_linux.cpp:145 #1 0x1b5a949 in void* MemoryProtectFunctions::gs_memprot_malloc<(MemType)0>(unsigned long, bool) /data/bomou/og/openGauss-server/src/common/backend/utils/mmgr/memprot.cpp:834 #2 0x1b69c3f in DoAllocMemoryInternal(MemoryContextData*, unsigned long, char const*, int, MemoryProtectFuncDef*, bool, bool) /data/bomou/og/openGauss-server/src/common/backend/utils/mmgr/AsanMemoryAllocator.cpp:474 #3 0x1b6e43c in void* AsanMemoryAllocator::AllocSetAlloc<true, false, false>(MemoryContextData*, unsigned long, unsigned long, char const*, int) /data/bomou/og/openGauss-server/src/common/backend/utils/mmgr/AsanMemoryAllocator.cpp:556 #4 0x1b43214 in MemoryAllocFromContext(MemoryContextData*, unsigned long, char const*, int) /data/bomou/og/openGauss-server/src/common/backend/utils/mmgr/mcxt.cpp:1197 #5 0x1b434c4 in MemoryContextAllocDebug(MemoryContextData*, unsigned long, char const*, int) /data/bomou/og/openGauss-server/src/common/backend/utils/mmgr/mcxt.cpp:1234 #6 0x1b465f3 in MemoryContextStrdupDebug(MemoryContextData*, char const*, char const*, int) /data/bomou/og/openGauss-server/src/common/backend/utils/mmgr/mcxt.cpp:1877 #7 0x1adc3d1 in _ShowOption /data/bomou/og/openGauss-server/src/common/backend/utils/misc/guc.cpp:10810 #8 0x1ad78e3 in GetConfigOptionByNum(int, char const**, bool*) /data/bomou/og/openGauss-server/src/common/backend/utils/misc/guc.cpp:10174 #9 0x1adac86 in show_all_settings(FunctionCallInfoData*) /data/bomou/og/openGauss-server/src/common/backend/utils/misc/guc.cpp:10574 #10 0x2f32a18 in ExecMakeTableFunctionResult(ExprState*, ExprContext*, tupleDesc*, bool, FunctionScanState*) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execQual.cpp:3315 #11 0x30ef222 in FunctionNext /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/nodeFunctionscan.cpp:63 #12 0x2f92698 in ExecScanFetch /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execScan.cpp:83 #13 0x2f92b9b in ExecScan(ScanState*, TupleTableSlot* (*)(ScanState*), bool (*)(ScanState*, TupleTableSlot*)) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execScan.cpp:172 #14 0x30ef2f7 in ExecFunctionScan /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/nodeFunctionscan.cpp:96 #15 0x2f1fe41 in ExecProcNodeFirst /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execProcnode.cpp:788 #16 0x2effbdb in ExecProcNode ../../../../src/include/executor/executor.h:295 #17 0x2f0c208 in ExecutePlan /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execMain.cpp:2301 #18 0x2f03813 in standard_ExecutorRun(QueryDesc*, ScanDirection, long) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execMain.cpp:685 #19 0x29e5355 in explain_ExecutorRun /data/bomou/og/openGauss-server/src/gausskernel/optimizer/commands/auto_explain.cpp:122 #20 0x2f0249c in ExecutorRun(QueryDesc*, ScanDirection, long) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execMain.cpp:523 #21 0x2d54d16 in PortalRunSelect /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/pquery.cpp:1457 #22 0x2d52e20 in PortalRun(PortalData*, long, bool, _DestReceiver*, _DestReceiver*, char*) /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/pquery.cpp:1175 #23 0x2d19c76 in exec_simple_query /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/postgres.cpp:3088 #24 0x2d372b4 in PostgresMain(int, char**, char const*, char const*) /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/postgres.cpp:9355 #25 0x2b8328d in BackendRun /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:9750 #26 0x2ba66a8 in int GaussDbThreadMain<(knl_thread_role)1>(knl_thread_arg*) /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:14431 #27 0x2b9eb7a in InternalThreadFunc /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:15079 #28 0x487a8f1 in ThreadStarterFunc /data/bomou/og/openGauss-server/src/common/port/gs_thread.cpp:383 #29 0x7f4c606aefec (/lib64/libpthread.so.0+0x8fec) Thread T98 (worker) created by T0 here: #0 0x7f4c71b933e2 in __interceptor_pthread_create ../../.././libsanitizer/asan/asan_interceptors.cpp:214 #1 0x487b707 in gs_thread_create_ex(gs_thread_t*, void* (*)(void*), int, void*, cpu_set_t*) /data/bomou/og/openGauss-server/src/common/port/gs_thread.cpp:824 #2 0x2b9ed50 in initialize_thread(ThreadArg*) /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:15095 #3 0x2b9f6a5 in initialize_worker_thread(knl_thread_role, Port*, void*) /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:15179 #4 0x2b804a1 in BackendStartup /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:9275 #5 0x2b5df05 in ServerLoop /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:4113 #6 0x2b57d27 in PostmasterMain(int, char**) /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:3202 #7 0x2ac13a6 in main /data/bomou/og/openGauss-server/src/gausskernel/process/main/main.cpp:352 #8 0x7f4c6050ab66 in __libc_start_main (/lib64/libc.so.6+0x25b66) SUMMARY: AddressSanitizer: heap-buffer-overflow ../../.././libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:370 in __interceptor_strlen Shadow bytes around the buggy address: 0x0c0880147fb0: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd 0x0c0880147fc0: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd 0x0c0880147fd0: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd 0x0c0880147fe0: fa fa fd fd fd fd fd fd fa fa 00 00 00 00 00 00 0x0c0880147ff0: fa fa fd fd fd fd fd fd fa fa 00 00 00 00 00 00 =>0x0c0880148000:[fa]fa fd fd fd fd fd fd fa fa fa fa fa fa fa fa 0x0c0880148010: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd 0x0c0880148020: fa fa fd fd fd fd fd fd fa fa fa fa fa fa fa fa 0x0c0880148030: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd 0x0c0880148040: fa fa fd fd fd fd fd fd fa fa fa fa fa fa fa fa 0x0c0880148050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc ================================================================= ==1986510==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x604000a80000 at pc 0x7f4c71b77b03 bp 0x7f4bce9917e0 sp 0x7f4bce990f90 READ of size 10 at 0x604000a80000 thread T98 (worker) #0 0x7f4c71b77b02 in __interceptor_memcpy ../../.././libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:806 #1 0x4a5e1a2 in memcpy_s (/data/bomou/og/openGauss-server/contrib/dolphin/tmp_check/install/data/bomou/og/install/bin/gaussdb+0x4a5e1a2) #2 0x7f4c4b3f49be in cstring_to_text(char const*) /data/bomou/og/openGauss-server/contrib/dolphin/plugin_utils/adt/varlena.cpp:438 #3 0x7f4c4b3fcc14 in textin(FunctionCallInfoData*) /data/bomou/og/openGauss-server/contrib/dolphin/plugin_utils/adt/varlena.cpp:1143 #4 0x19d8237 in InputFunctionCall(FmgrInfo*, char*, unsigned int, int, bool, unsigned int) /data/bomou/og/openGauss-server/src/common/backend/utils/fmgr/fmgr.cpp:2220 #5 0x2f98e0e in BuildTupleFromCStrings(AttInMetadata*, char**) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execTuples.cpp:951 #6 0x1adae73 in show_all_settings(FunctionCallInfoData*) /data/bomou/og/openGauss-server/src/common/backend/utils/misc/guc.cpp:10587 #7 0x2f32a18 in ExecMakeTableFunctionResult(ExprState*, ExprContext*, tupleDesc*, bool, FunctionScanState*) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execQual.cpp:3315 #8 0x30ef222 in FunctionNext /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/nodeFunctionscan.cpp:63 #9 0x2f92698 in ExecScanFetch /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execScan.cpp:83 #10 0x2f92b9b in ExecScan(ScanState*, TupleTableSlot* (*)(ScanState*), bool (*)(ScanState*, TupleTableSlot*)) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execScan.cpp:172 #11 0x30ef2f7 in ExecFunctionScan /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/nodeFunctionscan.cpp:96 #12 0x2f1fe41 in ExecProcNodeFirst /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execProcnode.cpp:788 #13 0x2effbdb in ExecProcNode ../../../../src/include/executor/executor.h:295 #14 0x2f0c208 in ExecutePlan /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execMain.cpp:2301 #15 0x2f03813 in standard_ExecutorRun(QueryDesc*, ScanDirection, long) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execMain.cpp:685 #16 0x29e5355 in explain_ExecutorRun /data/bomou/og/openGauss-server/src/gausskernel/optimizer/commands/auto_explain.cpp:122 #17 0x2f0249c in ExecutorRun(QueryDesc*, ScanDirection, long) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execMain.cpp:523 #18 0x2d54d16 in PortalRunSelect /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/pquery.cpp:1457 #19 0x2d52e20 in PortalRun(PortalData*, long, bool, _DestReceiver*, _DestReceiver*, char*) /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/pquery.cpp:1175 #20 0x2d19c76 in exec_simple_query /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/postgres.cpp:3088 #21 0x2d372b4 in PostgresMain(int, char**, char const*, char const*) /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/postgres.cpp:9355 #22 0x2b8328d in BackendRun /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:9750 #23 0x2ba66a8 in int GaussDbThreadMain<(knl_thread_role)1>(knl_thread_arg*) /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:14431 #24 0x2b9eb7a in InternalThreadFunc /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:15079 #25 0x487a8f1 in ThreadStarterFunc /data/bomou/og/openGauss-server/src/common/port/gs_thread.cpp:383 #26 0x7f4c606aefec (/lib64/libpthread.so.0+0x8fec) 0x604000a80000 is located 0 bytes to the right of 48-byte region [0x604000a7ffd0,0x604000a80000) allocated by thread T98 (worker) here: #0 0x7f4c71be7faf in __interceptor_malloc ../../.././libsanitizer/asan/asan_malloc_linux.cpp:145 #1 0x1b5a949 in void* MemoryProtectFunctions::gs_memprot_malloc<(MemType)0>(unsigned long, bool) /data/bomou/og/openGauss-server/src/common/backend/utils/mmgr/memprot.cpp:834 #2 0x1b69c3f in DoAllocMemoryInternal(MemoryContextData*, unsigned long, char const*, int, MemoryProtectFuncDef*, bool, bool) /data/bomou/og/openGauss-server/src/common/backend/utils/mmgr/AsanMemoryAllocator.cpp:474 #3 0x1b6e43c in void* AsanMemoryAllocator::AllocSetAlloc<true, false, false>(MemoryContextData*, unsigned long, unsigned long, char const*, int) /data/bomou/og/openGauss-server/src/common/backend/utils/mmgr/AsanMemoryAllocator.cpp:556 #4 0x1b43214 in MemoryAllocFromContext(MemoryContextData*, unsigned long, char const*, int) /data/bomou/og/openGauss-server/src/common/backend/utils/mmgr/mcxt.cpp:1197 #5 0x1b434c4 in MemoryContextAllocDebug(MemoryContextData*, unsigned long, char const*, int) /data/bomou/og/openGauss-server/src/common/backend/utils/mmgr/mcxt.cpp:1234 #6 0x1b465f3 in MemoryContextStrdupDebug(MemoryContextData*, char const*, char const*, int) /data/bomou/og/openGauss-server/src/common/backend/utils/mmgr/mcxt.cpp:1877 #7 0x1adc3d1 in _ShowOption /data/bomou/og/openGauss-server/src/common/backend/utils/misc/guc.cpp:10810 #8 0x1ad78e3 in GetConfigOptionByNum(int, char const**, bool*) /data/bomou/og/openGauss-server/src/common/backend/utils/misc/guc.cpp:10174 #9 0x1adac86 in show_all_settings(FunctionCallInfoData*) /data/bomou/og/openGauss-server/src/common/backend/utils/misc/guc.cpp:10574 #10 0x2f32a18 in ExecMakeTableFunctionResult(ExprState*, ExprContext*, tupleDesc*, bool, FunctionScanState*) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execQual.cpp:3315 #11 0x30ef222 in FunctionNext /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/nodeFunctionscan.cpp:63 #12 0x2f92698 in ExecScanFetch /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execScan.cpp:83 #13 0x2f92b9b in ExecScan(ScanState*, TupleTableSlot* (*)(ScanState*), bool (*)(ScanState*, TupleTableSlot*)) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execScan.cpp:172 #14 0x30ef2f7 in ExecFunctionScan /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/nodeFunctionscan.cpp:96 #15 0x2f1fe41 in ExecProcNodeFirst /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execProcnode.cpp:788 #16 0x2effbdb in ExecProcNode ../../../../src/include/executor/executor.h:295 #17 0x2f0c208 in ExecutePlan /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execMain.cpp:2301 #18 0x2f03813 in standard_ExecutorRun(QueryDesc*, ScanDirection, long) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execMain.cpp:685 #19 0x29e5355 in explain_ExecutorRun /data/bomou/og/openGauss-server/src/gausskernel/optimizer/commands/auto_explain.cpp:122 #20 0x2f0249c in ExecutorRun(QueryDesc*, ScanDirection, long) /data/bomou/og/openGauss-server/src/gausskernel/runtime/executor/execMain.cpp:523 #21 0x2d54d16 in PortalRunSelect /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/pquery.cpp:1457 #22 0x2d52e20 in PortalRun(PortalData*, long, bool, _DestReceiver*, _DestReceiver*, char*) /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/pquery.cpp:1175 #23 0x2d19c76 in exec_simple_query /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/postgres.cpp:3088 #24 0x2d372b4 in PostgresMain(int, char**, char const*, char const*) /data/bomou/og/openGauss-server/src/gausskernel/process/tcop/postgres.cpp:9355 #25 0x2b8328d in BackendRun /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:9750 #26 0x2ba66a8 in int GaussDbThreadMain<(knl_thread_role)1>(knl_thread_arg*) /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:14431 #27 0x2b9eb7a in InternalThreadFunc /data/bomou/og/openGauss-server/src/gausskernel/process/postmaster/postmaster.cpp:15079 #28 0x487a8f1 in ThreadStarterFunc /data/bomou/og/openGauss-server/src/common/port/gs_thread.cpp:383 #29 0x7f4c606aefec (/lib64/libpthread.so.0+0x8fec) SUMMARY: AddressSanitizer: heap-buffer-overflow ../../.././libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:806 in __interceptor_memcpy Shadow bytes around the buggy address: 0x0c0880147fb0: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd 0x0c0880147fc0: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd 0x0c0880147fd0: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd 0x0c0880147fe0: fa fa fd fd fd fd fd fd fa fa 00 00 00 00 00 00 0x0c0880147ff0: fa fa fd fd fd fd fd fd fa fa 00 00 00 00 00 00 =>0x0c0880148000:[fa]fa fd fd fd fd fd fd fa fa fa fa fa fa fa fa 0x0c0880148010: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd 0x0c0880148020: fa fa fd fd fd fd fd fd fa fa fa fa fa fa fa fa 0x0c0880148030: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd 0x0c0880148040: fa fa fd fd fd fd fd fd fa fa fa fa fa fa fa fa 0x0c0880148050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc 【原因分析】: 1. 这个问题的根因 2. 问题推断过程 3. 还有哪些原因可能造成类似现象 4. 该问题是否有临时规避措施 5. 问题解决方案 6. 预计修复问题时间 【日志信息】(请附上日志文件、截图、coredump信息): 【测试代码】:
评论 (
2
)
登录
后才可以发表评论
状态
待办的
待办的
已确认
已答复
已取消
挂起
修复中
已完成
待回归
测试中
已验收
负责人
未设置
Celestial
paakmau
负责人
协作者
+负责人
+协作者
douxin
ywzq1161327784
负责人
协作者
+负责人
+协作者
标签
sig/plugin
未设置
项目
未立项任务
未立项任务
里程碑
未关联里程碑
未关联里程碑
Pull Requests
未关联
未关联
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
未关联
分支 (8)
标签 (11)
master
7.0.0-RC2
6.0.0
5.0.0
7.0.0-RC1
3.0.0
5.1.0
3.1.0
v6.0.2
v6.0.1
v6.0.0
v5.0.3
v5.0.2
v6.0.0-RC1
v5.0.1
v5.1.0
v5.0.0
v3.1.0
v2.1.0
开始日期   -   截止日期
-
置顶选项
不置顶
置顶等级:高
置顶等级:中
置顶等级:低
优先级
不指定
严重
主要
次要
不重要
预计工期
(小时)
参与者(2)
1
https://gitee.com/opengauss/Plugin.git
git@gitee.com:opengauss/Plugin.git
opengauss
Plugin
Plugin
点此查找更多帮助
搜索帮助
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册