您尚未登录。

#1 2023-09-13 10:17:09

Mr.I
路人丙
所在地: Kerbal
注册时间: 2015-08-29
帖子: 308

[开发者处理中] pipewire coredump

我刚才在用 Firefox 看 Youtube 视频,中途暂停了一下视频,过一会儿继续播放的时候发现没有声音了。看了一下日志发现是 pipewire coredump 了。

Sep 13 09:12:48 M pipewire[1698]: spa.audioadapter: 0x56538cddedd8: scheduling stopped node
Sep 13 09:12:56 M gnome-shell[1597]: g_source_remove: assertion 'tag > 0' failed
Sep 13 09:12:56 M kernel: pipewire[1707]: segfault at 600000004 ip 00007fe86c57a4ee sp 00007fe867fb2050 error 4 in libspa-audioconvert.so[7fe86c554000+45000] likely on CPU 21 (core 5, socket 0)
Sep 13 09:12:56 M kernel: Code: 00 00 49 c1 e0 05 48 89 7c 24 08 49 01 e8 66 0f 1f 44 00 00 49 8b 80 30 01 00 00 48 8b 70 10 48 01 ce 4c 8b 7e 20 44 8b 6e 14 <41> 8b 17 45 8b 77 04 41 39 d5 0f 82 f2 06 00 00 44 89 e8 89 d7 29
Sep 13 09:12:56 M systemd[1]: Created slice Slice /system/systemd-coredump.
Sep 13 09:12:56 M systemd[1]: Started Process Core Dump (PID 15163/UID 0).
Sep 13 09:12:57 M systemd-coredump[15164]: Process 1698 (pipewire) of user 1000 dumped core.
                                           
                                           Stack trace of thread 1707:
                                           #0  0x00007fe86c57a4ee n/a (libspa-audioconvert.so + 0x374ee)
                                           #1  0x00007fe86c554dc6 n/a (libspa-audioconvert.so + 0x11dc6)
                                           #2  0x00007fe86ee08d79 n/a (libpipewire-0.3.so.0 + 0x62d79)
                                           #3  0x00007fe86eea45b6 n/a (libspa-support.so + 0x85b6)
                                           #4  0x00007fe86edebcc2 n/a (libpipewire-0.3.so.0 + 0x45cc2)
                                           #5  0x00007fe86ea8c9eb n/a (libc.so.6 + 0x8c9eb)
                                           #6  0x00007fe86eb10c84 __clone (libc.so.6 + 0x110c84)
                                           
                                           Stack trace of thread 1698:
                                           #0  0x00007fe86eb11226 epoll_wait (libc.so.6 + 0x111226)
                                           #1  0x00007fe86eeb1cb9 n/a (libspa-support.so + 0x15cb9)
                                           #2  0x00007fe86eea44fd n/a (libspa-support.so + 0x84fd)
                                           #3  0x00007fe86ee09844 pw_main_loop_run (libpipewire-0.3.so.0 + 0x63844)
                                           #4  0x000056538bc392f1 n/a (pipewire + 0x12f1)
                                           #5  0x00007fe86ea27cd0 n/a (libc.so.6 + 0x27cd0)
                                           #6  0x00007fe86ea27d8a __libc_start_main (libc.so.6 + 0x27d8a)
                                           #7  0x000056538bc394a5 n/a (pipewire + 0x14a5)
                                           
                                           Stack trace of thread 1703:
                                           #0  0x00007fe86eb11226 epoll_wait (libc.so.6 + 0x111226)
                                           #1  0x00007fe86eeb1cb9 n/a (libspa-support.so + 0x15cb9)
                                           #2  0x00007fe86eea44fd n/a (libspa-support.so + 0x84fd)
                                           #3  0x00007fe86ee2da7d n/a (libpipewire-0.3.so.0 + 0x87a7d)
                                           #4  0x00007fe86ea8c9eb n/a (libc.so.6 + 0x8c9eb)
                                           #5  0x00007fe86eb10c84 __clone (libc.so.6 + 0x110c84)
                                           ELF object binary architecture: AMD x86-64

当时出问题的时候我电脑上有 2 个桌面应用连着 pipewire,一个 Firefox 和一个 VLC (播放音乐,暂停中)。pipewire 在 coredump 之后就自己重启了,两个桌面应用重新连上 pipewire 之后就继续正常工作了。

