MASTER bluetooth-applet crashed with SIGSEGV in g_type_instance_get_private()

Bug #445422 reported by Benny Källström
602
This bug affects 123 people
Affects Status Importance Assigned to Milestone
GNOME Bluetooth
Fix Released
Medium
gnome-bluetooth (Ubuntu)
Fix Released
High
Alexander Sack

Bug Description

Binary package hint: gnome-bluetooth

I was turning on bluetooth on my laptop and the bluetooth icon did not show up. It crashed.

ProblemType: Crash
Architecture: i386
Date: Wed Oct 7 16:12:14 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/bluetooth-applet
Package: gnome-bluetooth 2.28.1-0ubuntu1
ProcCmdline: bluetooth-applet
ProcEnviron:
 LANG=sv_FI.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-12.40-generic
SegvAnalysis:
 Segfault happened at: 0x7007fd <g_type_instance_get_private+269>: mov (%esi),%eax
 PC (0x007007fd) ok
 source "(%esi)" (0x0000000a) not located in a known VMA region (needed readable region)!
 destination "%eax" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: gnome-bluetooth
StacktraceTop:
 g_type_instance_get_private ()
 ?? ()
 ?? ()
 ?? () from /lib/libglib-2.0.so.0
 g_main_context_dispatch () from /lib/libglib-2.0.so.0
Title: bluetooth-applet crashed with SIGSEGV in g_type_instance_get_private()
Uname: Linux 2.6.31-12-generic i686
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
Benny Källström (benny-k) wrote :
visibility: private → public
Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt (retraced)

