记一次使用gdb调试开源软件找到崩溃原因成功运行的经历
背景:最近在进行拼搏xx天我要拿到pwn.college蓝带的计划,但是我目前还没有系统地整理过pwn的实践知识,所以我需要在做题之前先学习pwn.college上的课程。
课程固然会给我(从我的水平出发)带来很多收益,但全是英文我也听不明白,况且对于一些语速较快且夹杂众多专业术语的情况网站的自动字幕就歇菜了。
最初我是使用最原始的手动记录方法,把课程中的英文用笔写在纸上,但这确实是一项耗时费力的工作,虽然确实锻炼了我对专业领域的洋文听力,也许在12月的6级考试可以看到一些效果。但这样也太慢了,而且我只是抄写了网站的自动字幕,自动字幕到不了的地方我也到不了。
得益于多模态大语言模型的发展,我计划写一个应用程序,调用近期硅基流动上新的免费语言模型API做一些采集机器上播放的语音再将其转成文字,再带一些自动纠错的能力(但是我对这类程序的开发还不是很熟悉其实,开发一个恐怕直接过了xx天我也没拿到蓝带)。
又得益于开源事业的壮大,我通过ds找到了一个开源的语音转文字软件,并且这个软件还带了一个本地LLM,可以避免数据在通信过程中(被发来发去)的延迟(影响我的心情)。于是我下载了Sussurro,一个由go语言编写的(介绍从下载链接中可以看到),反正它可以捕获本机的语音然后将其转成文字,还带了一些纠错功能(如果机器有显卡,选择比较大的那个模型可以达到不错的效果),下载命令如下:
curl -fsSL https://raw.githubusercontent.com/cesp99/sussurro/master/scripts/install.sh | bash
下载完成后我就打算开始运行了,然而事情并没有这么顺利
我在terminal中输入了sussurro,出现了一些问题,我当然是先无脑复制给在线LLM的对话框,之后似乎卡在了一个地方不能通过无脑操作解决
~$ sussurro
time=2026-09-16T14:46:41.439+08:00 level=INFO msg="Starting Sussurro" version=2.6 ui=true
time=2026-09-16T14:46:41.439+08:00 level=INFO msg="Effective configuration" config_path=/home/wl/.sussurro/config.yaml max_duration=2m min_duration=300ms
time=2026-09-16T14:46:42.785+08:00 level=INFO msg="ASR engine ready" model=ggml-large-v3-turbo.bin backend="GPU: NVIDIA GeForce RTX 4090" streaming=true
time=2026-09-16T14:46:43.790+08:00 level=INFO msg="Partial transcription enabled" interval=750ms revision_sentences=4
time=2026-09-16T14:46:43.790+08:00 level=ERROR msg="Trigger socket unavailable" error="another sussurro instance is already listening on /run/user/1001/sussurro.sock"
time=2026-09-16T14:46:43.790+08:00 level=INFO msg="Using overlay hotkeys" push_to_talk=ctrl+shift+space toggle="" edit=""
time=2026-09-16T14:46:43.790+08:00 level=INFO msg="Sussurro UI running"
** Message: 14:46:43.850: display is not a Wayland compositor with wlr-layer-shell; overlay uses a floating window
Overriding existing handler for signal 10. Set JSC_SIGNAL_FOR_GC if you want WebKit to use a different signal
(sussurro:1181547): Gdk-WARNING **: 14:46:43.895: The program 'sussurro' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAccess (attempt to access private resource denied)'.
(Details: serial 291 error_code 10 request_code 33 (core protocol) minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the GDK_SYNCHRONIZE environment
variable to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
报出了上面的错误,错误中说我可以通过调试器在gdk_x_error()函数处下断点看看是什么问题,于是我使用gdb看看有什么问题,在terminal中输入调试命令(虽然命令也是LLM给的)
~$ GDK_SYNCHRONIZE=1 gdb --args sussurro
好了,到出错的地方GDB自动停止了,我们来从中找出提及的错误信息
~$ GDK_SYNCHRONIZE=1 gdb --args sussurro GNU gdb (Ubuntu 15.1-1ubuntu1~24.04.1) 15.1 Copyright (C) 2024 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-linux-gnu". 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"... pwndbg: loaded 194 pwndbg commands. Type pwndbg [filter] for a list. pwndbg: created 11 GDB functions (can be used with print/break). Type help function to see them. Reading symbols from sussurro... warning: Missing auto-load script at offset 0 in section .debug_gdb_scripts of file /home/wl/.local/bin/sussurro. Use `info auto-load python-scripts [REGEXP]' to list them. ------- tip of the day (disable with set show-tips off) ------- If your program has multiple threads they will be displayed in the context display or using the context threads command pwndbg> run Starting program: /home/wl/.local/bin/sussurro Downloading separate debug info for system-supplied DSO at 0x7ffff7fc3000 Downloading separate debug info for /lib/x86_64-linux-gnu/libgtk-3.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libgdk-3.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libpango-1.0.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libcairo.so.2 Downloading separate debug info for /lib/x86_64-linux-gnu/libgio-2.0.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libgobject-2.0.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libglib-2.0.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libwebkit2gtk-4.1.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libjavascriptcoregtk-4.1.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libX11.so.6 Downloading separate debug info for /lib/x86_64-linux-gnu/libstdc++.so.6 Downloading separate debug info for /lib/x86_64-linux-gnu/libvulkan.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libgomp.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libgcc_s.so.1 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Downloading separate debug info for /lib/x86_64-linux-gnu/libgmodule-2.0.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libharfbuzz.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libfontconfig.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libfribidi.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libcairo-gobject.so.2 Downloading separate debug info for /lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libatk-1.0.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libepoxy.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libXi.so.6 Downloading separate debug info for /lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libXfixes.so.3 Downloading separate debug info for /lib/x86_64-linux-gnu/libxkbcommon.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libwayland-client.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libwayland-cursor.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libwayland-egl.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libXext.so.6 Downloading separate debug info for /lib/x86_64-linux-gnu/libXcursor.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libXdamage.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libXcomposite.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libXrandr.so.2 Downloading separate debug info for /lib/x86_64-linux-gnu/libXinerama.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libthai.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libz.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libpng16.so.16 Downloading separate debug info for /lib/x86_64-linux-gnu/libfreetype.so.6 Downloading separate debug info for /lib/x86_64-linux-gnu/libXrender.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libxcb.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libxcb-render.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libxcb-shm.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libpixman-1.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libmount.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libselinux.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libffi.so.8 Downloading separate debug info for /lib/x86_64-linux-gnu/libpcre2-8.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libatomic.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libwebpmux.so.3 Downloading separate debug info for /lib/x86_64-linux-gnu/libexpat.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libicudata.so.74 Downloading separate debug info for /lib/x86_64-linux-gnu/libicui18n.so.74 Downloading separate debug info for /lib/x86_64-linux-gnu/libsystemd.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libjpeg.so.8 Downloading separate debug info for /lib/x86_64-linux-gnu/libicuuc.so.74 Downloading separate debug info for /lib/x86_64-linux-gnu/libxml2.so.2 Downloading separate debug info for /lib/x86_64-linux-gnu/libsqlite3.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libxslt.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/liblcms2.so.2 Downloading separate debug info for /lib/x86_64-linux-gnu/libgcrypt.so.20 Downloading separate debug info for /lib/x86_64-linux-gnu/libgpg-error.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libgstallocators-1.0.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libgstapp-1.0.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libgstbase-1.0.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libgstreamer-1.0.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libgstpbutils-1.0.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libgstaudio-1.0.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libgsttag-1.0.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libgstvideo-1.0.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libgstgl-1.0.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libgstfft-1.0.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libwebpdemux.so.2 Downloading separate debug info for /lib/x86_64-linux-gnu/libwebp.so.7 Downloading separate debug info for /lib/x86_64-linux-gnu/libsoup-3.0.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libharfbuzz-icu.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libwayland-server.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libmanette-0.2.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libseccomp.so.2 Downloading separate debug info for /lib/x86_64-linux-gnu/libenchant-2.so.2 Downloading separate debug info for /lib/x86_64-linux-gnu/libgbm.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libdrm.so.2 Downloading separate debug info for /lib/x86_64-linux-gnu/libtasn1.so.6 Downloading separate debug info for /lib/x86_64-linux-gnu/libhyphen.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libsecret-1.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libgraphite2.so.3 Downloading separate debug info for /lib/x86_64-linux-gnu/libatspi.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libdbus-1.so.3 Downloading separate debug info for /lib/x86_64-linux-gnu/libdatrie.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libbz2.so.1.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libbrotlidec.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libXau.so.6 Downloading separate debug info for /lib/x86_64-linux-gnu/libXdmcp.so.6 Downloading separate debug info for /lib/x86_64-linux-gnu/libblkid.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libcap.so.2 Downloading separate debug info for /lib/x86_64-linux-gnu/liblz4.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/liblzma.so.5 Downloading separate debug info for /lib/x86_64-linux-gnu/libzstd.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libunwind.so.8 Downloading separate debug info for /lib/x86_64-linux-gnu/libdw.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/liborc-0.4.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libGL.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libEGL.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libX11-xcb.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libgudev-1.0.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libsharpyuv.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libpsl.so.5 Downloading separate debug info for /lib/x86_64-linux-gnu/libgssapi_krb5.so.2 Downloading separate debug info for /lib/x86_64-linux-gnu/libnghttp2.so.14 Downloading separate debug info for /lib/x86_64-linux-gnu/libevdev.so.2 Downloading separate debug info for /lib/x86_64-linux-gnu/libbrotlicommon.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libbsd.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libelf.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libGLdispatch.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libGLX.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libudev.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libunistring.so.5 Downloading separate debug info for /lib/x86_64-linux-gnu/libidn2.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libkrb5.so.3 Downloading separate debug info for /lib/x86_64-linux-gnu/libk5crypto.so.3 Downloading separate debug info for /lib/x86_64-linux-gnu/libcom_err.so.2 Downloading separate debug info for /lib/x86_64-linux-gnu/libkrb5support.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libmd.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libkeyutils.so.1 [New Thread 0x7fffa43ff6c0 (LWP 1182460)] [New Thread 0x7fffa3bfe6c0 (LWP 1182461)] [New Thread 0x7fffa33fd6c0 (LWP 1182462)] [New Thread 0x7fffa2bfc6c0 (LWP 1182463)] [New Thread 0x7fffa23fb6c0 (LWP 1182464)] time=2026-09-16T14:48:28.223+08:00 level=INFO msg="Starting Sussurro" version=2.6 ui=true time=2026-09-16T14:48:28.223+08:00 level=INFO msg="Effective configuration" config_path=/home/wl/.sussurro/config.yaml max_duration=2m min_duration=300ms Downloading separate debug info for /lib/x86_64-linux-gnu/libpulse.so.0 Downloading separate debug info for /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-16.1.so Downloading separate debug info for /lib/x86_64-linux-gnu/libsndfile.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libasyncns.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libapparmor.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libFLAC.so.12 Downloading separate debug info for /lib/x86_64-linux-gnu/libvorbis.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libvorbisenc.so.2 Downloading separate debug info for /lib/x86_64-linux-gnu/libopus.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libogg.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libmpg123.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libmp3lame.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libvulkan_radeon.so Downloading separate debug info for /lib/x86_64-linux-gnu/libLLVM.so.20.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libxcb-dri3.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libxcb-present.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libxcb-xfixes.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libxcb-sync.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libxcb-randr.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libxshmfence.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libdrm_amdgpu.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libedit.so.2 Downloading separate debug info for /lib/x86_64-linux-gnu/libtinfo.so.6 Downloading separate debug info for /home/wl/.cache/debuginfod_client/e78c5fe141f5c27e80a0073b59bdaa2e9e90773c/debuginfo Downloading separate debug info for /lib/x86_64-linux-gnu/libvulkan_intel.so Downloading separate debug info for /lib/x86_64-linux-gnu/libvulkan_asahi.so Downloading separate debug info for /lib/x86_64-linux-gnu/libGLX_nvidia.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libnvidia-glsi.so.580.173.02 Downloading separate debug info for /lib/x86_64-linux-gnu/libnvidia-tls.so.580.173.02 Downloading separate debug info for /lib/x86_64-linux-gnu/libnvidia-glcore.so.580.173.02 Downloading separate debug info for /lib/x86_64-linux-gnu/libnvidia-gpucomp.so.580.173.02 Downloading separate debug info for /lib/x86_64-linux-gnu/libxcb-glx.so.0 Downloading separate debug info for /lib/x86_64-linux-gnu/libvulkan_lvp.so Downloading separate debug info for /lib/x86_64-linux-gnu/libvulkan_intel_hasvk.so Downloading separate debug info for /lib/x86_64-linux-gnu/libvulkan_nouveau.so Downloading separate debug info for /lib/x86_64-linux-gnu/libvulkan_virtio.so Downloading separate debug info for /lib/x86_64-linux-gnu/libvulkan_gfxstream.so Downloading separate debug info for /lib/x86_64-linux-gnu/libVkLayer_MESA_device_select.so Downloading separate debug info for /lib/x86_64-linux-gnu/libnvidia-allocator.so.1 Downloading separate debug info for /lib/x86_64-linux-gnu/libnvidia-glvkspirv.so.580.173.02 Downloading separate debug info for /lib/x86_64-linux-gnu/libnvidia-rtcore.so.580.173.02 [New Thread 0x7fff6cbff6c0 (LWP 1182550)] [New Thread 0x7fff6c3fe6c0 (LWP 1182552)] [New Thread 0x7fff6bbfd6c0 (LWP 1182553)] [New Thread 0x7fff6b1fc6c0 (LWP 1182558)] time=2026-09-16T14:48:40.402+08:00 level=INFO msg="ASR engine ready" model=ggml-large-v3-turbo.bin backend="GPU: NVIDIA GeForce RTX 4090" streaming=true [New Thread 0x7fff6987b6c0 (LWP 1182563)] [New Thread 0x7fff6907a6c0 (LWP 1182564)] [New Thread 0x7fff688796c0 (LWP 1182565)] [Attaching after Thread 0x7fffeaefb4c0 (LWP 1181996) vfork to child process 1182566] [New inferior 2 (process 1182566)] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [Detaching vfork parent process 1181996 after child exit] [Inferior 1 (process 1181996) detached] [Inferior 2 (process 1182566) exited normally] pwndbg> time=2026-09-16T14:48:41.444+08:00 level=INFO msg="Partial transcription enabled" interval=750ms revision_sentences=4 time=2026-09-16T14:48:41.444+08:00 level=ERROR msg="Trigger socket unavailable" error="another sussurro instance is already listening on /run/user/1001/sussurro.sock" time=2026-09-16T14:48:41.444+08:00 level=INFO msg="Using overlay hotkeys" push_to_talk=ctrl+shift+space toggle="" edit="" time=2026-09-16T14:48:41.444+08:00 level=INFO msg="Sussurro UI running" ** Message: 14:48:41.506: display is not a Wayland compositor with wlr-layer-shell; overlay uses a floating window Overriding existing handler for signal 10. Set JSC_SIGNAL_FOR_GC if you want WebKit to use a different signal (sussurro:1181996): Gdk-WARNING **: 14:48:41.579: The program 'sussurro' received an X Window System error. This probably reflects a bug in the program. The error was 'BadAccess (attempt to access private resource denied)'. (Details: serial 442 error_code 10 request_code 33 (core protocol) minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the GDK_SYNCHRONIZE environment variable to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) q
这里有一句
time=2026-09-16T14:48:41.444+08:00 level=ERROR msg="Trigger socket unavailable" error="another sussurro instance is already listening on /run/user/1001/sussurro.sock"
提示(好吧其是我也并没有看,直接扔给在线对话了),以下是deepseek的回复,看起来很有道理,我们来跟着ds把那个进程kill掉

然后就可以正常运行程序了

可以看到已经出现了一些教程中的文字
posted on 2026-09-16 15:44 d0ubleU0x00 阅读(10) 评论(0) 收藏 举报
浙公网安备 33010602011771号