'Random' assertion caused by libpipewire crashed Music Player Daemon (MPD)
- PipeWire version (
pipewire --version
): 0.3.70 - Distribution and distribution version (
PRETTY_NAME
from/etc/os-release
): Arch Linux - Desktop Environment: KDE Plasma 5.27
- Kernel version (
uname -r
): 6.1.29
Description of Problem:
Music Player Daemon (MPD) recently crashed for me, and after I reported the crash on the MPD bug tracker, the developer mentioned this could be caused by libpipewire.
As I mentioned in the MPD bug report, I was able to get a stack trace, but I'm not sure if it's useful (feel free to close this if it isn't):
Thread 9 (Thread 0x7f15e41650c0 (LWP 640)):
#0 0x00007f15f4c34266 in epoll_wait (epfd=4, events=0x7ffd09f46500, maxevents=16, timeout=60438) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
#1 0x000055ef5dcb9fd0 in EpollFD::Wait(epoll_event*, int, int) (timeout=<optimized out>, maxevents=16, events=0x7ffd09f46500, this=0x7ffd09f47438) at ../mpd-0.23.12/src/io/FileDescriptor.hxx:104
#2 EpollBackend::ReadEvents(int) (timeout_ms=<optimized out>, this=0x7ffd09f47438) at ../mpd-0.23.12/src/event/EpollBackend.hxx:60
#3 EventLoop::Wait(std::chrono::duration<long, std::ratio<1l, 1000000000l> >) (timeout=Python Exception <class 'gdb.error'>: value has been optimized out
, this=0x7ffd09f46ba8) at ../mpd-0.23.12/src/event/Loop.cxx:252
#4 EventLoop::Run() (this=0x7ffd09f46ba8) at ../mpd-0.23.12/src/event/Loop.cxx:343
#5 0x000055ef5dc81706 in MainConfigured(CommandLineOptions const&, ConfigData const&) (options=..., raw_config=...) at ../mpd-0.23.12/src/Main.cxx:576
#6 0x000055ef5dc827bc in MainOrThrow(int, char**) (argc=<optimized out>, argv=0x7ffd09f48b88) at ../mpd-0.23.12/src/Main.cxx:691
#7 0x000055ef5dc794ce in mpd_main(int, char**) (argv=<optimized out>, argc=<optimized out>) at ../mpd-0.23.12/src/Main.cxx:697
#8 main(int, char**) (argc=<optimized out>, argv=<optimized out>) at ../mpd-0.23.12/src/Main.cxx:709
Thread 8 (LWP 702):
#0 0x0000000000000000 in ()
Thread 7 (Thread 0x7f15e3dae6c0 (LWP 692)):
#0 0x00007f15f4c34266 in epoll_wait (epfd=6, events=0x7f15e3dad440, maxevents=16, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
#1 0x000055ef5dcb9fd0 in EpollFD::Wait(epoll_event*, int, int) (timeout=<optimized out>, maxevents=16, events=0x7f15e3dad440, this=0x7ffd09f47ce8) at ../mpd-0.23.12/src/io/FileDescriptor.hxx:104
#2 EpollBackend::ReadEvents(int) (timeout_ms=<optimized out>, this=0x7ffd09f47ce8) at ../mpd-0.23.12/src/event/EpollBackend.hxx:60
#3 EventLoop::Wait(std::chrono::duration<long, std::ratio<1l, 1000000000l> >) (timeout=Python Exception <class 'gdb.error'>: value has been optimized out
, this=0x7ffd09f47458) at ../mpd-0.23.12/src/event/Loop.cxx:252
#4 EventLoop::Run() (this=0x7ffd09f47458) at ../mpd-0.23.12/src/event/Loop.cxx:343
#5 0x000055ef5dcb4c21 in BoundMethod<void () noexcept>::operator()() const (this=<optimized out>, this=<optimized out>) at ../mpd-0.23.12/src/util/BindMethod.hxx:78
#6 Thread::Run() (this=<optimized out>) at ../mpd-0.23.12/src/thread/Thread.cxx:63
#7 Thread::ThreadProc(void*) (ctx=<optimized out>) at ../mpd-0.23.12/src/thread/Thread.cxx:92
#8 0x00007f15f4bb044b in start_thread (arg=<optimized out>) at pthread_create.c:444
#9 0x00007f15f4c33d64 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100
Thread 6 (Thread 0x7f15e25ab6c0 (LWP 695)):
#0 0x00007f15f780d15b in III_huffdecode (part3_length=<optimized out>, sfbwidth=<optimized out>, channel=<optimized out>, xr=0x7f15e2597860, ptr=0x7f15e2598230) at /usr/src/debug/libmad/libmad-0.15.1b/layer3.c:1284
#1 III_decode (ptr=ptr@entry=0x7f15e2598230, frame=frame@entry=0x7f15e2598568, si=si@entry=0x7f15e2598240, nch=nch@entry=2, md_len=md_len@entry=381) at /usr/src/debug/libmad/libmad-0.15.1b/layer3.c:2479
#2 0x00007f15f780fba5 in mad_layer_III (stream=0x7f15e25984f0, frame=0x7f15e2598568) at /usr/src/debug/libmad/libmad-0.15.1b/layer3.c:2736
#3 0x00007f15f7811566 in mad_frame_decode (frame=0x7f15e2598568, stream=0x7f15e25984f0) at /usr/src/debug/libmad/libmad-0.15.1b/frame.c:467
#4 0x000055ef5dd051fc in MadDecoder::DecodeNextFrame(bool, Tag*) (this=this@entry=0x7f15e25984f0, skip=<optimized out>, tag=tag@entry=0x7f15e25984e0) at ../mpd-0.23.12/src/decoder/plugins/MadDecoderPlugin.cxx:403
#5 0x000055ef5dd06465 in MadDecoder::LoadNextFrame() (this=<optimized out>) at ../mpd-0.23.12/src/decoder/plugins/MadDecoderPlugin.cxx:913
#6 MadDecoder::Read() (this=0x7f15e25984f0) at ../mpd-0.23.12/src/decoder/plugins/MadDecoderPlugin.cxx:937
#7 MadDecoder::RunDecoder() (this=0x7f15e25984f0) at ../mpd-0.23.12/src/decoder/plugins/MadDecoderPlugin.cxx:964
#8 mad_decode(DecoderClient&, InputStream&) (client=<optimized out>, input_stream=<optimized out>) at ../mpd-0.23.12/src/decoder/plugins/MadDecoderPlugin.cxx:971
#9 0x000055ef5dc84a1e in DecoderPlugin::StreamDecode(DecoderClient&, InputStream&) const (is=..., client=..., this=0x55ef5ddb1ac0 <mad_decoder_plugin>) at ../mpd-0.23.12/src/decoder/DecoderPlugin.hxx:202
#10 decoder_stream_decode(DecoderPlugin const&, DecoderBridge&, InputStream&, std::unique_lock<std::mutex>&) (plugin=..., bridge=..., input_stream=..., lock=...) at ../mpd-0.23.12/src/decoder/Thread.cxx:119
#11 0x000055ef5dc8edee in TryDecoderFile (plugin=..., input_stream=..., suffix="mp3", path_fs=..., bridge=...) at ../mpd-0.23.12/src/decoder/Thread.cxx:349
#12 operator() (plugin=..., __closure=<synthetic pointer>) at ../mpd-0.23.12/src/decoder/Thread.cxx:430
#13 decoder_plugins_try<decoder_run_file(DecoderBridge&, char const*, Path)::<lambda(const DecoderPlugin&)> > (f=...) at ../mpd-0.23.12/src/decoder/DecoderList.hxx:72
#14 decoder_run_file (path_fs=..., uri_utf8=0x55ef5df3c970 "/mnt/Music/Joey Bada$$/2015 - B4.DA.$$/14 - O.C.B.mp3", bridge=...) at ../mpd-0.23.12/src/decoder/Thread.cxx:428
#15 DecoderUnlockedRunUri (path_fs=..., real_uri=0x55ef5df3c970 "/mnt/Music/Joey Bada$$/2015 - B4.DA.$$/14 - O.C.B.mp3", bridge=...) at ../mpd-0.23.12/src/decoder/Thread.cxx:448
#16 decoder_run_song (path_fs=..., uri=0x55ef5df3c970 "/mnt/Music/Joey Bada$$/2015 - B4.DA.$$/14 - O.C.B.mp3", song=..., dc=...) at ../mpd-0.23.12/src/decoder/Thread.cxx:510
#17 decoder_run(DecoderControl&) (dc=...) at ../mpd-0.23.12/src/decoder/Thread.cxx:551
#18 0x000055ef5dc8f649 in DecoderControl::RunThread() (this=0x7f15e2dab3a0) at ../mpd-0.23.12/src/decoder/Thread.cxx:576
#19 BindMethodDetail::WrapperGenerator<void (DecoderControl::*)() noexcept, &DecoderControl::RunThread>::Invoke(void*) (_instance=0x7f15e2dab3a0) at ../mpd-0.23.12/src/util/BindMethod.hxx:130
#20 0x000055ef5dcb4c21 in BoundMethod<void () noexcept>::operator()() const (this=<optimized out>, this=<optimized out>) at ../mpd-0.23.12/src/util/BindMethod.hxx:78
#21 Thread::Run() (this=<optimized out>) at ../mpd-0.23.12/src/thread/Thread.cxx:63
#22 Thread::ThreadProc(void*) (ctx=<optimized out>) at ../mpd-0.23.12/src/thread/Thread.cxx:92
#23 0x00007f15f4bb044b in start_thread (arg=<optimized out>) at pthread_create.c:444
#24 0x00007f15f4c33d64 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100
Thread 5 (Thread 0x7f15e2dac6c0 (LWP 694)):
#0 0x00007f15f4bacf0e in __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x55ef5de9d9d4) at futex-internal.c:57
#1 __futex_abstimed_wait_common (futex_word=futex_word@entry=0x55ef5de9d9d4, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0, cancel=cancel@entry=true) at futex-internal.c:87
#2 0x00007f15f4bacf8f in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x55ef5de9d9d4, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at futex-internal.c:139
#3 0x00007f15f4baf7a0 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x55ef5de9d980, cond=0x55ef5de9d9a8) at pthread_cond_wait.c:503
#4 ___pthread_cond_wait (cond=0x55ef5de9d9a8, mutex=0x55ef5de9d980) at pthread_cond_wait.c:618
#5 0x00007f15f4ed9e11 in __gthread_cond_wait (__mutex=<optimized out>, __cond=0x55ef5de9d9a8) at /usr/src/debug/gcc/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:865
#6 std::__condvar::wait(std::mutex&) (__m=<optimized out>, this=0x55ef5de9d9a8) at /usr/src/debug/gcc/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/std_mutex.h:171
#7 std::condition_variable::wait(std::unique_lock<std::mutex>&) (this=this@entry=0x55ef5de9d9a8, __lock=...) at /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/condition_variable.cc:41
#8 0x000055ef5dc99b0d in PlayerControl::Wait(std::unique_lock<std::mutex>&) (lock=..., this=0x55ef5de9d938) at ../mpd-0.23.12/src/player/Control.hxx:377
#9 PlayerControl::WaitOutputConsumed(std::unique_lock<std::mutex>&, unsigned int) (threshold=64, lock=..., this=0x55ef5de9d938) at ../mpd-0.23.12/src/player/Control.cxx:54
#10 PlayerControl::WaitOutputConsumed(std::unique_lock<std::mutex>&, unsigned int) (this=this@entry=0x55ef5de9d938, lock=..., threshold=threshold@entry=64) at ../mpd-0.23.12/src/player/Control.cxx:49
#11 0x000055ef5dc9f96c in PlayerControl::LockWaitOutputConsumed(unsigned int) (threshold=64, this=0x55ef5de9d938) at ../mpd-0.23.12/src/player/Control.hxx:437
#12 Player::PlayNextChunk() (this=0x7f15e2dab2d0) at ../mpd-0.23.12/src/player/Thread.cxx:836
#13 Player::Run() (this=0x7f15e2dab2d0) at ../mpd-0.23.12/src/player/Thread.cxx:1078
#14 do_play (buffer=..., dc=..., pc=...) at ../mpd-0.23.12/src/player/Thread.cxx:1158
#15 PlayerControl::RunThread() (this=0x55ef5de9d938) at ../mpd-0.23.12/src/player/Thread.cxx:1184
#16 0x000055ef5dcb4c21 in BoundMethod<void () noexcept>::operator()() const (this=<optimized out>, this=<optimized out>) at ../mpd-0.23.12/src/util/BindMethod.hxx:78
#17 Thread::Run() (this=<optimized out>) at ../mpd-0.23.12/src/thread/Thread.cxx:63
#18 Thread::ThreadProc(void*) (ctx=<optimized out>) at ../mpd-0.23.12/src/thread/Thread.cxx:92
#19 0x00007f15f4bb044b in start_thread (arg=<optimized out>) at pthread_create.c:444
#20 0x00007f15f4c33d64 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100
Thread 4 (Thread 0x7f15e08346c0 (LWP 11653)):
#0 0x00007f15f4c34266 in epoll_wait (epfd=24, events=events@entry=0x7f15e0833120, maxevents=32, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
#1 0x00007f15fa15e779 in impl_pollfd_wait (object=<optimized out>, pfd=<optimized out>, ev=0x7f15e08332f0, n_ev=<optimized out>, timeout=<optimized out>) at ../pipewire/spa/plugins/support/system.c:137
#2 0x00007f15fa150213 in loop_iterate (object=0x7f15cc00b728, timeout=-1) at ../pipewire/spa/plugins/support/loop.c:409
#3 0x00007f15f73f84cf in do_loop (user_data=0x7f15cc009250) at ../pipewire/src/pipewire/data-loop.c:61
#4 0x00007f15f4bb044b in start_thread (arg=<optimized out>) at pthread_create.c:444
#5 0x00007f15f4c33d64 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100
Thread 3 (Thread 0x7f15e19aa6c0 (LWP 696)):
#0 futex_wait (private=0, expected=2, futex_word=0x7f15cc000b98) at ../sysdeps/nptl/futex-internal.h:146
#1 __GI___lll_lock_wait (futex=futex@entry=0x7f15cc000b98, private=0) at lowlevellock.c:49
#2 0x00007f15f4bb391a in lll_mutex_lock_optimized (mutex=0x7f15cc000b98) at pthread_mutex_lock.c:48
#3 ___pthread_mutex_lock (mutex=mutex@entry=0x7f15cc000b98) at pthread_mutex_lock.c:128
#4 0x00007f15f743b863 in do_lock (this=this@entry=0x7f15cc000b70) at ../pipewire/src/pipewire/thread-loop.c:52
#5 0x00007f15f743bb4d in pw_thread_loop_lock (loop=0x7f15cc000b70) at ../pipewire/src/pipewire/thread-loop.c:362
#6 0x000055ef5dcf344e in PipeWire::ThreadLoopLock::ThreadLoopLock(pw_thread_loop*) (_loop=0x7f15cc000b70, this=<synthetic pointer>) at ../mpd-0.23.12/src/lib/pipewire/ThreadLoop.hxx:45
#7 PipeWireOutput::Play(void const*, unsigned long) (this=0x55ef5decc1d0, chunk=0x7f15e19ab048, size=4024) at ../mpd-0.23.12/src/output/plugins/PipeWireOutputPlugin.cxx:842
#8 0x000055ef5dce5f10 in FilteredAudioOutput::Play(void const*, unsigned long) (size=<optimized out>, data=<optimized out>, this=<optimized out>) at ../mpd-0.23.12/src/output/Filtered.cxx:179
#9 AudioOutputControl::PlayChunk(std::unique_lock<std::mutex>&) (lock=..., this=0x55ef5decc690) at ../mpd-0.23.12/src/output/Thread.cxx:268
#10 AudioOutputControl::InternalPlay(std::unique_lock<std::mutex>&) (lock=..., this=0x55ef5decc690) at ../mpd-0.23.12/src/output/Thread.cxx:323
#11 AudioOutputControl::Task() (this=0x55ef5decc690) at ../mpd-0.23.12/src/output/Thread.cxx:447
#12 BindMethodDetail::WrapperGenerator<void (AudioOutputControl::*)() noexcept, &AudioOutputControl::Task>::Invoke(void*) (_instance=0x55ef5decc690) at ../mpd-0.23.12/src/util/BindMethod.hxx:130
#13 0x000055ef5dcb4c21 in BoundMethod<void () noexcept>::operator()() const (this=<optimized out>, this=<optimized out>) at ../mpd-0.23.12/src/util/BindMethod.hxx:78
#14 Thread::Run() (this=<optimized out>) at ../mpd-0.23.12/src/thread/Thread.cxx:63
#15 Thread::ThreadProc(void*) (ctx=<optimized out>) at ../mpd-0.23.12/src/thread/Thread.cxx:92
#16 0x00007f15f4bb044b in start_thread (arg=<optimized out>) at pthread_create.c:444
#17 0x00007f15f4c33d64 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100
Thread 2 (Thread 0x7f15e35ad6c0 (LWP 693)):
#0 0x00007f15f4c34266 in epoll_wait (epfd=8, events=0x7f15e35ac440, maxevents=16, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
#1 0x000055ef5dcb9fd0 in EpollFD::Wait(epoll_event*, int, int) (timeout=<optimized out>, maxevents=16, events=0x7f15e35ac440, this=0x7ffd09f485a8) at ../mpd-0.23.12/src/io/FileDescriptor.hxx:104
#2 EpollBackend::ReadEvents(int) (timeout_ms=<optimized out>, this=0x7ffd09f485a8) at ../mpd-0.23.12/src/event/EpollBackend.hxx:60
#3 EventLoop::Wait(std::chrono::duration<long, std::ratio<1l, 1000000000l> >) (timeout=Python Exception <class 'gdb.error'>: value has been optimized out
, this=0x7ffd09f47d18) at ../mpd-0.23.12/src/event/Loop.cxx:252
#4 EventLoop::Run() (this=0x7ffd09f47d18) at ../mpd-0.23.12/src/event/Loop.cxx:343
#5 0x000055ef5dcb4c21 in BoundMethod<void () noexcept>::operator()() const (this=<optimized out>, this=<optimized out>) at ../mpd-0.23.12/src/util/BindMethod.hxx:78
#6 Thread::Run() (this=<optimized out>) at ../mpd-0.23.12/src/thread/Thread.cxx:63
#7 Thread::ThreadProc(void*) (ctx=<optimized out>) at ../mpd-0.23.12/src/thread/Thread.cxx:92
#8 0x00007f15f4bb044b in start_thread (arg=<optimized out>) at pthread_create.c:444
#9 0x00007f15f4c33d64 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100
Thread 1 (Thread 0x7f15e11a96c0 (LWP 697)):
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1 0x00007f15f4bb22d3 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2 0x00007f15f4b62a08 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3 0x00007f15f4b4b538 in __GI_abort () at abort.c:79
#4 0x00007f15e08f5adf in assert_single_pod (builder=<optimized out>) at ../pipewire/src/modules/module-protocol-native.c:1375
#5 assert_single_pod (builder=0x7f15cc071c70) at ../pipewire/src/modules/module-protocol-native.c:1368
#6 impl_ext_end_proxy (proxy=<optimized out>, builder=0x7f15cc071c70) at ../pipewire/src/modules/module-protocol-native.c:1385
#7 0x00007f15e08fa7f3 in core_event_demarshal_ping (data=<optimized out>, msg=<optimized out>) at ../pipewire/src/modules/module-protocol-native/protocol-native.c:348
#8 0x00007f15e08f2d6b in process_remote (impl=impl@entry=0x7f15cc08a6b0) at ../pipewire/src/modules/module-protocol-native.c:946
#9 0x00007f15e08f3410 in on_remote_data (data=0x7f15cc08a6b0, fd=28, mask=1) at ../pipewire/src/modules/module-protocol-native.c:980
#10 0x00007f15fa15035d in loop_iterate (object=<optimized out>, timeout=<optimized out>) at ../pipewire/spa/plugins/support/loop.c:439
#11 0x00007f15f743b9ba in do_loop (user_data=0x7f15cc000b70) at ../pipewire/src/pipewire/thread-loop.c:286
#12 0x00007f15f4bb044b in start_thread (arg=<optimized out>) at pthread_create.c:444
#13 0x00007f15f4c33d64 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100
I'm also fairly certain that this crash never happened with PipeWire 0.3.69 (and older).
How Reproducible:
0/5. I couldn't reproduce the crash anymore, even though I remember the exact steps I took:
- Added two songs from the same album to the MPD queue using Cantata
- Tried to play the first song using Cantata (double-clicked on it)
- Cantata disconnects because MPD crashed
Steps to Reproduce:
N/A
Actual Results:
libpipewire causes an assertion crashing MPD
Expected Results:
No assertion/crash
Additional Info (as attachments):
-
pw-dump > pw-dump.log
: pw-dump.log