已关闭
[Bug]: [UB][资源池化] enable_ub开启但UB SDK加载失败时,gaussdb调用空函数指针导致启动阶段CoreDump #8376
zhoucong<Okidoki>创建于  8月5日关闭于  8月18日
zhoucong<Okidoki>
zhoucong<Okidoki>成员
8月5日 创建

测试类型

存储功能

测试版本

7.0.0-RC3

问题描述

enable_ub开启但UB SDK加载失败时,gaussdb启动时调用空函数指针导致启动阶段CoreDump

操作系统和硬件信息

Linux openGauss186 6.6.0-159.4.2.153.20260624.9e7b708a0357.oe2403sp4.aarch64 #1 SMP Thu Jun 25 00:52:39 CST 2026 aarch64 aarch64 aarch64 GNU/Linux

测试环境

资源池化

被测功能

预置条件

操作步骤

触发条件
开启UB,但没有提前将 ubs_mem_path 配置为可访问的绝对路径:

enable_ub = on
ubs_mem_path = 'libubsm_sdk.so'

默认值为相对路径:
cm_ctl stop
cm_ctl start
重启后
pg_log打印如下日志:
WARNING: load matrix mem dynamic lib error: libubsm_sdk.so, lib not exists

并反复core
cluster_state : Unavailable

185 Primary Down CoreDump
186 Standby Starting

core堆栈如下:

Core was generated by:
  /home/lingqv606/openGauss/install/app/bin/gaussdb
  -D /home/lingqv606/openGauss/install/data/dn

Current thread:
  LWP 520728

#0  sys_waitpid(int, int*, int)
#1  BBOX_GetClonePidResult(int, BBOX_ListParams*, int)
#2  BBOX_GetAllThreads(...)
#3  BBOX_CreateCoredump()
#4  BBOX signal processing
#5  <signal handler called>
#6  0x0000000000000000
#7  0x0000aaaac5cc12e0
#8  ubsmem_lookup_regions()
#9  UBMemRegionInit()
#10 PostmasterMain(int, char**)
#11 main()

预期输出

实际输出

gaussdb报错退出

日志信息

gaussdb core

提单组织

内部开发

测试代码

likedislike
zhoucong<Okidoki>zhoucong<Okidoki>成员
8月5日 添加了label:bug
opengauss_bot
opengauss_bot成员
8月5日 评论:

This issue requires an assignee. Since you haven't specified one, we've assigned TestManager as the default assignee for this issue.

likedislike
opengauss_botopengauss_bot成员
8月5日 将 TestManager 设为负责人
opengauss_botopengauss_bot成员
8月5日 添加了label:sig/StorageEngine,sig/AI,sig/CM,sig/CloudNative,sig/SecurityTechnology,sig/SQLEngine
opengauss_bot
opengauss_bot成员
8月5日 评论:

Welcome To openGauss Community

Hey @congzhou2603 , thanks for your contribution to the community.

Bot Usage Manual

I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands.

Contact Guide

If you have any questions, please contact the SIG: StorageEngine, AI, CM, CloudNative, SecurityTechnology, SQLEngine ,
and any of the maintainers: @CarrotGo, @chendong76, @chenxiaobin19, @congzhou2603, @dodders, @hwworkholic, @jemappellehc, @muyulinzhong, @quemingjian, @shenzheng4, @shirley_zhengx, @superlchf, @totaj, @wlff234, @wofanzheng, @ywzq1161327784 ,
and any of the committers: @Igali, @bihua111, @cailei19, @h_ray, @levy53071, @libiao2024, @lihaixiao, @mrzack, @wangfeihuo, @wuyuechuan, @xiong_xjun, @zhangfengzhi123, @zhangxubo, @zhangzq131, @zjh_hw .

