bluetoothd crashs after resuming from Suspend to RAM.

Bug #1300623 reported by Shih-Yuan Lee
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bluez (Ubuntu)
Fix Released
High
Unassigned
Precise
Fix Released
High
Unassigned
Quantal
Won't Fix
High
Unassigned
Saucy
Won't Fix
High
Unassigned
Trusty
Fix Released
High
Unassigned

Bug Description

[Impact]

 * It is very annoying to see Bluetooth daemon crash after suspending and resuming when playing music through Bluetooth audio output.
 * The better user experience should be that Ubuntu will automatically reconnect to the Bluetooth audio output and play music through it.

[Test Case]

 * Pairing Bluetooth audio device.
 * Playing music through Bluetooth audio output.
 * Suspending the system.
 * Resuming the system.

[Regression Potential]

 * No obvious regression exists.

[Other Info]

 * The patch is just to check if the device still exists in devices list before removed from the list. If it exists, do what should do as original steps. If not, do nothing.

bluetoothd crashs after resuming from Suspend to RAM when it plays music through Bluetooth audio output.

# apport-retrace -g _usr_sbin_bluetoothd.0.crash
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>.
Reading symbols from /usr/sbin/bluetoothd...Reading symbols from /usr/lib/debug/usr/sbin/bluetoothd...done.
done.
[New LWP 1053]
warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/sbin/bluetoothd'.
Program terminated with signal 6, Aborted.
#0 0x00007f0107c01445 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0 0x00007f0107c01445 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f0107c04bab in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007f0107c3ee2e in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3 0x00007f0107c49626 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#4 0x00007f0108a5c0b7 in g_slist_foreach (list=<optimized out>, func=0x7f0108a47b60 <g_free>, user_data=0x0)
    at /build/buildd/glib2.0-2.32.4/./glib/gslist.c:840
#5 0x00007f0108a5c0db in g_slist_free_full (list=0x7f0107f817d8, free_func=<optimized out>)
    at /build/buildd/glib2.0-2.32.4/./glib/gslist.c:177
#6 0x00007f0108f4a3b1 in client_free (data=0x7f01096e05f0) at audio/unix.c:113
#7 0x00007f0108f4be79 in client_cb (cond=<optimized out>, data=0x7f01096e05f0, chan=<optimized out>) at audio/unix.c:1767
#8 0x00007f0108a41d13 in g_main_dispatch (context=0x7f01096c6070) at /build/buildd/glib2.0-2.32.4/./glib/gmain.c:2539
#9 g_main_context_dispatch (context=0x7f01096c6070) at /build/buildd/glib2.0-2.32.4/./glib/gmain.c:3075
#10 0x00007f0108a42060 in g_main_context_iterate (dispatch=1, block=<optimized out>, context=0x7f01096c6070, self=<optimized out>)
    at /build/buildd/glib2.0-2.32.4/./glib/gmain.c:3146
#11 g_main_context_iterate (context=0x7f01096c6070, block=<optimized out>, dispatch=1, self=<optimized out>)
    at /build/buildd/glib2.0-2.32.4/./glib/gmain.c:3083
#12 0x00007f0108a4245a in g_main_loop_run (loop=0x7f01096c61e0) at /build/buildd/glib2.0-2.32.4/./glib/gmain.c:3340
#13 0x00007f0108f2c1fe in main (argc=1, argv=0x7fffd72297f8) at src/main.c:539

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: bluez 4.98-2ubuntu7
ProcVersionSignature: Ubuntu 3.2.0-32.51-generic 3.2.30
Uname: Linux 3.2.0-32-generic x86_64
ApportVersion: 2.0.1-0ubuntu8
Architecture: amd64
Date: Tue Apr 1 15:19:56 2014
DistributionChannelDescriptor:
 # This is a distribution channel descriptor
 # For more information see http://wiki.ubuntu.com/DistributionChannelDescriptor
 canonical-oem-somerville-precise-amd64-20120703-2
