Control: found -1 bluez/5.82-1.1

Hi,

I ran into this on trixie (bluez and bluez-obexd 5.82-1.1, MATE, no 
evolution-data-server, receiving from a Pixel 8a) and traced it. Evolution 
isn't actually needed to receive files: the cause is an ordering bug in obexd, 
and upstream fixed it yesterday:

https://github.com/bluez/bluez/commit/7e12693031d131412f3b2996efcf6a5d73c74d9b
("obexd/bluetooth: Register profiles added after org.bluez appeared", on master 
after 5.87)

What happens: obexd registers its server profiles (Object Push, FTP, MAS, MNS) 
with bluetoothd only from its org.bluez name-watch callback. With the ebook 
backend, irmc_init() and pbap_init() call e_source_registry_new_sync() during 
plugin_init(). When EDS isn't available that call fails, and disposing the 
half-built registry iterates obexd's default main context. That dispatches the 
pending org.bluez name-owner reply early, before obex_server_init() has created 
the profiles, so nothing is registered and the callback doesn't run again. 
bluetoothd ends up with no OPP SDP record, and the phone just reports the 
transfer as failed.

This fits the earlier messages in this bug: installing evolution-data-server 
makes the call succeed, and disabling only pbap isn't enough, because irmc 
calls the same function. Excluding both works. Here, 
`/usr/libexec/bluetooth/obexd -n -d -P irmc,pbap` registers all the server 
profiles and the transfer succeeds. Restarting bluetooth.service while obexd is 
running also works, since that fires the callback again.

Upstream reports with logs and analysis: 
https://github.com/bluez/bluez/issues/2315, 
https://github.com/bluez/bluez/issues/2641 and 
https://github.com/bluez/bluez/issues/2694.

Suggestion: cherry-pick 7e12693031 (one small change to 
obexd/plugins/bluetooth.c) into unstable, and consider it for a trixie point 
release, since receiving files over Bluetooth is broken by default on trixie 
desktops without evolution-data-server. One hunk touches bluetooth_exit_cb(), 
which came with the logind changes after 5.82, so the trixie backport would 
need to clear the new flag in bluetooth_exit() instead. That would also remove 
the need for the evolution-data-server dependency that was added and reverted 
in this bug.

Thanks.

Sent with Proton Mail secure email.

Reply via email to