Bug 92780 - Segmentation fault
Summary: Segmentation fault
Status: RESOLVED FIXED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-02 20:17 UTC by Frederik Himpe
Modified: 2015-11-06 12:49 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Frederik Himpe 2015-11-02 20:17:15 UTC
I'm experiencing a segfault in pulseaudio, which seems to happen when a notification sound by GNOME or Skype is being played while I'm watching a movie clip using the Flash plug-in in Firefox.



Core was generated by `/usr/bin/pulseaudio --start --log-target=syslog'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000000000000000 in ?? ()
[Current thread is 1 (Thread 0x7fd9b70a68c0 (LWP 16268))]
(gdb) thread apply all bt

Thread 4 (Thread 0x7fd9b10e5700 (LWP 16273)):
#0  0x00007fd9b55755ef in __GI_ppoll (fds=0x910cc0, nfds=4, timeout=<optimized out>, sigmask=sigmask@entry=0x0) at ../sysdeps/unix/sysv/linux/ppoll.c:56
#1  0x00007fd9b6cd1a57 in ppoll (__ss=0x0, __timeout=<optimized out>, __nfds=<optimized out>, __fds=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/poll2.h:77
#2  pa_rtpoll_run (p=0xa01a90) at pulsecore/rtpoll.c:314
#3  0x00007fd9a32cb786 in thread_func (userdata=0xa06640) at modules/alsa/alsa-sink.c:1798
#4  0x00007fd9b6a6eff8 in internal_thread_func (userdata=0x9bc960) at pulsecore/thread-posix.c:81
#5  0x00007fd9b5f560a4 in start_thread (arg=0x7fd9b10e5700) at pthread_create.c:309
#6  0x00007fd9b557e06d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 3 (Thread 0x7fd9a32a1700 (LWP 16274)):
#0  0x00007fd9b55755ef in __GI_ppoll (fds=0x9279b0, nfds=4, timeout=<optimized out>, sigmask=sigmask@entry=0x0) at ../sysdeps/unix/sysv/linux/ppoll.c:56
#1  0x00007fd9b6cd1a57 in ppoll (__ss=0x0, __timeout=<optimized out>, __nfds=<optimized out>, __fds=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/poll2.h:77
#2  pa_rtpoll_run (p=0x91fc60) at pulsecore/rtpoll.c:314
#3  0x00007fd9a32d1e2a in thread_func (userdata=0x91fa40) at modules/alsa/alsa-source.c:1517
#4  0x00007fd9b6a6eff8 in internal_thread_func (userdata=0xa981a0) at pulsecore/thread-posix.c:81
#5  0x00007fd9b5f560a4 in start_thread (arg=0x7fd9a32a1700) at pthread_create.c:309
#6  0x00007fd9b557e06d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 2 (Thread 0x7fd9a2aa0700 (LWP 16275)):
#0  0x00007fd9b55755ef in __GI_ppoll (fds=0x9a0ca0, nfds=3, timeout=<optimized out>, sigmask=sigmask@entry=0x0) at ../sysdeps/unix/sysv/linux/ppoll.c:56
#1  0x00007fd9b6cd1a57 in ppoll (__ss=0x0, __timeout=<optimized out>, __nfds=<optimized out>, __fds=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/poll2.h:77
#2  pa_rtpoll_run (p=0x963b10) at pulsecore/rtpoll.c:314
#3  0x00007fd9a32cb8f2 in thread_func (userdata=0x9638c0) at modules/alsa/alsa-sink.c:1798
#4  0x00007fd9b6a6eff8 in internal_thread_func (userdata=0x9cacd0) at pulsecore/thread-posix.c:81
#5  0x00007fd9b5f560a4 in start_thread (arg=0x7fd9a2aa0700) at pthread_create.c:309
#6  0x00007fd9b557e06d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 1 (Thread 0x7fd9b70a68c0 (LWP 16268)):
#0  0x0000000000000000 in ?? ()
#1  0x00007fd9b6cce3e1 in pa_resampler_new (pool=<optimized out>, a=a@entry=0x7ffcf621f8d8, am=am@entry=0x7ffcf621f8e4, b=<optimized out>, bm=<optimized out>, 
    crossover_freq=<optimized out>, method=<optimized out>, flags=(unknown: 0)) at pulsecore/resampler.c:428
#2  0x00007fd9b6cdf85d in pa_sink_input_new (_i=_i@entry=0x7ffcf621f718, core=0x8bb8f0, data=data@entry=0x7ffcf621f890) at pulsecore/sink-input.c:450
#3  0x00007fd9b04d1fad in playback_stream_new (ret=<synthetic pointer>, missing=<synthetic pointer>, syncid=11, relative_volume=false, early_requests=false, 
    adjust_latency=true, p=0x93f0c0, flags=PA_SINK_INPUT_START_CORKED, muted_set=false, muted=false, volume=0x0, a=0x7ffcf621f730, formats=0x0, map=0x7ffcf621f770, 
    ss=0x7ffcf621f720, sink=0x0, c=0x9824c0) at pulsecore/protocol-native.c:1172
#4  command_create_playback_stream (pd=<optimized out>, command=<optimized out>, tag=<optimized out>, t=<optimized out>, userdata=<optimized out>)
    at pulsecore/protocol-native.c:2190
#5  0x00007fd9b6a59492 in pa_pdispatch_run (pd=0x936e20, packet=packet@entry=0x8ba850, ancil_data=ancil_data@entry=0x984850, userdata=userdata@entry=0x9824c0)
    at pulsecore/pdispatch.c:342
#6  0x00007fd9b04d28b5 in pstream_packet_callback (p=0x9845c0, packet=0x8ba850, ancil_data=0x984850, userdata=0x9824c0) at pulsecore/protocol-native.c:4899
---Type <return> to continue, or q <return> to quit---
#7  0x00007fd9b6a5bd8f in do_read (p=p@entry=0x9845c0, re=re@entry=0x984788) at pulsecore/pstream.c:870
#8  0x00007fd9b6a5e3eb in do_pstream_read_write (p=0x9845c0) at pulsecore/pstream.c:189
#9  0x00007fd9b6a5e694 in srb_callback (srb=<optimized out>, userdata=0x9845c0) at pulsecore/pstream.c:225
#10 0x00007fd9b6a5effa in srbchannel_rwloop (sr=0x965420) at pulsecore/srbchannel.c:190
#11 0x00007fd9b67f00f7 in dispatch_pollfds (m=0x8ba2e0) at pulse/mainloop.c:655
#12 pa_mainloop_dispatch (m=m@entry=0x8ba2e0) at pulse/mainloop.c:898
#13 0x00007fd9b67f04fc in pa_mainloop_iterate (m=0x8ba2e0, block=<optimized out>, retval=0x7ffcf621fc88) at pulse/mainloop.c:929
#14 0x00007fd9b67f05a0 in pa_mainloop_run (m=m@entry=0x8ba2e0, retval=retval@entry=0x7ffcf621fc88) at pulse/mainloop.c:944
#15 0x0000000000406dee in main (argc=<optimized out>, argv=<optimized out>) at daemon/main.c:1135

configuration:
### Read from configuration file: /etc/pulse/daemon.conf ###
daemonize = no
fail = yes
high-priority = yes
nice-level = -11
realtime-scheduling = yes
realtime-priority = 5
allow-module-loading = yes
allow-exit = yes
use-pid-file = yes
system-instance = no
local-server-type = user
cpu-limit = no
enable-shm = yes
flat-volumes = yes
lock-memory = no
exit-idle-time = 20
scache-idle-time = 20
dl-search-path = /usr/lib/pulse-7.0/modules
default-script-file = /etc/pulse/default.pa
load-default-script-file = yes
log-target = 
log-level = notice
resample-method = soxr-mq
enable-remixing = yes
enable-lfe-remixing = yes
lfe-crossover-freq = 120
default-sample-format = s16le
default-sample-rate = 44100
alternate-sample-rate = 48000
default-sample-channels = 2
default-channel-map = front-left,front-right
default-fragments = 4
default-fragment-size-msec = 25
enable-deferred-volume = yes
deferred-volume-safety-margin-usec = 8000
deferred-volume-extra-delay-usec = 0
shm-size-bytes = 0
log-meta = no
log-time = no
log-backtrace = 0
rlimit-fsize = -1
rlimit-data = -1
rlimit-stack = -1
rlimit-core = -1
rlimit-rss = -1
rlimit-as = -1
rlimit-nproc = -1
rlimit-nofile = 256
rlimit-memlock = -1
rlimit-locks = -1
rlimit-sigpending = -1
rlimit-msgqueue = -1
rlimit-nice = 31
rlimit-rtprio = 9
rlimit-rttime = 200000
Comment 1 Arun Raghavan 2015-11-03 03:32:39 UTC
Does this go away if you change your resample method to trivial?

If yes, how have you built/installed PulseAudio? You had some questions about the requirement of the presence of libsoxr0 on IRC as well?
Comment 2 Frederik Himpe 2015-11-05 19:26:49 UTC
I'm using the pulseaudio 7.0-1 package on Debian Stretch. It does not seem to have a dependency on lisoxr0 package. I am not sure whether this package is needed or not.

I can reproduce it like this: Play some music with Rhythmbox or Spotify, then go to http://speeltuin.stubru.be/bevergem/ and click on one of the sound clips. Thes sound gets distorted, and a few seconds later audio stops completely and Pulseaudio crashes.
Comment 3 Arun Raghavan 2015-11-06 05:26:41 UTC
Could you also answer my first question about switching to another (non-soxr-based) resampler?
Comment 4 Sjoerd Simons 2015-11-06 08:42:32 UTC
Pulse on debian doesn't seem to be build with soxr atm see:
  https://buildd.debian.org/status/fetch.php?pkg=pulseaudio&arch=amd64&ver=7.0-1+b1&stamp=1446593504

checking for LIBSOXR... no
Comment 5 Frederik Himpe 2015-11-06 08:56:42 UTC
Then I am suprised that the soxr resamples appear in the output of pulseaudio --dump-resample-methods. I guess that's a bug?

Then also should not an error be printed in the logs when an invalid resampler method is selected?

With trivial resampler it does not seem to crash.
Comment 6 Arun Raghavan 2015-11-06 12:49:47 UTC
The missing check is fixed now, and will be in the next release:

http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=daf326a9e4dcd5c9d716e6c2fc0a07b99f6ee1c0


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.