Bug 279291

Summary: bluetooth initscript is failing on boot
Product: [Fedora] Fedora Reporter: Zack Cerza <zcerza>
Component: bluez-utilsAssignee: David Woodhouse <dwmw2>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: jan.kratochvil, jhrozek, lsof, tjb, wwoods
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: 3.20-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-10-05 11:56:46 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 235703, 257221    

Description Zack Cerza 2007-09-05 16:02:55 EDT
Description of problem:
Using rawhide-20070904.0.iso on a usb stick, the bluetooth service is failing to
start on boot. It succeeds if I start it manually after booting. Let me know if
you need more information.

Version-Release number of selected component (if applicable):
Comment 1 David Woodhouse 2007-09-12 18:25:28 EDT
Can you describe exactly what it says when it fails to boot? Does it boot OK if
you disable selinux?
Comment 2 Zack Cerza 2007-09-13 12:10:54 EDT
It doesn't fail to boot. Bluetooth just fails to come up *on* boot. I can't try
booting without selinux, as this is a live image.

I retested on F8 Test 2 with the same results. 'service bluetooth status' after
boot returns 'hcid dead but subsys locked'. 'service bluetooth start' starts
bluetooth correctly.
Comment 3 Zack Cerza 2007-09-14 15:30:30 EDT
OK, I have F8 Test 2 installed now. I booted with selinux=0, and nothing's changed.
Comment 4 Zack Cerza 2007-09-19 14:43:21 EDT
Thinking the problem might be that bluetooth is started before dbus.
Comment 5 Bastien Nocera 2007-09-19 17:23:41 EDT
Zack also mentioned that he gets "Got disconnected from the system message bus"
in /var/log/messages when started.
Comment 6 Zack Cerza 2007-09-19 17:29:05 EDT
To clarify re: comment #5, I saw it once among the many times I've seen the
problem. Maybe that message only gets triggered sometimes.
Comment 7 Jeremy Katz 2007-10-01 15:24:35 EDT
Some poking by wwoods reported on fedora-devel-list seems to support the problem
being "bluetooth is started before dbus".
Comment 8 Will Woods 2007-10-01 16:44:04 EDT
Yeah - as I mentioned on devel-list, changing the startup priority of bluetooth
from 25 to 30 (messagebus is 28) seems to make bluetooth start up properly. 

bluetooth-applet still doesn't seem to start automatically, but that's a
different bug.

I also feel compelled to mention bug #222315 here (bluetooth daemons shouldn't
be started from an initscript) but it's almost certainly too late in the release
cycle for that. 
Comment 9 Bastien Nocera 2007-10-03 12:29:11 EDT
*** Bug 251324 has been marked as a duplicate of this bug. ***
Comment 10 Will Woods 2007-10-04 20:57:41 EDT
Ah - messagebus is *supposed* to have priority 22, but it has:
Required-Start: $syslog $local_fs
netfs provides $local_fs, and it has priority 25; rsyslog requires $local_fs, so
it gets 26, which puts messagebus at 27.

I suggest adding something like the following to /etc/init.d/bluetooth:

# Required-Start: $syslog messagebus
# Default-Start: 2 3 4 5
# Short-Description: Bluetooth services
# Description: Bluetooth services for service discovery, authentication, 
# Human Interface Devices, etc.

Then chkconfig can work it out by itself. I'm not sure if bluetooth needs to be
explicitly stopped at shutdown - you might add a Default-Stop line if so.
Comment 11 Bastien Nocera 2007-10-05 11:56:46 EDT
Fixed in 3.20-1. Thanks for the help Will.