我去查了一下,发现已经有人在 10 个月前把这个 issue 上报到了 pipewire 的仓库里了。不过这个 issue 似乎还没有解决掉,目前还开着。所以,来这里问问看,看看有没有什么线索。

----------------------------------- 附加信息 -------------------------------------

我目前在用的音频服务是 pipewire.service 和 pipewire-pulse.service,这次故障过程中 pipewire-pulse 似乎一切正常,除了 VLC 在 journal 里大叫 "vlcpulse audio output error" 之外没有发现相关的日志。

我上一次更新系统是 9 月 10 日,pipewire 以及 pipewire-* 都是目前仓库里的最新版本 (0.3.79-2)。pipewire 的配置我没有改过,用的全是默认配置。

最近编辑记录 Mr.I (2023-09-13 15:15:33)

离线

#2 2023-09-13 10:25:17

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,489
个人网站

Re: [开发者处理中] pipewire coredump

coredumpctl gdb pipewire
然后问你要不要用 debuginfod 时回答 y。等它下载完调试符号,bt 并回车,把输出发出来看看。

离线

#3 2023-09-13 11:00:13

Mr.I
路人丙
所在地: Kerbal
注册时间: 2015-08-29
帖子: 308

Re: [开发者处理中] pipewire coredump

依云 说:

coredumpctl gdb pipewire
然后问你要不要用 debuginfod 时回答 y。等它下载完调试符号,bt 并回车,把输出发出来看看。

话说,gdb 从 debuginfod 读 symbol 一直都是这么慢的吗?已经 20 分钟了 😑

离线

#4 2023-09-13 11:26:42

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,489
个人网站

Re: [开发者处理中] pipewire coredump

取决于你的网速。

离线

#5 2023-09-13 11:32:08

Mr.I
路人丙
所在地: Kerbal
注册时间: 2015-08-29
帖子: 308

Re: [开发者处理中] pipewire coredump

依云 说:

取决于你的网速。

并不是 Download,我这边没有看到有网络活动。我现在停在这里:

Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
Reading symbols from /home/i/.cache/debuginfod_client/00b8f72b5c8ead293cfdd83284f86c9c73245710/debuginfo... 

离线

#6 2023-09-13 11:36:14

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,489
个人网站

Re: [开发者处理中] pipewire coredump

哦有缓存。那应该不慢啊,是不是它有问题?你把这个文件删掉重来呢?

离线

#7 2023-09-13 11:40:38

Mr.I
路人丙
所在地: Kerbal
注册时间: 2015-08-29
帖子: 308

Re: [开发者处理中] pipewire coredump

我删掉了 .cache/debuginfod_client/00b8f72b5c8ead293cfdd83284f86c9c73245710/debuginfo,再次 gdb, 然后又回到了这里了,Download 大概一秒钟就结束了。

Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
Downloading separate debug info for /usr/bin/pipewire
Reading symbols from /home/i/.cache/debuginfod_client/00b8f72b5c8ead293cfdd83284f86c9c73245710/debuginfo... 

离线

#8 2023-09-13 11:53:50

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,489
个人网站

Re: [开发者处理中] pipewire coredump

呃,用 file 命令看看这个文件的类型?

离线

#9 2023-09-13 11:54:39

Mr.I
路人丙
所在地: Kerbal
注册时间: 2015-08-29
帖子: 308

Re: [开发者处理中] pipewire coredump

$ file debuginfo 
debuginfo: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter *empty*, BuildID[sha1]=00b8f72b5c8ead293cfdd83284f86c9c73245710, for GNU/Linux 4.4.0, with debug_info, not stripped

离线

#10 2023-09-13 12:02:47

Mr.I
路人丙
所在地: Kerbal
注册时间: 2015-08-29
帖子: 308

Re: [开发者处理中] pipewire coredump

哦对了,debuginfo 这个文件的权限是 400,既然 gdb 只是在从这里面读东西,那应该是不会出现什么无法访问之类的问题。

而我的 CPU 和内存都没有什么活动,也不像是在做什么 CPU 密集型的工作。gdb 好像是在等什么东西。

离线

#11 2023-09-13 12:50:17

Mr.I
路人丙
所在地: Kerbal
注册时间: 2015-08-29
帖子: 308

Re: [开发者处理中] pipewire coredump

Hmm,没有什么进展,gdb 就一直停在那里,进程状态是 Sleep, debuginfo 文件也开着,不知道在等什么。

