Bug 76184 - pulseaudio-5.0 - segfault on module load/unload
Summary: pulseaudio-5.0 - segfault on module load/unload
Status: RESOLVED FIXED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: daemon (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-14 16:39 UTC by Alexander Tsoy
Modified: 2014-03-28 13:09 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
backtrace (22.65 KB, text/plain)
2014-03-14 16:39 UTC, Alexander Tsoy
Details
Fix 1/2 (1.04 KB, patch)
2014-03-15 07:41 UTC, Tanu Kaskinen
Details | Splinter Review
Fix 2/2 (2.82 KB, patch)
2014-03-15 07:42 UTC, Tanu Kaskinen
Details | Splinter Review
backtrace2 (21.31 KB, text/plain)
2014-03-17 10:05 UTC, Alexander Tsoy
Details
Another fix (1.76 KB, patch)
2014-03-18 08:25 UTC, Tanu Kaskinen
Details | Splinter Review
Another fix (3.24 KB, patch)
2014-03-19 07:52 UTC, Tanu Kaskinen
Details | Splinter Review

Description Alexander Tsoy 2014-03-14 16:39:52 UTC
Created attachment 95817 [details]
backtrace

pulseaudio-5.0 segfaults on startup when I login to the gnome session. BT is attached.
Comment 1 Alexander Tsoy 2014-03-14 16:50:27 UTC
My local default.pa:

$ cat ~/.config/pulse/default.pa 
#!/usr/bin/pulseaudio -nF

.include /etc/pulse/default.pa

.nofail
load-module module-tunnel-sink server=192.168.11.239
unload-module module-zeroconf-publish
.fail


So module-zeroconf-publish is loaded in global default.pa and then unloaded in the local one. Commenting out "unload-module module-zeroconf-publish" fixes segfaults.
Comment 2 Alexander Tsoy 2014-03-14 21:32:15 UTC
Another way to reproduce this crash:

$ echo -e 'load-module module-zeroconf-publish\nunload-module module-zeroconf-publish' | pacmd
Comment 3 Tanu Kaskinen 2014-03-15 07:40:06 UTC
Thanks for the report! I sent a couple of patches that should fix this bug to the mailing list (not yet reached the list at the time of writing), I'll attach them here also.
Comment 4 Tanu Kaskinen 2014-03-15 07:41:36 UTC
Created attachment 95840 [details] [review]
Fix 1/2
Comment 5 Tanu Kaskinen 2014-03-15 07:42:00 UTC
Created attachment 95841 [details] [review]
Fix 2/2
Comment 6 Alexander Tsoy 2014-03-17 10:05:10 UTC
Created attachment 95919 [details]
backtrace2

Thank you for the quick response! These patches fixed the crash of pulse at startup. However I still can reproduce the crash using command from comment 2. Attaching the new backtrace.
Comment 7 Tanu Kaskinen 2014-03-18 08:25:17 UTC
I'll attach another patch. It should finally fix also the pacmd test case.

module-zeroconf-publish appears to still have threading issues, but I couldn't reproduce the crash any more. I'll fix those remaining issues some time later.
Comment 8 Tanu Kaskinen 2014-03-18 08:25:51 UTC
Created attachment 95990 [details] [review]
Another fix
Comment 9 Tanu Kaskinen 2014-03-19 07:52:36 UTC
Created attachment 96028 [details] [review]
Another fix

The previous patch (the mainloop one) isn't the best way to fix the issue, here's a better patch.
Comment 10 Tanu Kaskinen 2014-03-28 13:09:42 UTC
The patches have now been committed.


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.