gdb 调试core文件报错: in free () from /lib64/libc.so.6 找不到原因啊

博主在运行程序后遭遇了Segmentation fault,通过gdb调试core文件,发现错误发生在free()函数中。在堆栈跟踪中,错误从CpuProfiler的信号处理器开始,经过多个库函数调用,最终定位到火星游戏服务器场景模块的某个对象处理函数。文章请求社区专家提供帮助,以找出问题的根源。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

运行程序死掉  找不到原因啊。。gdb 跟踪与堆栈信息 贴出来了 麻烦大佬们看一下,给个回复,不胜感激!!

 

Core was generated by `./scene_s0037 10037'.
Program terminated with signal 11, Segmentation fault.
#0 GetStackTraceWithContext (result=0x7ffeb02f9d78, max_depth=63, skip_count=0, ucp=<value optimized out>) at src/stacktrace_x86-inl.h:325
325 if (*(sp+1) == reinterpret_cast<void *>(0)) {
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.212.el6.x86_64 libgcc-4.4.7-23.el6.x86_64 libidn-1.18-2.el6.x86_64 libstdc++-4.4.7-23.el6.x86_64 zlib-1.2.3-29.el6.x86_64
(gdb) bt
#0 GetStackTraceWithContext (result=0x7ffeb02f9d78, max_depth=63, skip_count=0, ucp=<value optimized out>) at src/stacktrace_x86-inl.h:325
#1 0x00007f013834906c in CpuProfiler::prof_handler (sig=<value optimized out>, signal_ucontext=0x7ffeb02fa000, cpu_profiler=0x7f0138551de0) at src/profiler.cc:3

gdb libvo_test_so.so /home/mdc/var/log/npu/coredump/core.\!mnt\!vo_test-26826-46889 GNU gdb (GDB) iAOS3.3 9.2-1.AOS3.3 Copyright (C) 2020 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 "aarch64-aos-linux". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from libvo_test_so.so... (No debugging symbols found in libvo_test_so.so) warning: core file may not match specified executable file. [New LWP 26826] [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib64/libthread_db.so.1". Core was generated by `./vo_test --mode=func --scene=VoTestBase'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x0000e7fbe569cb04 in ?? () Missing separate debuginfos, use: dnf debuginfo-install compiler-rt-builtins-12.--Type <RET> for more, q to quit, c to continue without paging-- 0.1-1.a1.AOS3.3.aarch64 glibc-2.34-AOS3.3.aarch64 (gdb) bt #0 0x0000e7fbe569cb04 in ?? () #1 0x0000e7fbe69677b0 in ?? () from /usr/lib64/libc.so.6 #2 0x0000e7fbe6a9c000 in sys_sigabbrev () from /usr/lib64/libc.so.6 Backtrace stopped: previous frame identical to this frame (corrupt stack?) (gdb) where #0 0x0000e7fbe569cb04 in ?? () #1 0x0000e7fbe69677b0 in ?? () from /usr/lib64/libc.so.6 #2 0x0000e7fbe6a9c000 in sys_sigabbrev () from /usr/lib64/libc.so.6 Backtrace stopped: previous frame identical to this frame (corrupt stack?)
07-05
root@ESM8400:~# gdb -p 178418 -ex "thread apply all bt" -ex "detach" -ex "quit" GNU gdb (GDB) 14.2 Copyright (C) 2023 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 "aarch64-poky-linux". Type "show configuration" for configuration details. For bug reporting instructions, please see: <https://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word". Attaching to process 178418 [New LWP 178425] [New LWP 178426] [New LWP 178427] [New LWP 178432] [New LWP 178433] [New LWP 178434] [New LWP 178435] [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". ioctl () at ../sysdeps/unix/sysv/linux/aarch64/ioctl.S:25 warning: 25 ../sysdeps/unix/sysv/linux/aarch64/ioctl.S: No such file or directory Thread 8 (Thread 0xffff95821f20 (LWP 178435) "QQmlThread"): #0 0x0000ffffb3cb902c in __GI___poll (fds=0xaaab17ed8f30, nfds=1, timeout=<optimized out>) at /usr/src/debug/glibc/2.39+git/sysdeps/unix/sysv/linux/poll.c:41 #1 0x0000ffffb298d2c0 in ?? () from /usr/lib/libglib-2.0.so.0 #2 0x0000ffffb298dae8 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #3 0x0000ffffb452ed58 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt6Core.so.6 #4 0x0000ffffb425c63c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt6Core.so.6 #5 0x0000ffffb436fcd0 in QThread::exec() () from /usr/lib/libQt6Core.so.6 #6 0x0000ffffb4402538 in ?? () from /usr/lib/libQt6Core.so.6 #7 0x0000ffffb3c60dc4 in start_thread (arg=0x0) at pthread_create.c:447 #8 0x0000ffffb3cc2f4c in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone3.S:76 Thread 7 (Thread 0xffff96031f20 (LWP 178434) "QFileInfoGather"): #0 0x0000ffffb3c5d5b4 in __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0xaaab16195f78) at futex-internal.c:57 #1 __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0xaaab16195f78) at futex-internal.c:87 #2 __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0xaaab16195f78, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at futex-internal.c:139 #3 0x0000ffffb3c60128 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0xaaab16195f20, cond=0xaaab16195f50) at pthread_cond_wait.c:503 #4 ___pthread_cond_wait (cond=0xaaab16195f50, mutex=0xaaab16195f20) at pthread_cond_wait.c:618 #5 0x0000ffffb440fb84 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () from /usr/lib/libQt6Core.so.6 #6 0x0000ffffb571f894 in QFileInfoGatherer::run() () from /usr/lib/libQt6Gui.so.6 #7 0x0000ffffb4402538 in ?? () from /usr/lib/libQt6Core.so.6 #8 0x0000ffffb3c60dc4 in start_thread (arg=0x0) at pthread_create.c:447 #9 0x0000ffffb3cc2f4c in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone3.S:76 Thread 6 (Thread 0xffff97ffef20 (LWP 178433) "app"): #0 ioctl () at ../sysdeps/unix/sysv/linux/aarch64/ioctl.S:25 #1 0x0000ffffb1931b70 in gcoOS_DeviceControl () from /usr/lib/libGAL.so #2 0x0000ffffb1932d30 in gcoOS_WaitSignal () from /usr/lib/libGAL.so #3 0x0000ffffb2b2c980 in ?? () from /usr/lib/libEGL.so.1 #4 0x0000ffffb3c60dc4 in start_thread (arg=0x0) at pthread_create.c:447 #5 0x0000ffffb3cc2f4c in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone3.S:76 Thread 5 (Thread 0xffff9cdfef20 (LWP 178432) "app"): #0 ioctl () at ../sysdeps/unix/sysv/linux/aarch64/ioctl.S:25 #1 0x0000ffffb1931b70 in gcoOS_DeviceControl () from /usr/lib/libGAL.so --Type <RET> for more, q to quit, c to continue without paging-- #2 0x0000ffffb1932d30 in gcoOS_WaitSignal () from /usr/lib/libGAL.so #3 0x0000ffffb17b2f10 in ?? () from /usr/lib/libGAL.so #4 0x0000ffffb3c60dc4 in start_thread (arg=0x0) at pthread_create.c:447 #5 0x0000ffffb3cc2f4c in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone3.S:76 Thread 4 (Thread 0xfffface1ef20 (LWP 178427) "WaylandEventThr"): #0 0x0000ffffb3cb902c in __GI___poll (fds=0xfffface1e5c8, nfds=2, timeout=<optimized out>) at /usr/src/debug/glibc/2.39+git/sysdeps/unix/sysv/linux/poll.c:41 #1 0x0000ffffadf31fd4 in ?? () from /usr/lib/libQt6WaylandClient.so.6 #2 0x0000ffffb4402538 in ?? () from /usr/lib/libQt6Core.so.6 #3 0x0000ffffb3c60dc4 in start_thread (arg=0x0) at pthread_create.c:447 #4 0x0000ffffb3cc2f4c in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone3.S:76 Thread 3 (Thread 0xffffad62ef20 (LWP 178426) "WaylandEventThr"): #0 0x0000ffffb3c5d5b4 in __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0xaaab15746d68) at futex-internal.c:57 #1 __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0xaaab15746d68) at futex-internal.c:87 #2 __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0xaaab15746d68, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at futex-internal.c:139 #3 0x0000ffffb3c60128 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0xaaab15746d10, cond=0xaaab15746d40) at pthread_cond_wait.c:503 #4 ___pthread_cond_wait (cond=0xaaab15746d40, mutex=0xaaab15746d10) at pthread_cond_wait.c:618 #5 0x0000ffffb440fb84 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () from /usr/lib/libQt6Core.so.6 #6 0x0000ffffadf31f74 in ?? () from /usr/lib/libQt6WaylandClient.so.6 #7 0x0000ffffb4402538 in ?? () from /usr/lib/libQt6Core.so.6 #8 0x0000ffffb3c60dc4 in start_thread (arg=0x0) at pthread_create.c:447 #9 0x0000ffffb3cc2f4c in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone3.S:76 Thread 2 (Thread 0xffffade7ef20 (LWP 178425) "QDBusConnection"): #0 0x0000ffffb3cb902c in __GI___poll (fds=0xaaab15742240, nfds=2, timeout=<optimized out>) at /usr/src/debug/glibc/2.39+git/sysdeps/unix/sysv/linux/poll.c:41 #1 0x0000ffffb298d2c0 in ?? () from /usr/lib/libglib-2.0.so.0 #2 0x0000ffffb298dae8 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #3 0x0000ffffb452ed58 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt6Core.so.6 #4 0x0000ffffb425c63c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt6Core.so.6 #5 0x0000ffffb436fcd0 in QThread::exec() () from /usr/lib/libQt6Core.so.6 #6 0x0000ffffb287e7b0 in ?? () from /usr/lib/libQt6DBus.so.6 #7 0x0000ffffb4402538 in ?? () from /usr/lib/libQt6Core.so.6 #8 0x0000ffffb3c60dc4 in start_thread (arg=0x0) at pthread_create.c:447 #9 0x0000ffffb3cc2f4c in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone3.S:76 Thread 1 (Thread 0xffffb6509020 (LWP 178418) "app"): #0 ioctl () at ../sysdeps/unix/sysv/linux/aarch64/ioctl.S:25 #1 0x0000ffffb1931b70 in gcoOS_DeviceControl () from /usr/lib/libGAL.so #2 0x0000ffffb1932d30 in gcoOS_WaitSignal () from /usr/lib/libGAL.so #3 0x0000ffffb1817590 in ?? () from /usr/lib/libGAL.so #4 0x0000ffffb2c4ffd8 in ?? () from /usr/lib/libGLESv2.so.2 #5 0x0000ffffb2c5004c in ?? () from /usr/lib/libGLESv2.so.2 #6 0x0000ffffb2bf2a10 in ?? () from /usr/lib/libGLESv2.so.2 #7 0x0000ffffb2b9973c in glTexSubImage2D () from /usr/lib/libGLESv2.so.2 #8 0x0000ffffb565d040 in ?? () from /usr/lib/libQt6Gui.so.6 #9 0x0000ffffb565e9ac in ?? () from /usr/lib/libQt6Gui.so.6 #10 0x0000ffffb54ffae0 in QRhi::endFrame(QRhiSwapChain*, QFlags<QRhi::EndFrameFlag>) () from /usr/lib/libQt6Gui.so.6 #11 0x0000ffffb539d198 in ?? () from /usr/lib/libQt6Gui.so.6 #12 0x0000ffffb54c023c in QPlatformBackingStore::rhiFlush(QWindow*, double, QRegion const&, QPoint const&, QPlatformTextureList*, bool) () from /usr/lib/libQt6Gui.so.6 #13 0x0000ffffb5cd70c4 in QWidgetRepaintManager::flush(QWidget*, QRegion const&, QPlatformTextureList*) () from /usr/lib/libQt6Widgets.so.6 #14 0x0000ffffb5cd8658 in QWidgetRepaintManager::flush() () from /usr/lib/libQt6Widgets.so.6 #15 0x0000ffffb5cda874 in QWidgetRepaintManager::paintAndFlush() () from /usr/lib/libQt6Widgets.so.6 #16 0x0000ffffb5ccf3bc in QWidget::event(QEvent*) () from /usr/lib/libQt6Widgets.so.6 #17 0x0000ffffb5c72af8 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt6Widgets.so.6 #18 0x0000ffffb424f43c in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt6Core.so.6 #19 0x0000ffffb425368c in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQt6Core.so.6 #20 0x0000ffffb452f540 in ?? () from /usr/lib/libQt6Core.so.6 #21 0x0000ffffb29899e4 in ?? () from /usr/lib/libglib-2.0.so.0 --Type <RET> for more, q to quit, c to continue without paging-- #22 0x0000ffffb298d318 in ?? () from /usr/lib/libglib-2.0.so.0 #23 0x0000ffffb298dae8 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #24 0x0000ffffb452ed58 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt6Core.so.6 #25 0x0000ffffb425c63c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt6Core.so.6 #26 0x0000ffffb42585e0 in QCoreApplication::exec() () from /usr/lib/libQt6Core.so.6 #27 0x0000aaaae0c2d5ec in main (argc=1, argv=0xffffcb8ec8b8) at ../appHDQt6/main.cpp:198 Detaching from program: /mnt/mmc/app, process 178418 [Inferior 1 (process 178418) detached] 分析一下卡死在哪里了
最新发布
07-11
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值