StacktraceTop:g_type_instance_get_private ()
add_killswitch (killswitch=0x89eafa0,
event_cb (source=0x89f3960,
?? () from /lib/libglib-2.0.so.0
g_main_context_dispatch () from /lib/libglib-2.0.so.0

Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt (retraced)
Changed in gnome-bluetooth (Ubuntu):
importance: Undecided → Medium
tags: removed: need-i386-retrace
Revision history for this message
hepaly (hurezi) wrote : Re: bluetooth-applet crashed with SIGSEGV in g_type_instance_get_private()

Same problem with my laptop (acer aspire 5720z) But after a log-off and log-on with connected adapter, the bluetooth is working well.

Revision history for this message
cyzen (cyzen) wrote :

Same problem

Revision history for this message
oOoOoOoOoOoOoO (oooooooooooooo) wrote :

I have this same problem (Toshiba Bluetooth).

Revision history for this message
mmalmeida (mmalmeida) wrote :

Same problem here. It happened right after I plugged in an usb bluetooth receiver.

Revision history for this message
Rex (rex-doghole) wrote :

Applet crashed when i plug BT adapter D-link DBT-122

Revision history for this message
Baard Johansen (baard) wrote :

Same problem on my Fujitsu Siemens V3205.

Revision history for this message
goksi (goran8911) wrote :

this problem on my dekstop pc

Revision history for this message
Bryan Donlan (bdonlan) wrote :

Occurs here too, on amd64.

Revision history for this message
Bryan Donlan (bdonlan) wrote :

The bug seems to stem from the fact that bluetooth_killswitch_init in lib/bluetooth-killswitch.c sets up an IO watch, but bluetooth_killswitch_finalize doesn't clean it up. As such, when the event actually does come, event_cb goes and uses a freed object handle and promptly explodes.

Attached is a patch that solves this problem, but I think there's another, more fundamental bug here; if the bluetooth dongle isn't plugged in at startup, it seems to deinitialize killswitch handling permanently. For example, if I start it up with the dongle in, then unplug the dongle:
** Message: adding killswitch idx 22 state 1
** Message: Reading of RFKILL events failed
** Message: killswitch 22 is 1
** Message: killswitches state 1
** Message: killswitch 22 is 1
** Message: killswitches state 1
** Message: RFKILL event: idx 22 type 2 op 1 soft 0 hard 0

** Message: removing killswitch idx 22
** Message: killswitches state 1

But if I start with it out, then plug it in and remove it:
** Message: Reading of RFKILL events failed
** Message: killswitches state 1

Perhaps the killswitch-unreffing in main.c:990 should be removed as well? I'm not familiar enough with the code to know if this is the right approach, though.

tags: added: patch
Revision history for this message
jrouquie (jrouquie) wrote :

Fresh install : install from CD, aptitude full-upgrade, install restricted-extra.
Suspend (not a suspend to disk).
Same problem happened on resume.

Revision history for this message
Alessio "Spinus" Moscatello (spinus) wrote :

Same problem when I plug in my bluetooth usb adapter under Karmic.
My device is a Pilot 2 (22b8:0850 Motorola PCS Bluetooth Device)

I'm using also KDE and kdebluetooth seems to works fine...

Changed in gnome-bluetooth (Ubuntu):
status: New → Confirmed
Revision history for this message
Bryan Donlan (bdonlan) wrote :

I've put a version of the package with my patch (effectively the same one I posted to upstream's bugzilla; slightly different from the one in this thread as it disables the killswitch-disabling logic in main as well) in my PPA at: https://edge.launchpad.net/~bdonlan/+archive/test/+packages

It'd be helpful if some people could give it a test - in particular, make sure your bluetooth RF killswitches still work after this!

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Thanks for your work on this Bryan! I have tested your 2.28.1-0ubuntu2~local1 packages and they seem to fix the issue here.

The drop-down menu still says "Bluetooth: On" when I have disabled it with the killswitch, and clicking "Turn off" does not change it. But I guess that's another bug, because the rest of the menu reacts correctly. It seems like the on/off in the menu is independent of the killswitch.

Revision history for this message
Bryan Donlan (bdonlan) wrote :

@Tormod: Does your bluetooth device still show up in lsusb when the killswitch is on? If not, it's probably implemented by just disconnecting the USB connection to the bluetooth hardware rather than a killswitch as bluetooth-applet considers them. Unfortunately I don't have any hardware with any accessible killswitch whatsoever here so I don't know what the correct behavior is :/

Alexander Sack (asac)
Changed in gnome-bluetooth (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Tormod Volden (tormodvolden) wrote :

Bryan, it disappears from lsusb when the killswitch is on.

Revision history for this message
Bryan Donlan (bdonlan) wrote :

@Tormod, ok, that means you probably don't have a killswitch as bluetooth-applet sees them.
Note that this bug only occurs if you have zero killswitches when the applet starts up, so if your bluetooth adapter is internal, it's a good bet that you have that kind of pure-hardware killswitch if you experience this bug (and the killswitch is likely to be off when the applet starts...)

Revision history for this message
IDWMaster (webadm) wrote :

Same problem here. It also affects Belkin USB adapters.

Revision history for this message
Francisco Sánchez-Aedo Gálvez (sanchezaedo) wrote :

Same problem here. Sony Vaio vgn-fw21j & amd64

Revision history for this message
Manolis Kapernaros (kapcom01) wrote :

i have the the same problem with a trust bluetooth.
i confirm that logging off and on again the bluetooth works.
also on ubuntu 9.04 worked fine.

Alexander Sack (asac)
summary: - bluetooth-applet crashed with SIGSEGV in g_type_instance_get_private()
+ MASTER bluetooth-applet crashed with SIGSEGV in
+ g_type_instance_get_private()
Changed in gnome-bluetooth (Ubuntu):
importance: Medium → High
status: Triaged → In Progress
Alexander Sack (asac)
Changed in gnome-bluetooth (Ubuntu):
assignee: nobody → Alexander Sack (asac)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-bluetooth - 2.28.1-0ubuntu2

---------------
gnome-bluetooth (2.28.1-0ubuntu2) karmic; urgency=low

  * fix LP: #437162 - Gnome Bluetooth needs to use different icons for
    notification area and system menu; take notify.c part of bgo:596564
    patch to support special icons for tray; also install all bluetooth.png
    as bluetooth-active.png in binary-post-install/gnome-bluetooth::
    - debian/patches/01-status-icon.patch
  * fix LP: #445422 - topcrash bluetooth-applet crashed with SIGSEGV in
    g_type_instance_get_private(); add improved patch from bgo:598181
    att:145298
    - debian/patches/02-lazy-killswitch-crashes.patch
  * fix memleak surrouding killswitch removal
    - debian/patches/03-fix-killswitch-memleak.patch
  * fix handling of killswitch removal
    - debian/patches/04-fix-yes-no-killswitch-handling.patch
  * fix icon not properly removed from panel after bt device/killswitch
    gets removed
    - debian/patches/05-fix-icon-visibility-for-no-killswitch.patch

 -- Alexander Sack <email address hidden> Wed, 14 Oct 2009 17:00:55 +0200

Changed in gnome-bluetooth (Ubuntu):
status: In Progress → Fix Released
Changed in gnome-bluetooth:
importance: Unknown → Medium
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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