likedislike
zhoucong<Okidoki>zhoucong<Okidoki>成员
8月5日 issue优先级由 无优先级 改变为 次要
zhoucong<Okidoki>zhoucong<Okidoki>成员
8月5日 将 congzhou2603 设为负责人
sungang14sungang14成员
8月6日 关联了看板:openGauss 7.0.0-LTS
muyulinzhongmuyulinzhong成员
8月7日 移除了负责人 TestManager
zhoucong<Okidoki>zhoucong<Okidoki>成员
8月10日 关联了pull request:调整ss_init_clog_size最小值为0
zhoucong<Okidoki>zhoucong<Okidoki>成员
8月11日 关联了pull request:bugfix ubs_mem_path加载失败场景,数据库报错退出
zhoucong<Okidoki>
zhoucong<Okidoki>成员
8月12日 评论:
  1. om安装资源池化集群.删除安装包自带的libstdc++.so
[l30072648@node01 ~]$ ldd $GAUSSHOME/bin/gaussdb | grep c++
        libstdc++.so.6 => /home/l30072648/openGauss/install/app/lib/libstdc++.so                                                                                                                        .6 (0x0000ffff66030000)
[l30072648@node01 ~]$ mv /home/l30072648/openGauss/install/app/lib/libstdc++.so.                                                                                                                        6 /home/l30072648/openGauss/install/app/lib/libstdc++.so.6_bk
[l30072648@node01 ~]$ ldd $GAUSSHOME/bin/gaussdb | grep c++                                                                                                                                                     libstdc++.so.6 => /home/l30072648/openGauss/install/om/script/gspylib/cl                                                                                                                        ib/libstdc++.so.6 (0x0000ffff4ed50000)
[l30072648@node01 ~]$ mv /home/l30072648/openGauss/install/om/script/gspylib/cli                                                                                                                        b/libstdc++.so.6 /home/l30072648/openGauss/install/om/script/gspylib/clib/libstd                                                                                                                        c++.so.6_bk
[l30072648@node01 ~]$ ssh node02

Authorized users only. All activities may be monitored and reported.

Authorized users only. All activities may be monitored and reported.
Last login: Wed Aug 12 15:32:46 2026


Welcome to 6.6.0-159.4.2.153.20260624.9e7b708a0357.oe2403sp4.aarch64

System information as of time:  Wed Aug 12 03:40:03 PM CST 2026

System load:    14.17
Memory used:    41.8%
Swap used:      50.0%
Usage On:       13%
IP address:     20.20.20.75
IP address:     30.0.0.75
Users online:   6
To run a command as administrator(user "root"),use "sudo <command>".
[l30072648@node02 ~]$ ldd $GAUSSHOME/bin/gaussdb  | grep libstdc++
ldd: /bin/gaussdb: No such file or directory
[l30072648@node02 ~]$ source ~/ENVFILE
[l30072648@node02 ~]$ ldd $GAUSSHOME/bin/gaussdb  | grep libstdc++
        libstdc++.so.6 => /home/l30072648/openGauss/install/app/lib/libstdc++.so                                                                                                                        .6 (0x0000ffff5b8f0000)
[l30072648@node02 ~]$ mv /home/l30072648/openGauss/install/app/lib/libstdc++.so.                                                                                                                        6 /home/l30072648/openGauss/install/app/lib/libstdc++.so.6_bk
[l30072648@node02 ~]$ ldd $GAUSSHOME/bin/gaussdb  | grep libstdc++                                                                                                                                              libstdc++.so.6 => /home/l30072648/openGauss/install/om/script/gspylib/cl                                                                                                                        ib/libstdc++.so.6 (0x0000ffff5f620000)
[l30072648@node02 ~]$ mv /home/l30072648/openGauss/install/app/lib/libstdc++.so.                                                                                                                        6 /home/l30072648/openGauss/install/app/lib/libstdc++.so.6_bk^C
[l30072648@node02 ~]$ mv /home/l30072648/openGauss/install/om/script/gspylib/cli                                                                                                                        b/libstdc++.so.6 /home/l30072648/openGauss/install/om/script/gspylib/clib/libstd                                                                                                                        c++.so.6_bk
[l30072648@node02 ~]$ ldd^CGAUSSHOME/bin/gaussdb  | grep libstdc++
[l30072648@node02 ~]$ exit
logout
Connection to node02 closed.
  1. 配置灵衢参数,重启成功
