Bug 105578 - SIGSEGV for module-allow-passthrough
Summary: SIGSEGV for module-allow-passthrough
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: modules (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
Depends on:
Blocks: 102546
  Show dependency treegraph
Reported: 2018-03-18 14:32 UTC by naroyce
Modified: 2018-05-06 02:37 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:

pactl list (26.80 KB, text/x-log)
2018-03-26 12:56 UTC, naroyce

Description naroyce 2018-03-18 14:32:18 UTC
 upgraded pulseaudio (11.0-1 -> 11.1-1)
 upgraded vlc (2.2.8-4 -> 3.0.1-2)

Viewing a video in vlc and pulseaudio crashes:
Thread 1 "pulseaudio" received signal SIGSEGV, Segmentation fault.
0x00007f55dbbf609e in ?? () from /usr/lib/pulse-11.1/modules/module-allow-passthrough.so
(gdb) thread apply all backtrace
Thread 4 (Thread 0x7f55eaecd700 (LWP 4214)):                                                                                                                                                                                                                                   
#0  0x00007f55f4ebfa76 in ppoll () from /usr/lib/libc.so.6                                                                                                                                                                                                                     
#1  0x00007f55f639cce0 in pa_rtpoll_run () from /usr/lib/pulseaudio/libpulsecore-11.1.so                                                                                                                                                                                       
#2  0x00007f55ec1ed772 in ?? () from /usr/lib/pulse-11.1/modules/libalsa-util.so                                                                                                                                                                                               
#3  0x00007f55f5ee881c in ?? () from /usr/lib/pulseaudio/libpulsecommon-11.1.so                                                                                                                                                                                                
#4  0x00007f55f539608c in start_thread () from /usr/lib/libpthread.so.0                                                                                                                                                                                                        
#5  0x00007f55f4ec9e7f in clone () from /usr/lib/libc.so.6                                                                                                                                                                                                                     
Thread 3 (Thread 0x7f55eb6ce700 (LWP 4213)):                                                                                                                                                                                                                                   
#0  0x00007f55f4ebfa76 in ppoll () from /usr/lib/libc.so.6                                                                                                                                                                                                                     
#1  0x00007f55f639cce0 in pa_rtpoll_run () from /usr/lib/pulseaudio/libpulsecore-11.1.so                                                                                                                                                                                       
#2  0x00007f55ec1e703e in ?? () from /usr/lib/pulse-11.1/modules/libalsa-util.so                                                                                                                                                                                               
#3  0x00007f55f5ee881c in ?? () from /usr/lib/pulseaudio/libpulsecommon-11.1.so                                                                                                                                                                                                
#4  0x00007f55f539608c in start_thread () from /usr/lib/libpthread.so.0                                                                                                                                                                                                        
#5  0x00007f55f4ec9e7f in clone () from /usr/lib/libc.so.6                                                                                                                                                                                                                     
Thread 2 (Thread 0x7f55ebecf700 (LWP 4212)):                                                                                                                                                                                                                                   
#0  0x00007f55f4ebfa76 in ppoll () from /usr/lib/libc.so.6                                                                                                                                                                                                                     
#1  0x00007f55f639cce0 in pa_rtpoll_run () from /usr/lib/pulseaudio/libpulsecore-11.1.so                                                                                                                                                                                       
#2  0x00007f55ec1e703e in ?? () from /usr/lib/pulse-11.1/modules/libalsa-util.so                                                                                                                                                                                               
#3  0x00007f55f5ee881c in ?? () from /usr/lib/pulseaudio/libpulsecommon-11.1.so                                                                                                                                                                                                
#4  0x00007f55f539608c in start_thread () from /usr/lib/libpthread.so.0                                                                                                                                                                                                        
#5  0x00007f55f4ec9e7f in clone () from /usr/lib/libc.so.6                                                            
Thread 1 (Thread 0x7f55f67e2c80 (LWP 4211)):                                                                          
#0  0x00007f55dbbf609e in ?? () from /usr/lib/pulse-11.1/modules/module-allow-passthrough.so                          
#1  0x00007f55dbbf6477 in ?? () from /usr/lib/pulse-11.1/modules/module-allow-passthrough.so                          
#2  0x00007f55dbbf6609 in ?? () from /usr/lib/pulse-11.1/modules/module-allow-passthrough.so                          
#3  0x00007f55f63914b3 in pa_hook_fire () from /usr/lib/pulseaudio/libpulsecore-11.1.so                               
#4  0x00007f55f63aa4b7 in pa_sink_input_new () from /usr/lib/pulseaudio/libpulsecore-11.1.so                          
#5  0x00007f55ed26b38a in ?? () from /usr/lib/pulse-11.1/modules/libprotocol-native.so                                
#6  0x00007f55f5ed1dcb in pa_pdispatch_run () from /usr/lib/pulseaudio/libpulsecommon-11.1.so                         
#7  0x00007f55ed26bd56 in ?? () from /usr/lib/pulse-11.1/modules/libprotocol-native.so                                
#8  0x00007f55f5ed4c1f in ?? () from /usr/lib/pulseaudio/libpulsecommon-11.1.so                                       
#9  0x00007f55f5ed77cb in ?? () from /usr/lib/pulseaudio/libpulsecommon-11.1.so                                       
#10 0x00007f55f5ed7b8a in ?? () from /usr/lib/pulseaudio/libpulsecommon-11.1.so
#11 0x00007f55f5ed8440 in ?? () from /usr/lib/pulseaudio/libpulsecommon-11.1.so
#12 0x00007f55f613aea8 in pa_mainloop_dispatch () from /usr/lib/libpulse.so.0
#13 0x00007f55f613b280 in pa_mainloop_iterate () from /usr/lib/libpulse.so.0
#14 0x00007f55f613b301 in pa_mainloop_run () from /usr/lib/libpulse.so.0
#15 0x000056067d681d76 in main ()

Commenting out "load-module module-allow-passthrough" in my /etc/pulse/default.pa, and vlc played the video with no problems.
Comment 1 Tanu Kaskinen 2018-03-18 20:02:16 UTC
Can you get the backtrace again with debug symbols installed? Arch specific instructions can be found on this page: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Community/

I should warn you, though: the instructions tell you to install the pulseaudio-git package, and the current git version has another bad crash bug that occurs when plugging headphones or HDMI in or out, so avoid doing that. The bug should get fixed in the near future, so if this bothers you, you may want to wait before installing pulseaudio-git.

Can you also attach the output from "pactl list" so that I get a better idea of how your hardware looks? Use the "Add an attachment" link (avoid pasting long things in the comment box, since that makes following the discussion difficult).

Since this is a crash bug, I'll mark this as a release blocker.
Comment 2 Tanu Kaskinen 2018-03-18 20:10:01 UTC
Never mind, I can reproduce the crash myself, so I probably won't need more information from you.
Comment 3 Tanu Kaskinen 2018-03-26 06:28:55 UTC
Now that I wanted to start working on this, I can't reproduce the crash any more... Maybe it depends on the video file's audio format. I have unfortunately deleted the file that I used before to reproduce the crash.

Can you install the git version of pulseaudio (I referred to the instructions earlier)? The other crash that I mentioned earlier is now fixed, so I don't expect there to be any extra problems with the git version any more.

Does the crash happen with all files (audio-only as well as video)?

The output of "pactl list" would still be interesting, although I don't think this is a hardware specific problem.
Comment 4 naroyce 2018-03-26 12:56:30 UTC
Created attachment 138357 [details]
pactl list

FYI, the git version does look older than Archs.
$ coredumpctl dump <#>
                Stack trace of thread 1858:
                #0  0x00007f04846e109e sink_has_passthrough_stream (module-allow-passthrough.so)
                #1  0x00007f04846e1477 new_normal_stream (module-allow-passthrough.so)
                #2  0x00007f04846e1609 sink_input_new_cb (module-allow-passthrough.so)
                #3  0x00007f0492614643 pa_hook_fire (libpulsecore-11.0.so)
                #4  0x00007f049262d717 pa_sink_input_new (libpulsecore-11.0.so)
                #5  0x00007f04894ee40a playback_stream_new (libprotocol-native.so)
                #6  0x00007f0492154d5b pa_pdispatch_run (libpulsecommon-11.0.so)
                #7  0x00007f04894eede6 pstream_packet_callback (libprotocol-native.so)
                #8  0x00007f0492157baf do_read (libpulsecommon-11.0.so)
                #9  0x00007f049215a75b do_pstream_read_write (libpulsecommon-11.0.so)
                #10 0x00007f049215ab1a srb_callback (libpulsecommon-11.0.so)
                #11 0x00007f049215b3d0 srbchannel_rwloop (libpulsecommon-11.0.so)
                #12 0x00007f04923bdef8 dispatch_pollfds (libpulse.so.0)
                #13 0x00007f04923be2d0 pa_mainloop_iterate (libpulse.so.0)
                #14 0x00007f04923be351 pa_mainloop_run (libpulse.so.0)
                #15 0x00005626edfa7b54 main (pulseaudio)
                #16 0x00007f0491077f4a __libc_start_main (libc.so.6)
                #17 0x00005626edfa822a _start (pulseaudio)
                Stack trace of thread 1859:
                #0  0x00007f0491142a76 ppoll (libc.so.6)
                #1  0x00007f049261fed0 ppoll (libpulsecore-11.0.so)
                #2  0x00007f048846860e thread_func (libalsa-util.so)
                #3  0x00007f049216b7ac internal_thread_func (libpulsecommon-11.0.so)
                #4  0x00007f049161908c start_thread (libpthread.so.0)
                #5  0x00007f049114ce7f __clone (libc.so.6)
                Stack trace of thread 1860:
                #0  0x00007f0491142a76 ppoll (libc.so.6)
                #1  0x00007f049261fed0 ppoll (libpulsecore-11.0.so)
                #2  0x00007f048846efc2 thread_func (libalsa-util.so)
                #3  0x00007f049216b7ac internal_thread_func (libpulsecommon-11.0.so)
                #4  0x00007f049161908c start_thread (libpthread.so.0)
                #5  0x00007f049114ce7f __clone (libc.so.6)
Comment 5 naroyce 2018-03-26 13:07:37 UTC
I also meant to add:
$ mediainfo <filename>
ID                                       : 2
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Codec ID                                 : ac-3
Duration                                 : 13 s 408 ms
Bit rate mode                            : Constant
Bit rate                                 : 192 kb/s
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Bit depth                                : 16 bits
Compression mode                         : Lossy
Stream size                              : 314 KiB (11%)
Service kind                             : Complete Main
Default                                  : Yes
Alternate group                          : 1
And it also happens when I play the test file I had ffmpeg audio-copied only.
I also tested an ffmpeg aac->ac3 audio-only, and the aac one will play fine, but ac3 borks.
Comment 6 Tanu Kaskinen 2018-03-28 15:47:31 UTC
Thanks! I got myself an AC3 file and can reproduce this again. It may take a bit of time for me to return to this, since other urgent work cropped up, but that shouldn't take too long.
Comment 8 Arun Raghavan 2018-05-06 02:37:09 UTC
Pushed a fix for this, which will be in PulseAudio 12.0.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.