GNOME Bugzilla – Bug 796162
SIGPIPE when playing notification sound
Last modified: 2018-09-19 21:02:18 UTC
I can reproduce this 100% by making Okular produce two sound notifications (not very quickly one after the other) I'll be reported this to pulseaudio in https://bugs.freedesktop.org/show_bug.cgi?id=106540 Thread 21 "queue0:src" received signal SIGPIPE, Broken pipe.
+ Trace 238618
Thread 1 (Thread 0x7ffff7f8de80 (LWP 27699))
Thanks for the bug report. Not sure if this is a GStreamer issue. Looks to be in pulseaudio or libpulse, rather. I suspect the server died when this happens?
I opened it here because from the way packages where updated on my distro seems to be triggered by the new gstreamer version (doesn't mean that gstreamer is the one at fault, of course). If you mean the pulseaudio process, no it stays up just fine after the crash.
(I'm from PulseAudio, not a GStreamer developer.) Based on the backtrace, the crash seems to happen, because pa_mainloop tries to write to an internal pipe that has been closed. The pipe is closed only in pa_mainloop_free(), so it seems that the mainloop is being used after freeing it. pulsesink uses pa_threaded_mainloop, so pa_mainloop_free() is called from pa_threaded_mainloop_free(). There are a couple of calls to that in pulsesink.c. The crash happens in gst_pulseringbuffer_commit(). Is it possible that gst_pulseringbuffer_commit() is called after a pa_threaded_mainloop_free() call? One of those free() calls has a "mainloop = NULL" assignment right after it, and that should make gst_pulseringbuffer_commit() crash earlier if the free() call is the problem. The other free() call is done when starting the mainloop fails, so it's unlikely that gst_pulseringbuffer_commit() could be called in that situation. Now I noticed that there's a thread created by pa_threaded_mainloop running. Assuming that there aren't multiple pa_threaded_mainloops in use by the application, pa_threaded_mainloop_free() has certainly not been called. That raises the question: why does the internal wakeup pipe seem to be closed? Nobody else has access to it than pa_mainloop, and it doesn't close the pipe except when freeing the mainloop. Why would the pipe close by itself?
Is there anything i can do to help debug this? Because i'm getting more and more crashes being reported with this backtrace.
Probably that just masking SIGPIPE will solve your issue. It will then error in the code, which will be ignored if pulling down the pipeline.
So it seems it was actually a bug in okular, sorry for the noise :(