bluetoothd does not notice udev-induced device name change

Bug #1645257 reported by Tobias Wolter
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bluez (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Cheers,

using Ubuntu 16.10 and bluez 5.41-0ubuntu3 from yakkety, using Bluetooth NAP functionality to connect a device via the system's network connect fails because udev renames the device when it is registered and bluetoothd fails to realize that:

Nov 28 10:26:21 fenrir kernel: bluetooth hci0:256 enx340286443693: renamed from bnep0
Nov 28 10:26:21 fenrir bluetoothd[2224]: bnep: Can't add bnep0 to the bridge pan1: No such device(19)
Nov 28 10:26:21 fenrir bluetoothd[2224]: BNEP server cannot be added

Expected results would, of course, be "added enx340286443693 to the bridge pan1".

Tags: mantic
Revision history for this message
Matthijs Kooijman (matthijskooijman) wrote :
Download full text (3.8 KiB)

I'm seeing the same (or at least a highly similar) problem on Ubuntu 22.10:

    NetworkManager[1628]: <info> [1718657963.8557] device (CC:21:19:DA:E8:EA): Activation: starting connection 'Gambit Network' (e2a0aeb8-c87f-4ac6-8972-1e0bfac16e91)
    NetworkManager[1628]: <info> [1718657963.8558] audit: op="connection-activate" uuid="e2a0aeb8-c87f-4ac6-8972-1e0bfac16e91" name="Gambit Network" pid=1359709 uid=1000 result="su

    NetworkManager[1628]: <info> [1718657963.8559] device (CC:21:19:DA:E8:EA): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
    bluetoothd[1287905]: bnep0 connected
    kernel: bluetooth hci0:256 enxc403a8869e89: renamed from bnep0 (while UP)
    NetworkManager[1628]: <warn> [1718657964.0945] device (CC:21:19:DA:E8:EA): ip-ifindex: ifname bnep0 not found
    NetworkManager[1628]: <warn> [1718657964.0946] device (CC:21:19:DA:E8:EA): Error connecting with bluez: cannot find device bnep0
    NetworkManager[1628]: <info> [1718657964.0946] device (CC:21:19:DA:E8:EA): state change: prepare -> failed (reason 'bluetooth-failed', sys-iface-state: 'managed')
    NetworkManager[1628]: <warn> [1718657964.0952] device (CC:21:19:DA:E8:EA): Activation: failed for connection 'Gambit Network'
    NetworkManager[1628]: <info> [1718657964.0955] device (CC:21:19:DA:E8:EA): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
    bluetoothd[1287905]: profiles/network/bnep.c:bnep_if_down() bnep: Could not bring down bnep0: No such device(19)

This happens when NetworkManager/Modemmanager connects to my phone for tethering via bluetooth.

This started happening somewhere in the last couple of weeks, while it worked fine before that. However, the connection now fails most of the the time, but if I retry a few (sometimes a dozen) times, it usually connects eventually. So maybe there is a race condition that has been present for a long time, but just became a lot more likely due some (possibly otherwise unrelated) change in timing or otherwise.

Here's what it looks like when it does work:

    NetworkManager[1628]: <info> [1718658216.0757] device (CC:21:19:DA:E8:EA): Activation: starting connection 'Gambit Network' (e2a0aeb8-c87f-4ac6-8972-1e0bfac16e91)
    NetworkManager[1628]: <info> [1718658216.0758] audit: op="connection-activate" uuid="e2a0aeb8-c87f-4ac6-8972-1e0bfac16e91" name="Gambit Network" pid=1359709 uid=1000 result="s>
    NetworkManager[1628]: <info> [1718658216.0759] device (CC:21:19:DA:E8:EA): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
    bluetoothd[1287905]: bnep0 connected
    kernel: bluetooth hci0:256 enxc403a8869e89: renamed from bnep0 (while UP)
    NetworkManager[1628]: <info> [1718658217.3531] device (CC:21:19:DA:E8:EA): ip-ifname: interface index 0 renamed ip_iface (15295) from 'bnep0' to 'enxc403a8869e89'
    NetworkManager[1628]: <info> [1718658217.3531] device (CC:21:19:DA:E8:EA): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
    NetworkManager[1628]: <info> [1718658217.3589] device (CC:21:19:DA:E8:EA): state change: config -> ip-config (reason 'none', sys-iface-state: 'mana...

Read more...

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thank you for reporting this bug to Ubuntu.

Ubuntu 22.10 (kinetic) reached end-of-life on July 20, 2023.
Ubuntu 16.10 (yakkety) reached end-of-life on July 20, 2017.

See this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

We appreciate that this bug may be old and you might not be interested in discussing it anymore. But if you are then please upgrade to the latest Ubuntu version and re-test. If you then find the bug is still present in the newer Ubuntu version, please add a comment here telling us which new version it is in.

Changed in bluez (Ubuntu):
status: New → Won't Fix
Revision history for this message
Matthijs Kooijman (matthijskooijman) wrote :

w00ps, I mistyped in my last comment, I am running 23.10, not 22.10. Still not the latest, so I'll try to remember to re-test and report back when I upgrade to 23.04.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Mistyped again, assuming you plan on upgrading to 24.04 :)

tags: added: mantic
Changed in bluez (Ubuntu):
status: Won't Fix → Confirmed
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.