$ ps aux | grep gdb         
i          30410  0.0  0.0 541548 38296 pts/6    S+   12:37   0:00 coredumpctl gdb pipewire
i          30411  0.0  0.1 2671320 66984 pts/6   Sl+  12:37   0:00 gdb /usr/bin/pipewire -c /var/tmp/coredump-akbqYQ
i          30611  0.0  0.0  18056  2560 pts/9    S+   12:39   0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=.cvs --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn gdb


$ lsof -p 30411 | grep debug
gdb     30411    i  mem    REG              259,2   357445 41424716 /usr/lib/guile/3.0/ccache/system/vm/debug.go
gdb     30411    i  mem    REG              259,2    30600 39208951 /usr/lib/libdebuginfod-0.189.so
gdb     30411    i   16r   REG              259,2    16880 87429868 /home/i/.cache/debuginfod_client/00b8f72b5c8ead293cfdd83284f86c9c73245710/debuginfo
gdb     30411    i   17u  IPv4             678113      0t0      TCP M:41358->debuginfod.archlinux.org:https (CLOSE_WAIT)

离线

#12 2023-09-13 13:02:21

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,489
个人网站

Re: [开发者处理中] pipewire coredump

没啥问题啊。你 strace -p 30411 上去看看它在干嘛?

离线

#13 2023-09-13 13:11:54

Mr.I
路人丙
所在地: Kerbal
注册时间: 2015-08-29
帖子: 308

Re: [开发者处理中] pipewire coredump

刚才那个被我 kill 掉了,重新开了一个 gdb

$ ps aux  | grep gdb
i          33179  0.0  0.0 541548 38648 pts/6    S+   13:09   0:00 coredumpctl gdb pipewire
i          33180  0.2  0.1 2671320 66200 pts/6   Sl+  13:09   0:00 gdb /usr/bin/pipewire -c /var/tmp/coredump-PVxw3i


$ sudo strace -p 33180
strace: Process 33180 attached
openat(AT_FDCWD, "/dev/snd/pcmC1D4p", O_RDONLY|O_CLOEXEC

离线

#14 2023-09-13 13:16:48

Mr.I
路人丙
所在地: Kerbal
注册时间: 2015-08-29
帖子: 308

Re: [开发者处理中] pipewire coredump

所以,是 pipewire 的代码带着 gdb 去访问音频设备了吗 😅

离线

#15 2023-09-13 13:41:29

Mr.I
路人丙
所在地: Kerbal
注册时间: 2015-08-29
帖子: 308

Re: [开发者处理中] pipewire coredump

好了,果然是这样,我把 pipewire 服务关掉之后就可以 gdb 了。


[Thread debugging using libthread_db enabled]                                                                                                                                                 
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `/usr/bin/pipewire'.
Program terminated with signal SIGSEGV, Segmentation fault.

warning: Section `.reg-xstate/1707' in core file too small.
#0  0x00007fe86c57a4ee in impl_node_process (object=0x56538cddf2f0) at ../pipewire/spa/plugins/audioconvert/audioconvert.c:2736
Downloading source file /usr/src/debug/pipewire/build/../pipewire/spa/plugins/audioconvert/audioconvert.c
2736                                    offs = SPA_MIN(bd->chunk->offset, bd->maxsize);                                                                                                       
[Current thread is 1 (Thread 0x7fe867fb36c0 (LWP 1707))]
(gdb) bt
#0  0x00007fe86c57a4ee in impl_node_process (object=0x56538cddf2f0) at ../pipewire/spa/plugins/audioconvert/audioconvert.c:2736
#1  0x00007fe86c554dc6 in impl_node_process (object=0x56538cddedd8) at ../pipewire/spa/plugins/audioconvert/audioadapter.c:1497
#2  0x00007fe86ee08d79 in process_node (data=0x56538cdf3e40) at ../pipewire/src/pipewire/impl-node.c:1232
#3  node_on_fd_events (source=<optimized out>) at ../pipewire/src/pipewire/impl-node.c:1305
#4  0x00007fe86eea45b6 in loop_iterate (object=0x56538cc72418, timeout=<optimized out>) at ../pipewire/spa/plugins/support/loop.c:483
#5  0x00007fe86edebcc2 in do_loop (user_data=0x56538cc722b0) at ../pipewire/src/pipewire/data-loop.c:65
#6  0x00007fe86ea8c9eb in start_thread (arg=<optimized out>) at pthread_create.c:444
#7  0x00007fe86eb10c84 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100

离线

页脚