[l30072648@node01 ~]$ gs_guc reload -N all -I all -c "ubs_mem_path = '/usr/local                                                                                                                        /ubs_mem/lib/libubsm_sdk.so'"
The gs_guc run with the following arguments: [gs_guc -N all -I all -c ubs_mem_pa                                                                                                                        th = '/usr/local/ubs_mem/lib/libubsm_sdk.so' reload ].
Begin to perform the total nodes: 2.
Popen count is 2, Popen success count is 2, Popen failure count is 0.
Begin to perform gs_guc for datanodes.
Command count is 2, Command success count is 2, Command failure count is 0.

Total instances: 2. Failed instances: 0.
ALL: Success to perform gs_guc!


[l30072648@node01 ~]$ gs_guc reload -N all -I all -c "enable_ub = on"
The gs_guc run with the following arguments: [gs_guc -N all -I all -c enable_ub                                                                                                                         = on reload ].
NOTICE: Enable UB feature.
Begin to perform the total nodes: 2.
Popen count is 2, Popen success count is 2, Popen failure count is 0.
Begin to perform gs_guc for datanodes.
Command count is 2, Command success count is 2, Command failure count is 0.

Total instances: 2. Failed instances: 0.
ALL: Success to perform gs_guc!


[l30072648@node01 ~]$ gs_guc reload -N all -I all -c "ss_interconnect_type='SHM'                                                                                                                        "
The gs_guc run with the following arguments: [gs_guc -N all -I all -c ss_interco                                                                                                                        nnect_type='SHM' reload ].
Begin to perform the total nodes: 2.
Popen count is 2, Popen success count is 2, Popen failure count is 0.
Begin to perform gs_guc for datanodes.
Command count is 2, Command success count is 2, Command failure count is 0.

Total instances: 2. Failed instances: 0.
ALL: Success to perform gs_guc!


[l30072648@node01 ~]$ cm_ctl stop; cm_ctl start;
cm_ctl: stop cluster.
cm_ctl: stop nodeid: 1
cm_ctl: stop nodeid: 2
.......................
cm_ctl: stop cluster successfully.
cm_ctl: checking cluster status.
cm_ctl: checking cluster status.
cm_ctl: checking finished in 1534 ms.
cm_ctl: start cluster.
cm_ctl: start nodeid: 1
cm_ctl: start nodeid: 2
.................
cm_ctl: start cluster successfully.
  1. 配置不存在的ubs_mem_path,重启数据库,数据库启动失败,gaussdb未发生core dump,Dbstart打印FATAL日志。
[l30072648@node01 ~]$ gs_guc reload -N all -I all -c "ubs_mem_path = '/usr/local/ubs_mem/lib/libubsm_sdk.so11111'"
The gs_guc run with the following arguments: [gs_guc -N all -I all -c ubs_mem_pa th = '/usr/local/ubs_mem/lib/libubsm_sdk.so11111' reload ].
Begin to perform the total nodes: 2.
Popen count is 2, Popen success count is 2, Popen failure count is 0.
Begin to perform gs_guc for datanodes.
Command count is 2, Command success count is 2, Command failure count is 0.

Total instances: 2. Failed instances: 0.
ALL: Success to perform gs_guc!


[l30072648@node01 ~]$ cm_ctl stop; cm_ctl start;                                                                                                                                                        cm_ctl: stop cluster.
cm_ctl: stop nodeid: 1
cm_ctl: stop nodeid: 2
.........................
cm_ctl: stop cluster successfully.
cm_ctl: checking cluster status.
cm_ctl: checking cluster status.
cm_ctl: checking finished in 1551 ms.
cm_ctl: start cluster.
cm_ctl: start nodeid: 1
cm_ctl: start nodeid: 2
................................................................................                                                                                                                        ................................................................................                                                                                                                        ................................................................................                                                                                                                        ................................................................................                                                                                                                        ................................................................................                                                                                                                        ................................................................................                                                                                                                        ................................................................................                                                                                                                        ......................................
cm_ctl: start cluster failed in (601)s!

