gnome-settings-daemon crashed with SIGSEGV in gvc_mixer_stream_is_running()

Bug #404538 reported by Skiros
32
This bug affects 3 people
Affects Status Importance Assigned to Milestone
GNOME Settings Daemon
Fix Released
Critical
gnome-settings-daemon (Ubuntu)
Fix Released
Medium
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gnome-settings-daemon

crash

ProblemType: Crash
Architecture: i386
Date: Sat Jul 25 15:01:29 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/lib/gnome-settings-daemon/gnome-settings-daemon
Package: gnome-settings-daemon 2.27.4-0ubuntu1
ProcCmdline: /usr/lib/gnome-settings-daemon/gnome-settings-daemon
ProcEnviron:
 LANGUAGE=es_ES.UTF-8
 PATH=(custom, user)
 LANG=es_ES.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-4.22-generic
SegvAnalysis:
 Segfault happened at: 0x6ca8d1d <gvc_mixer_stream_is_running+29>: mov 0x34(%eax),%edx
 PC (0x06ca8d1d) ok
 source "0x34(%eax)" (0xaaaaaade) not located in a known VMA region (needed readable region)!
 destination "%edx" ok
SegvReason: reading unknown VMA
Signal: 11
SourcePackage: gnome-settings-daemon
StacktraceTop:
 gvc_mixer_stream_is_running ()
 ?? ()
 ?? () from /usr/lib/libpulse.so.0
 ?? () from /usr/lib/libpulsecommon-0.9.15.so
 pa_pdispatch_run () from /usr/lib/libpulsecommon-0.9.15.so
Title: gnome-settings-daemon crashed with SIGSEGV in gvc_mixer_stream_is_running()
Uname: Linux 2.6.31-4-generic i686
UserGroups: adm admin audio cdrom dialout dip floppy lpadmin netdev plugdev powerdev sambashare scanner video

Revision history for this message
Skiros (skiros) wrote :
Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt (retraced)