InstallationMedia: Ubuntu 12.04 "Precise" - Build amd64 LIVE Binary 20120703-15:08
InterestingModules: rfcomm bnep btusb bluetooth
MachineType: Dell Inc. Latitude E6230
ProcEnviron:
 LC_CTYPE=en_US.UTF-8
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/zsh
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-32-generic root=UUID=3972ee07-72c0-4241-9b17-f4c82bd1b139 ro quiet splash vt.handoff=7
SourcePackage: bluez
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 09/19/2012
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A05
dmi.board.name: 098M9Y
dmi.board.vendor: Dell Inc.
dmi.board.version: X03
dmi.chassis.type: 9
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA05:bd09/19/2012:svnDellInc.:pnLatitudeE6230:pvr01:rvnDellInc.:rn098M9Y:rvrX03:cvnDellInc.:ct9:cvr:
dmi.product.name: Latitude E6230
dmi.product.version: 01
dmi.sys.vendor: Dell Inc.
hciconfig:
 hci0: Type: BR/EDR Bus: USB
  BD Address: 74:DE:2B:D4:BB:8E ACL MTU: 1021:8 SCO MTU: 64:1
  UP RUNNING PSCAN
  RX bytes:1339 acl:0 sco:0 events:56 errors:0
  TX bytes:735 acl:0 sco:0 commands:56 errors:0

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :
Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : BootDmesg.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : Dependencies.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : Lspci.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : Lsusb.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : ProcModules.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : UdevDb.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : UdevLog.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : getfacl.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : rfkill.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : syslog.txt

apport information

description: updated
Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : BootDmesg.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : Dependencies.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : Lspci.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : Lsusb.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : ProcModules.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : UdevDb.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : UdevLog.txt

apport information

description: updated
Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : BootDmesg.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : Dependencies.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : Lspci.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : Lsusb.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : ProcModules.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : UdevDb.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : UdevLog.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : getfacl.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : rfkill.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : syslog.txt

apport information

description: updated
Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : BootDmesg.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : Dependencies.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : Lspci.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : Lsusb.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : ProcModules.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : UdevDb.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : UdevLog.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : getfacl.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : rfkill.txt

apport information

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote : syslog.txt

apport information

description: updated
description: updated
tags: added: patch
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

The fix looks fine, but I think it really should be applied to the newer releases too.

Could you look into forward-porting this patch to Saucy and Trusty as well? I'm happy to sponsor them.

For now, targetting to these releases so we track the bug.

Changed in bluez (Ubuntu Quantal):
status: New → Won't Fix
Changed in bluez (Ubuntu Precise):
importance: Undecided → High
Changed in bluez (Ubuntu Saucy):
importance: Undecided → High
Changed in bluez (Ubuntu Trusty):
importance: Undecided → High
Changed in bluez (Ubuntu Quantal):
importance: Undecided → High
Changed in bluez (Ubuntu Saucy):
status: New → Triaged
Changed in bluez (Ubuntu Trusty):
status: New → Triaged
Changed in bluez (Ubuntu Precise):
status: New → Triaged
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Seems like the codebase might have changed enough for it to be impossible to apply the patch as-is to the other releases; I'll look into this for saucy and trusty; and sponsor the patch for precise.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

This applies just fine to Trusty as well, so the patch will work unchanged on all releases. Uploading shortly.

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

This bug was fixed in the package bluez - 4.101-0ubuntu11

---------------
bluez (4.101-0ubuntu11) trusty; urgency=low

  * debian/patches/12_check_device_before_removing_from_devices.patch:
    The power of some Bluetooth device will be cut and the device will be
    removed from the devices list when suspending, so it has to check if
    the device still exists in the devices list. (LP: #1300623)
 -- Shih-Yuan Lee (FourDollars) <email address hidden> Wed, 02 Apr 2014 23:53:58 -0400

Changed in bluez (Ubuntu Trusty):
status: Triaged → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Shih-Yuan, or anyone else affected,

Accepted bluez into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/bluez/4.98-2ubuntu7.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in bluez (Ubuntu Precise):
status: Triaged → Fix Committed
tags: added: verification-needed
tags: added: verification-done
removed: verification-needed
Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

I have verified by bluez 4.98-2ubuntu7.1 and it does fix the crash issue.

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

This bug was fixed in the package bluez - 4.98-2ubuntu7.1

---------------
bluez (4.98-2ubuntu7.1) precise-proposed; urgency=low

  * debian/patches/12_check_device_before_removing_from_devices.patch:
    The power of some Bluetooth device will be cut and the device will be
    removed from the devices list when suspending, so it has to check if
    the device still exists in the devices list. (LP: #1300623)
 -- Shih-Yuan Lee (FourDollars) <email address hidden> Tue, 01 Apr 2014 16:38:03 +0800

Changed in bluez (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for bluez has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

saucy has seen the end of its life and is no longer receiving any updates. Marking the saucy task for this ticket as "Won't Fix".

Changed in bluez (Ubuntu Saucy):
status: Triaged → Won't Fix
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.