HINT: Maybe the cluster is continually being started in the background.
You can wait for a while and check whether the cluster starts, or increase the v                                                                                                                        alue of parameter "-t", e.g -t 600.
[l30072648@node01 ~]$ ll -t /home/core | grep l300
[l30072648@node01 ~]$ cd $GAUSSLOG
[l30072648@node01 l30072648]$ ll
total 40
drwx------ 3 l30072648 l30072648 4096 Aug 12 15:36 asp_data
drwx------ 7 l30072648 l30072648 4096 Aug 12 15:43 bin
drwx------ 7 l30072648 l30072648 4096 Aug 12 15:36 cm
drwx------ 3 l30072648 l30072648 4096 Aug 12 16:33 gs_profile
drwx------ 3 l30072648 l30072648 4096 Aug 12 15:36 mem_log
drwx------ 2 l30072648 l30072648 4096 Aug 12 16:51 om
drwx------ 3 l30072648 l30072648 4096 Aug 12 15:35 pg_audit
drwx------ 6 l30072648 l30072648 4096 Aug 12 15:36 pg_log
drwx------ 3 l30072648 l30072648 4096 Aug 12 15:36 pg_perf
drwx------ 3 l30072648 l30072648 4096 Aug 12 15:36 sql_monitor
[l30072648@node01 l30072648]$ cd pg_log
[l30072648@node01 pg_log]$ ll
total 16
drwx------ 3 l30072648 l30072648 4096 Aug 12 15:36 DMS
drwx------ 2 l30072648 l30072648 4096 Aug 12 16:14 dn_6001
drwx------ 4 l30072648 l30072648 4096 Aug 12 15:35 DSS
drwx------ 2 l30072648 l30072648 4096 Aug 12 15:36 trc
[l30072648@node01 pg_log]$ cd dn_6001/
[l30072648@node01 dn_6001]$ ll
total 280
-rw------- 1 l30072648 l30072648   8145 Aug 12 16:14 postgresql-2026-08-12_15362                                                                                                                        3.log.gz
-rw------- 1 l30072648 l30072648 275195 Aug 12 16:33 postgresql-2026-08-12_15441                                                                                                                        7.log
[l30072648@node01 dn_6001]$ vim postgresql-2026-08-12_15441
[l30072648@node01 dn_6001]$ cd $PGDATA
[l30072648@node01 dn]$ ll
total 5392
drwx------ 5 l30072648 l30072648    4096 Aug 12 15:35 base
-rw------- 1 l30072648 l30072648    5848 Aug 12 15:34 cacert.pem
-rw------- 1 l30072648 l30072648    9429 Aug 12 16:33 config_exec_params
-rw------- 1 l30072648 l30072648   67529 Aug 12 16:34 DBstart.log
-rw------- 1 l30072648 l30072648  277976 Aug 12 16:51 dms_control.log
-rw------- 1 l30072648 l30072648      72 Aug 12 16:34 gaussdb.state
drwx------ 3 l30072648 l30072648    4096 Aug 12 16:33 global
-rw------- 1 l30072648 l30072648     354 Aug 12 15:35 gs_gazelle.conf
-rw------- 1 l30072648 l30072648 4915200 Aug 12 15:36 gswlm_userinfo.cfg
-rw------- 1 l30072648 l30072648   21016 Aug 12 15:35 mot.conf
drwx------ 2 l30072648 l30072648    4096 Aug 12 15:35 pg_clog
drwx------ 2 l30072648 l30072648    4096 Aug 12 15:35 pg_csnlog
-rw------- 1 l30072648 l30072648    1024 Aug 12 15:35 pg_ctl.lock
drwx------ 2 l30072648 l30072648    4096 Aug 12 15:35 pg_errorinfo
-rw------- 1 l30072648 l30072648    4821 Aug 12 15:36 pg_hba.conf
-rw------- 1 l30072648 l30072648    4821 Aug 12 15:36 pg_hba.conf.bak
-rw------- 1 l30072648 l30072648    1024 Aug 12 15:36 pg_hba.conf.lock
-rw------- 1 l30072648 l30072648    1636 Aug 12 15:35 pg_ident.conf
drwx------ 4 l30072648 l30072648    4096 Aug 12 15:35 pg_llog
drwx------ 2 l30072648 l30072648    4096 Aug 12 15:35 pg_logical
drwx------ 4 l30072648 l30072648    4096 Aug 12 15:35 pg_multixact
drwx------ 2 l30072648 l30072648    4096 Aug 12 15:44 pg_notify
-rw------- 1 l30072648 l30072648      24 Aug 12 15:44 pg_remain_segs
drwx------ 2 l30072648 l30072648    4096 Aug 12 15:35 pg_snapshots
-rw------- 1 l30072648 l30072648       4 Aug 12 15:35 PG_VERSION
drwx------ 3 l30072648 l30072648    4096 Aug 12 15:35 pg_xlog
-rw------- 1 l30072648 l30072648   39978 Aug 12 16:33 postgresql.conf
-rw------- 1 l30072648 l30072648   39978 Aug 12 16:33 postgresql.conf.guc.bak
-rw------- 1 l30072648 l30072648    1024 Aug 12 15:35 postgresql.conf.lock
-rw------- 1 l30072648 l30072648      99 Aug 12 15:44 postmaster.opts
-rw------- 1 l30072648 l30072648       0 Aug 12 15:35 postmaster.pid.lock
-rw------- 1 l30072648 l30072648    5741 Aug 12 15:34 server.crt
-rw------- 1 l30072648 l30072648    2654 Aug 12 15:34 server.key
-rw------- 1 l30072648 l30072648      56 Aug 12 15:34 server.key.cipher
-rw------- 1 l30072648 l30072648      24 Aug 12 15:34 server.key.rand
drwx------ 2 l30072648 l30072648    4096 Aug 12 15:35 ss_pgsql_tmp
[l30072648@node01 dn]$ tail DBstart.log