StacktraceTop:gvc_mixer_stream_is_running (stream=0x85d4408)
update_sink (control=<value optimized out>, info=0xbfd09688)
context_get_sink_info_callback (pd=0x88410d8, command=2,
run_action (pd=0x88410d8, r=0x87ecd88, command=2,
pa_pdispatch_run (pd=0x88410d8, packet=0x8859bc0,

Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt (retraced)
Changed in gnome-settings-daemon (Ubuntu):
importance: Undecided → Medium
tags: removed: need-i386-retrace
visibility: private → public
Revision history for this message
Tony Espy (awe) wrote :

I managed to hit this bug by:

1. install gnome-bluetooth

2. pair & connect to an audio headset ( in my case a samsung snh500 )

3. change sound output to bt via the sound applet : preferences : output tab

4. play some music ( in this case via rhythmbox )

5. stop playback

6. toggle sound output back to internal ( note, this doesn't work )

7. toggle sound output back to BT

<crash>

Let me know if there's anything else I can add...

Revision history for this message
Sebastien Bacher (seb128) wrote :
Changed in gnome-settings-daemon (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
status: New → Triaged
Changed in gnome-settings-daemon:
status: Unknown → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

upstream asked if somebody could try the current git version or this change http://git.gnome.org/cgit/gnome-settings-daemon/commit/?id=c2179bd1a3c18fa56675c81f58df9e9c8896c8ab on the current karmic version?

Revision history for this message
Tony Espy (awe) wrote :

Sure, I'll give it a try...

Revision history for this message
Tony Espy (awe) wrote :

I grabbed the specified commit and rebuilt using the latest bzr branch ( eg. 2.27.5-0ubuntu1 ). This seems to fix the problem, I can't get the crash to occur anymore.

I created a topic branch which contains the new patch, I'll add it to the bug.

Please let me know if you'd like to propose it as a merge.

Revision history for this message
Tony Espy (awe) wrote :

OK, false positive... the patch in fact doesn't build. I guess I need more than just the single commit.

Revision history for this message
Sebastien Bacher (seb128) wrote :

you need to run autotools since it has changes to the build system so basically:

git clone git://git.gnome.org/gnome-settings-daemon
run autogen.sh there
copy the debian directory without the patches in the source
build the source

that should work, you can use the ubuntu changes too but probably need an autoreconf patch update in this case too

Revision history for this message
Tony Espy (awe) wrote :

For now, I just modifed the /plugins/media-keys/cut-n-paste/Makefile.in to add the new files. It may not be the right way to do it, but it's gotten me to the point where I'm testing the new code...

Revision history for this message
Sebastien Bacher (seb128) wrote :

that works indeed!

Revision history for this message
Tony Espy (awe) wrote :

So I'm still getting the crash with the new code.

I tried to pin down the exact crash using g_assert & g_warning statements, but wasn't successful.

So, one question I have, is how do I easily create a debug version of this code?

I tried adding:

DEB_BUILD_OPTIONS="debug nostrip nooopt" to the debian/rules, but the resultant binary doesn't appear to have any symbols?

Is the process of building a debug version of a package documented anywhere on the wiki?

Revision history for this message
Sebastien Bacher (seb128) wrote :

you just need to set DEB_BUILD_OPTIONS="debug nostrip nooopt" on the command line environment not in the rules

Revision history for this message
Tony Espy (awe) wrote :

It looks like the GvcMixerStream gets unref'd whilst it's still the default sink.

I attached to gsd using gdb, and caught the crash:

Program received signal SIGSEGV, Segmentation fault.
gvc_mixer_stream_is_running (stream=0x6de170) at gvc-mixer-stream.c:679
679 if (stream->priv->change_volume_op == NULL)
(gdb) bt
#0 gvc_mixer_stream_is_running (stream=0x6de170) at gvc-mixer-stream.c:679
#1 0x00007fffea265534 in update_sink (control=0x6de010, info=0x7fffffffdc40) at gvc-mixer-control.c:661
#2 0x00007fffecd0daa1 in ?? () from /usr/lib/libpulse.so.0
#3 0x00007fffecad9bd3 in ?? () from /usr/lib/libpulsecommon-0.9.15.so
#4 0x00007fffecada0c9 in pa_pdispatch_run () from /usr/lib/libpulsecommon-0.9.15.so
#5 0x00007fffecd0b8cd in ?? () from /usr/lib/libpulse.so.0
#6 0x00007fffecaddcd4 in ?? () from /usr/lib/libpulsecommon-0.9.15.so
#7 0x00007fffecf38fda in ?? () from /usr/lib/libpulse-mainloop-glib.so.0
#8 0x00007ffff49f2a8e in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#9 0x00007ffff49f6458 in ?? () from /usr/lib/libglib-2.0.so.0
#10 0x00007ffff49f68b5 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#11 0x00007ffff78de117 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#12 0x00000000004046a5 in main (argc=1, argv=0x7fffffffe308) at main.c:489

Here's what the stream looks like:

(gdb) print stream
$1 = (GvcMixerStream *) 0x6de170
(gdb) print *stream
$2 = {parent = {g_type_instance = {g_class = 0x6de380}, ref_count = 0, qdata = 0xaaaaaaaaaaaaaaaa}, priv = 0xaaaaaaaaaaaaaaaa}

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Tony,

Yes, the crash occurs because the GvcMixerStream there was inadvertently finalized earlier on. I couldn't reliably trigger the crash here, but I did see lots of invalid reads in valgrind every time I changed the default sink. I've written a patch which fixes those memory errors and I'm 99.9% certain it fixes the crash here too.

The patch has been sent upstream, and I've pushed the change to lp:~ubuntu-desktop/gnome-settings-daemon/ubuntu also.

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

This bug was fixed in the package gnome-settings-daemon - 2.27.5-0ubuntu2

---------------
gnome-settings-daemon (2.27.5-0ubuntu2) karmic; urgency=low

  * debian/patches/61_fix_volume_notification.patch:
    - Make sure the volume notification only shows the mute icon
      when the volume level is zero.
  * debian/patches/16_use_synchronous_notifications.patch:
    - Updated to not send duplicate notifications to notify-osd
      when the volume is changed.
  * debian/patches/62_fix_media_keys_memory_errors.patch:
    - Fix some memory errors triggered when the default sink
      is changed, which can eventually lead to a crash (LP: #404538).

 -- Chris Coulson <email address hidden> Fri, 31 Jul 2009 01:32:21 +0100

Changed in gnome-settings-daemon (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Sebastien Bacher (seb128) wrote :

would bug 348417 be similar?

Changed in gnome-settings-daemon:
importance: Unknown → Critical
status: Confirmed → 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.