pulseaudio crashed with SIGSEGV in publish_service() from once_callback() from dispatch_defer() from pa_mainloop_dispatch() from pa_mainloop_iterate()

Bug #1690051 reported by errors.ubuntu.com bug bridge
36
This bug affects 4 people
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Confirmed
High
Unassigned

Bug Description

The Ubuntu Error Tracker has been receiving reports about a problem regarding pulseaudio. This problem was most recently seen with package version 1:10.0-1ubuntu2, the problem page at https://errors.ubuntu.com/problem/c39b5c96e18a9e1b48ea983380914ce29fd79134 contains more details, including versions of packages affected, stacktrace or traceback, and individual crash reports.
If you do not have access to the Ubuntu Error Tracker you can request it at http://forms.canonical.com/reports/.

Tags: bionic xenial
Changed in pulseaudio (Ubuntu):
importance: Undecided → High
status: New → Confirmed
summary: - /usr/bin/pulseaudio:11:publish_service:once_callback:dispatch_defer:pa_mainloop_dispatch:pa_mainloop_iterate
+ pulseaudio crashed with SIGSEGV in publish_service() from
+ once_callback() from dispatch_defer() from pa_mainloop_dispatch() from
+ pa_mainloop_iterate()
tags: added: artful
tags: added: bionic
Revision history for this message
Owen Williams (ywwg) wrote :

From my own debugging, the crash appears to be in this line:

if (!s->userdata->client || avahi_client_get_state(s->userdata->client) != AVAHI_CLIENT_S_RUNNING)
        return;

adding a check for !s->userdata seems to fix the issue (for some reason, probably due to a race condition, userdata is null at the time of the call).

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Looks like the crash stopped happening in PulseAudio 12. Can you please try Ubuntu 18.10?

Revision history for this message
Owen Williams (ywwg) wrote :

I was really hoping to keep this machine on LTS, is the fix not going to be backported?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

There is no known fix to backport. I am just trying to confirm if it really has stopped happening in version 12.

tags: removed: artful vivid wily yakkety zesty
Revision history for this message
Owen Williams (ywwg) wrote :

I am still getting the crash, but the location of it has changed. Now it dies at
    txt = avahi_string_list_add_pair(txt, "device", s->name);

Thread 4 "avahi-ml" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe5984700 (LWP 5939)]
0x000055555590f820 in ?? ()
(gdb) bt
#0 0x000055555590f820 in ?? ()
#1 0x00007ffff7657566 in pa_hashmap_get (h=h@entry=0x5555557ee040, key=key@entry=0x7fffe5faa028)
    at pulsecore/hashmap.c:182
#2 0x00007ffff7642901 in pa_proplist_gets (p=0x5555557ee040, key=key@entry=0x7fffe5faa028 "device.description")
    at pulse/proplist.c:283
#3 0x00007fffe5fa846c in publish_service (api=<optimized out>, service=0x5555558bc280)
    at modules/module-zeroconf-publish.c:318
#4 0x00007ffff73fd578 in once_callback (m=0x5555559484b8, e=0x555555831ac0, userdata=<optimized out>)
    at pulse/mainloop-api.c:45
#5 0x00007ffff74002ad in dispatch_defer (m=0x555555948460) at pulse/mainloop.c:680
#6 pa_mainloop_dispatch (m=m@entry=0x555555948460) at pulse/mainloop.c:889
#7 0x00007ffff74004de in pa_mainloop_iterate (m=0x555555948460, block=<optimized out>, retval=0x0)
    at pulse/mainloop.c:929
#8 0x00007ffff7400560 in pa_mainloop_run (m=0x555555948460, retval=retval@entry=0x0) at pulse/mainloop.c:944
#9 0x00007ffff740e3c9 in thread (userdata=0x555555823ae0) at pulse/thread-mainloop.c:100
#10 0x00007ffff767e318 in internal_thread_func (userdata=0x555555874580) at pulsecore/thread-posix.c:81
#11 0x00007ffff6b676db in start_thread (arg=0x7fffe5984700) at pthread_create.c:463
#12 0x00007ffff60e688f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb)

this is with pulseaudio_11.1-1ubuntu7.2

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Owen, that sounds like bug 1679744.

Revision history for this message
Owen Williams (ywwg) wrote :

so it is, thanks! So I think we can say this original bug is obsolete / already fixed

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.