0 WARNING:  failed to open feature control file, please check whether it exists: FileName=gaussdb.version, Errno=2, Errmessage=No such file or directory.
0 WARNING:  failed to parse feature control file: gaussdb.version.
0 WARNING:  Failed to load the product control file, so gaussdb cannot distinguish product version.
2026-08-12 16:34:21.614 6a7c300d.1 [unknown] 281473434693696 [unknown] 0 dn_6001_6002 00000  0 [BACKEND] LOG:  base_page_saved_interval is 400, ori is 400.
2026-08-12 16:34:21.620 6a7c300d.1 [unknown] 281473434693696 [unknown] 0 dn_6001_6002 DB010  0 [REDO] LOG:  Recovery parallelism, cpu count = 308, max = 4, actual = 4
2026-08-12 16:34:21.620 6a7c300d.1 [unknown] 281473434693696 [unknown] 0 dn_6001_6002 DB010  0 [REDO] LOG:  ConfigRecoveryParallelism, true_max_recovery_parallelism:4, max_recovery_parallelism:4
2026-08-12 16:34:21.622 6a7c300d.1 [unknown] 281473434693696 [unknown] 0 dn_6001_6002 00000  0 [BACKEND] LOG:  loaded library "security_plugin"
2026-08-12 16:34:21.622 6a7c300d.1 [unknown] 281473434693696 [unknown] 0 dn_6001_6002 01000  0 [BACKEND] WARNING:  could not create any HA TCP/IP sockets
2026-08-12 16:34:21.623 6a7c300d.1 [unknown] 281473434693696 [unknown] 0 dn_6001_6002 42809  0 [BACKEND] FATAL:  load matrix mem dynamic lib error: /usr/local/ubs_mem/lib/libubsm_sdk.so11111, lib not exists
[l30072648@node01 dn]$
likedislike
zhoucong<Okidoki>zhoucong<Okidoki>成员
8月12日 issue状态由 待办的 改变为 待回归
l1azzzy
l1azzzy成员
8月18日 评论:

验收日期:2026-8-18
验收版本:7.0.0.B018
验收结论:验收通过
image.png

likedislike
l1azzzyl1azzzy成员
8月18日 issue状态由 待回归 改变为 已验收
l1azzzyl1azzzy成员
8月18日 关闭了 issue