gnome-settings-daemon crashed with SIGABRT in raise()

Bug #750334 reported by JeSTeR7
156
This bug affects 12 people
Affects Status Importance Assigned to Milestone
gnome-settings-daemon (Ubuntu)
Fix Released
Medium
Rodrigo Moya

Bug Description

Binary package hint: gnome-settings-daemon

Crashed while receiving an instant message in empathy. Noticed that the sound crashed too, maybe it's related?

ProblemType: Crash
DistroRelease: Ubuntu 11.04
Package: gnome-settings-daemon 2.32.1-0ubuntu12
ProcVersionSignature: Ubuntu 2.6.38-7.39-generic 2.6.38
Uname: Linux 2.6.38-7-generic x86_64
Architecture: amd64
Date: Mon Apr 4 10:25:10 2011
ExecutablePath: /usr/lib/gnome-settings-daemon/gnome-settings-daemon
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Beta 1 amd64 (20110329.1)
ProcCmdline: /usr/lib/gnome-settings-daemon/gnome-settings-daemon
ProcEnviron:
 LANGUAGE=en_US:en
 LANG=en_US.UTF-8
 SHELL=/bin/bash
Signal: 6
SourcePackage: gnome-settings-daemon
StacktraceTop:
 raise () from /lib/x86_64-linux-gnu/libc.so.6
 abort () from /lib/x86_64-linux-gnu/libc.so.6
 pa_context_set_sink_volume_by_index () from /usr/lib/libpulse.so.0
 ?? () from /usr/lib/gnome-settings-daemon-2.0/libmedia-keys.so
 gvc_mixer_stream_push_volume () from /usr/lib/gnome-settings-daemon-2.0/libmedia-keys.so
Title: gnome-settings-daemon crashed with SIGABRT in raise()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Related branches

Revision history for this message
JeSTeR7 (cblocker) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
 abort () at abort.c:92
 pa_context_set_sink_volume_by_index (c=0x20b9520, idx=0, volume=0x21170c8, cb=0, userdata=0x0) at pulse/introspect.c:1170
 gvc_mixer_sink_push_volume (stream=<value optimized out>, op=0x7fff583a6718) at gvc-mixer-sink.c:66
 gvc_mixer_stream_push_volume (stream=0x205d160) at gvc-mixer-stream.c:665

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in gnome-settings-daemon (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
visibility: private → public
affects: gnome-settings-daemon (Ubuntu) → pulseaudio (Ubuntu)
Revision history for this message
David Henningsson (diwic) wrote :

Hmm, there seems to be more than one problem here.
1) For some reason, we lose connection to pulseaudio (or never get it). That's a problem in itself.
2) Libcanberra and the pulse client library gets stuck in infinite recursion (i e eating stack space) when trying to reconnect.
3) While reconnecting the pulseaudio context is invalid and so when someone press a volume key it tries to dereference this invalid context, and so it crashes.

Changed in pulseaudio (Ubuntu):
status: New → Triaged
Revision history for this message
David Henningsson (diwic) wrote :

Hmm, so if I do the following:

echo "autospawn=no" > ~/.pulse/client.conf
pulseaudio -k

...and then press volume media keys, I get this error i .xsession-errors:

** (gnome-settings-daemon:1476): WARNING **: pa_context_set_sink_volume_by_index() failed: Felaktigt tillstånd

...which *seems* to be at the same row that causes this crash, however in my case it doesn't crash, it continues to work once pulseaudio is up again. Anyway this error is caused by GsdMediaKeysManager contains a reference to manager->priv->stream, which no longer exists since it (and its pa_context) is destroyed in GvcMixerControl's idle_reconnect function.

Revision history for this message
David Henningsson (diwic) wrote :

The dereference of a dangling pa_context should be fixed in gnome-settings-daemon rather than PA.

affects: pulseaudio (Ubuntu) → gnome-settings-daemon (Ubuntu)
Changed in gnome-settings-daemon (Ubuntu):
assignee: nobody → Rodrigo Moya (rodrigo-moya)
status: Triaged → In Progress
Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

JeSTeR7: can you easily replicate this problem? If so, could you please build and test the attached branch to see if it fixes it for you? That is:

$ bzr get lp:~rodrigo-moya/ubuntu/natty/gnome-settings-daemon/fix-750334
$ sudo apt-get install bzr-builddeb
$ cd fix-750334
$ bzr bd -- -b

this will create the .deb's in ../build-area, so just:

$ sudo dpkg -i ../build-area/*deb

I ask because I can't replicate it at all, no crash here.

David, can you also please try it to see if it fixes your warning?

Revision history for this message
David Henningsson (diwic) wrote :

Hey Rodrigo and thanks for looking at this bug. A quick review (haven't tested yet) - isn't this patch a little much, e g if you plug in usb headphones, and then unplug them, wouldn't that cause the media keys to stop working?

Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

David, it shouldn't, since it will re-create the default sink when the headphones are unplugged. But good point anyway, so yes, will run with it over the weekend to make sure nothing breaks. Can you please do the same for a couple of days or so?

Revision history for this message
David Henningsson (diwic) wrote :

Built the package, installed it and rebooted. After reboot, media keys stops working immediately after boot (perhaps when the login sound stops playing?)
But perhaps your fix is on the right track nonetheless, and that you could just add a check against what stream is being removed (i e if id's match)?

Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

Right, should be indeed checking the id (I saw it on Friday, but had inet connection problems so couldn't push), so please pull the branch again, it should be working ok now (at least for me it seems to)

Revision history for this message
David Henningsson (diwic) wrote :

Result of testing your latest patch version - if I press media keys within ~5 seconds (which probably corresponds to the 5 second timer to idle_reconnect), I still get the warning message (and OSD), after that, I get neither warning message nor OSD.
After bringing PA up again things works normally again.

Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

The same warning as before? What does that warning mean (in English)?

Revision history for this message
David Henningsson (diwic) wrote :

Yes, and the warning translates to "Invalid state". In this case it could just as well mean "assertion failure", I guess.

Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

It is Bad State indeed, I guess this happens during the time it tries to reconnect to pulseaudio, so I would call this fixed with my latest additions to the branch, as we would need to remove the streams/sinks/etc outside of the idle_reconnect, and I'm not sure what the effect would be. At least with this branch we fix the crash, and the warning is "normal", as the state of the sink is invalid.

What do you think David?

Revision history for this message
David Henningsson (diwic) wrote :

Here's what I think: Neither us can reproduce the crash. Put your fix in a ppa so affected people can test and see if that helps against the crashes. If it is helpful, we can SRU the fix.

Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

Upstream accepted the patch, so I'm proposing my branch for merging/upload. I think it's safe, since I could replicate the crash once (only once though) without this patch and been unable to with this branch

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-settings-daemon - 2.32.1-0ubuntu13.1

---------------
gnome-settings-daemon (2.32.1-0ubuntu13.1) natty; urgency=low

  * debian/patches/17_react_when_streams_removed.patch:
    - Add patch to react when mixer streams are removed (LP: #750334)
 -- Rodrigo Moya <email address hidden> Fri, 15 Apr 2011 12:48:20 +0200

Changed in gnome-settings-daemon (Ubuntu):
status: In Progress → Fix Released
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.