VastBase數據庫Crash后使用gdb收集coredump信息
🐘 數據庫版本:VastBase G100 V3.0.8
檢查數據庫崩潰后生成的core文件:
[vbdba@dbhost vastbase]$ ll -h core*
-rw------- 1 vbdba vbdba 62G Aug 20 20:02 core-vastbase-162199-2025_08_20_19_57_57-bbox.lz4
-rw------- 1 vbdba vbdba 19G Aug 21 10:38 core-vastbase-290510-2025_08_21_10_36_30-bbox.lz4
解壓縮core的lz4文件:
yum install -y lz4 lz4-devel
cd /vastdata/vbdba/vastbase
lz4 -d core-vastbase-162199-2025_08_20_19_57_57-bbox.lz4
lz4 -d core-vastbase-290510-2025_08_21_10_36_30-bbox.lz4
示例:
[vbdba@dbhost vastbase]$ lz4 -d core-vastbase-162199-2025_08_20_19_57_57-bbox.lz4
Decoding file core-vastbase-162199-2025_08_20_19_57_57-bbox
core-vastbase-162199 : decoded 317710009344 bytes[vbdba@dbhost vastbase]$ lz4 -d core-vastbase-290510-2025_08_21_10_36_30-bbox.lz4
Decoding file core-vastbase-290510-2025_08_21_10_36_30-bbox
core-vastbase-290510 : decoded 145732015104 bytes
[vbdba@dbhost vastbase]$
[vbdba@dbhost vastbase]$ ll -h core*
-rw------- 1 vbdba vbdba 296G Aug 20 20:02 core-vastbase-162199-2025_08_20_19_57_57-bbox
-rw------- 1 vbdba vbdba 62G Aug 20 20:02 core-vastbase-162199-2025_08_20_19_57_57-bbox.lz4
-rw------- 1 vbdba vbdba 136G Aug 21 10:38 core-vastbase-290510-2025_08_21_10_36_30-bbox
-rw------- 1 vbdba vbdba 19G Aug 21 10:38 core-vastbase-290510-2025_08_21_10_36_30-bbox.lz4[vbdba@dbhost vastbase]$ whereis gaussdb
gaussdb: /vastbase/app_3.0.8_psu2_26989/bin/gaussdb
使用gdb調試解析core文件:
whereis gaussdb
gdb /vastbase/app_3.0.8_psu2_26989/bin/gaussdb core-vastbase-162199-2025_08_20_19_57_57-bbox
gdb /vastbase/app_3.0.8_psu2_26989/bin/gaussdb core-vastbase-290510-2025_08_21_10_36_30-bbox
示例:
[vbdba@dbhost vastbase]$ gdb /vastbase/app_3.0.8_psu2_26989/bin/gaussdb core-vastbase-290510-2025_08_21_10_36_30-bbox
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /vastbase/app_3.0.8_psu2_26989/bin/vastbase...Missing separate debuginfo for /vastbase/app_3.0.8_psu2_26989/bin/vastbase
(no debugging symbols found)...done.
[New LWP 292452]
[New LWP 290510]
[New LWP 290512]
[New LWP 290515]
[New LWP 290532]
[New LWP 290533]
[New LWP 290534]
[New LWP 290535]
[New LWP 290536]
...
...
...
Try: yum --enablerepo='*debug*' install /usr/lib/debug/.build-id/0c/aec124d97114da40ddeb0fed1fad5d14c3d626.debug
Missing separate debuginfo for /vastbase/app_3.0.8_psu2_26989/bin/../lib/libkrb5.so.3
Try: yum --enablerepo='*debug*' install /usr/lib/debug/.build-id/4e/bf28968da5784ed6606bff7c1915c50ac24502.debug
Missing separate debuginfo for /vastbase/app_3.0.8_psu2_26989/bin/../lib/libcom_err.so.2
Try: yum --enablerepo='*debug*' install /usr/lib/debug/.build-id/2a/ddb65846a50ce45f0c9b62ea35dda62c6ad7a2.debug
Missing separate debuginfo for /vastbase/app_3.0.8_psu2_26989/bin/../lib/libk5crypto.so.3
Try: yum --enablerepo='*debug*' install /usr/lib/debug/.build-id/5f/f9d1075a8d5d62f77f5ce56c935fcd92c62efa.debug
Missing separate debuginfo for /vastbase/app_3.0.8_psu2_26989/bin/../lib/libkrb5support.so.0
Try: yum --enablerepo='*debug*' install /usr/lib/debug/.build-id/77/9381063daecc27e8480c8f79f0651162586478.debug
Missing separate debuginfo for /vastbase/app_3.0.8_psu2/lib/postgresql/security_plugin.so
Core was generated by `/vastbase/app_3.0.8_psu2/bin/vastbase'.
#0 0x00000000015c2f44 in BBOX_CreateCoredump ()
Missing separate debuginfos, use: debuginfo-install glibc-2.17-317.el7.x86_64 libselinux-2.5-15.el7.x86_64
(gdb) bt #=======> 輸入bt 然后回車
# #=======> 將下面輸出的信息反饋給原廠即可
#0 0x00000000015c2f44 in BBOX_CreateCoredump ()
#1 0x00000000015ce13a in ?? ()
#2 <signal handler called>
#3 0x00000000021e6708 in _ZN5boost4mp116detail16tuple_apply_implINS_9unordered6detail3foa16concurrent_tableINS5_14flat_map_typesI15BufferSignature12VecBufferLocEENS8_6HasherESt8equal_toIS8_EN14disk_container16HugeCtxAllocatorISt4pairIKS8_S9_EEEE26call_emplace_or_visit_implESt5tupleIJPSK_St17integral_constantIbLb0EEOZN16VecBufferManager10get_bufferEP12RelationDatammRbEUlRKT_E_ONS5_18try_emplace_args_tERS8_R12BufferParamsEEJLm0ELm1ELm2ELm3ELm4ELm5EEEEDTclcl7forwardISU_Efp_Espcl3getIXT1_EEcl7forwardIT0_Efp0_EEEEOSU_OS15_NS0_16integer_sequenceImJXspT1_EEEE ()
#4 0x00000000021e47a9 in vec_read_buffer(RelationData*, unsigned long, unsigned int) ()
#5 0x00000000022931eb in GetDiskCandiateByTuple(RelationData*, unsigned int, unsigned short, float*, unsigned int, float (*)(float const*, float const*, unsigned long), int*) ()
#6 0x00000000022958ad in HnswFindElementNeighborsonDisk(HnswTupleData*, BlkOffsetNumEntry*, float*, HnswEntryPoint*, RelationData*, float (*)(float const*, float const*, unsigned long), int, int, bool, unsigned int) ()
#7 0x000000000228a72f in HnswInsertTupleOnDisk(RelationData*, float*, bool const*, ItemPointerData*, bool) ()
#8 0x000000000228b109 in hnswinsert_internal(RelationData*, unsigned long*, bool const*, ItemPointerData*, RelationData*, IndexUniqueCheck) ()
#9 0x0000000002284184 in hnswinsert(FunctionCallInfoData*) ()
#10 0x00000000012eca6c in FunctionCall6Coll(FmgrInfo*, unsigned int, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) ()
#11 0x000000000229e9bd in index_insert(RelationData*, unsigned long*, bool const*, ItemPointerData*, RelationData*, IndexUniqueCheck) ()
#12 0x0000000001b3bb87 in ExecInsertIndexTuples(TupleTableSlot*, ItemPointerData*, EState*, RelationData*, PartitionData*, short, bool*, Bitmapset*, bool, bool, List*) ()
#13 0x0000000001b927e6 in TupleTableSlot* ExecInsertT<false>(ModifyTableState*, TupleTableSlot*, TupleTableSlot*, EState*, bool, int, List**, bool, bool) ()
#14 0x0000000001b8e98a in ?? ()
#15 0x0000000001b090bb in standard_ExecutorRun(QueryDesc*, ScanDirection, long) ()
#16 0x000000000190f915 in ?? ()
#17 0x0000000001b0971c in ExecutorRun(QueryDesc*, ScanDirection, long) ()
#18 0x0000000001a6b95e in ?? ()
#19 0x0000000001a6e6ca in ?? ()
#20 0x0000000001a70230 in PortalRun(PortalData*, long, bool, _DestReceiver*, _DestReceiver*, char*) ()
#21 0x0000000000a2f4b8 in ?? ()
#22 0x0000000001a663d1 in PostgresMain(int, char**, char const*, char const*) ()
#23 0x000000000199970e in ?? ()
#24 0x00000000019c17c8 in int GaussDbThreadMain<(knl_thread_role)1>(knl_thread_arg*) ()
#25 0x00000000019a71b8 in ?? ()
#26 0x00002b825bd65ea5 in start_thread () from /lib64/libpthread.so.0
#27 0x00002b825c07896d in clone () from /lib64/libc.so.6
(gdb) quit