Bug 523560 - bluez not really compatible with session switching
bluez not really compatible with session switching
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: bluez (Show other bugs)
11
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Bastien Nocera
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-09-15 20:15 EDT by Corch
Modified: 2010-06-28 10:40 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-06-28 10:40:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Corch 2009-09-15 20:15:47 EDT
Description of problem:
Possibly related to Bug 521735, yesterday my system auto-updated the following packages (among others):
<code>
Sep 15 09:28:09 foobar yum: Updated: bluez-4.42-5.fc11.x86_64
Sep 15 09:28:28 foobar yum: Updated: pulseaudio-module-bluetooth-0.9.15-17.fc11.x86_64
</code>

Now the bluetooth adapter in my dell studio 1555 is not detected and neither is the on board sound card. The messages file shows the following:

<code>
Sep 15 09:36:53 foobar bluetoothd[1841]: Bluetooth daemon 4.42
Sep 15 09:36:53 foobar bluetoothd[1841]: Starting SDP server
Sep 15 09:36:54 foobar bluetoothd[1841]: Parsing /etc/bluetooth/audio.conf failed: No such file or directory
Sep 15 09:36:54 foobar bluetoothd[1841]: Parsing /etc/bluetooth/input.conf failed: No such file or directory
Sep 15 09:36:54 foobar bluetoothd[1841]: Parsing /etc/bluetooth/network.conf failed: No such file or directory
Sep 15 09:36:54 foobar bluetoothd[1841]: bridge pan0 created
Sep 15 09:36:54 foobar bluetoothd[1841]: HCI dev 0 registered
Sep 15 09:36:54 foobar bluetoothd[1841]: HCI dev 0 up
Sep 15 09:36:54 foobar bluetoothd[1841]: Starting security manager 0
Sep 15 09:36:54 foobar bluetoothd[1841]: Adapter /org/bluez/1841/hci0 has been enabled
Sep 15 09:38:10 foobar dbus: Rejected send message, 2 matched rules; type="method_call", sender=":1.29" (uid=42 pid=2171 comm="/usr/bin/pulseaudio --start --log-target=syslog ") interface="org.bluez.Manager" member="ListAdapters" error name="(unset)" requested_reply=0 destination="org.bluez" (uid=0 pid=1841 comm="/usr/sbin/bluetoothd "))
Sep 15 09:38:10 foobar pulseaudio[2171]: bluetooth-util.c: Error from ListAdapters reply: org.freedesktop.DBus.Error.AccessDenied
Sep 16 08:33:15 foobar bluetoothd[1841]: HCI dev 0 down
Sep 16 08:33:15 foobar bluetoothd[1841]: Adapter /org/bluez/1841/hci0 has been disabled
Sep 16 08:33:15 foobar bluetoothd[1841]: Stopping security manager 0
Sep 16 08:33:15 foobar bluetoothd[1841]: HCI dev 0 unregistered
Sep 16 08:33:15 foobar bluetoothd[1841]: Unregister path: /org/bluez/1841/hci0
Sep 16 08:50:07 foobar bluetoothd[1841]: bridge pan0 removed
Sep 16 08:50:07 foobar bluetoothd[1841]: Stopping SDP server
Sep 16 08:50:07 foobar bluetoothd[1841]: Exit
</code>

The system seems to be trying use the alsa driver now, which is also throwing a bunch of errors from alsa-sink.c and ratelimit.c


Version-Release number of selected component (if applicable):
Linux foobar 2.6.30.5-43.fc11.x86_64 #1 SMP Thu Aug 27 21:39:52 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux



How reproducible:
I have not tried reinstalling the system or removing packages but the problem persists across reboots since the packages have been updated

Steps to Reproduce:
1. install fedora 11 from dvd
2. run auto update to update to latest bluez and pulseaudio packages
3.
  
Actual results:
bluetooth adapter and sound card fails to initialise. 

Expected results:
bluetooth and sound should work

Additional info:
I have seen a few other bugs showing similar dbus errors with the pulseaudio driver, possibly there is a larger issue with pulseaudio here?
Comment 1 Bastien Nocera 2009-09-16 10:01:18 EDT
Your PulseAudio is running as the GDM user, which is why it's causing problems.

Do "killall pulseaudio", and run pulseaudio within the session, and it should be working.

*** This bug has been marked as a duplicate of bug 513579 ***
Comment 2 Lennart Poettering 2009-09-16 22:39:20 EDT
The big problem is that there is not really a scheme how ownership of a bluez service can be safely handed over from one session to the next.

For alsa device nodes we can simply set ACLs and use inotify so that we know when the old owner released the device and be sure he cannot access the device anymore. The D-Bus services bluez offers don't really have anything comparable.
Comment 3 Bastien Nocera 2009-09-17 04:54:30 EDT
bluetoothd can receive messages from the current console user. You can use ConsoleKit to see whether you're allowed to contact bluetoothd. It's the exact same bug as the one I marked it as a dupe of.
Comment 4 Lennart Poettering 2009-09-17 11:25:13 EDT
(In reply to comment #3)
> bluetoothd can receive messages from the current console user. You can use
> ConsoleKit to see whether you're allowed to contact bluetoothd. 

This is racy because we would get the ckit msgs asynchronously, so that we might send a msg to bluez and only then get the ck session switch msg, even if the session switch happened before we sent the bluez msg. That way you'd still lose a msgs and get log out output warning about that.

More importantly however this is not sufficient. bluez must actively reset connections that were created by a session A when we switch to a session B. Without this the connection would still be configured for use with session A and be blocked for session B. We need to have some logic in BlueZ that follows polkit authorizations or so and shuts downs access to devices accordingly and also informs the user about this, when it does this.

> It's the exact
> same bug as the one I marked it as a dupe of.  

No, that bug was a series of different things.
Comment 5 Bug Zapper 2010-04-28 06:23:33 EDT
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 6 Bug Zapper 2010-06-28 10:40:25 EDT
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.