blueman-applet: serialize RegisterAgent and RequestDefaultAgent#3209
Open
jkuro-tii wants to merge 1 commit intoblueman-project:mainfrom
Open
blueman-applet: serialize RegisterAgent and RequestDefaultAgent#3209jkuro-tii wants to merge 1 commit intoblueman-project:mainfrom
jkuro-tii wants to merge 1 commit intoblueman-project:mainfrom
Conversation
Fix race condition where RequestDefaultAgent is sent before RegisterAgent completes in async D-Bus environments (proxies/VMs), causing org.bluez.Error.DoesNotExist.
|
infirit
added a commit
to infirit/blueman
that referenced
this pull request
Apr 18, 2026
This avoids the possibility we request default agent before an Agent is registered as reported by blueman-project#3209. But unlike blueman-project#3209 register is async.
Contributor
|
Thanks for the report. I prefer to keep this async so instead in #3213 blueman request to be default agent when we get a dbus reply. |
19 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fix race condition where RequestDefaultAgent is sent before RegisterAgent completes in async D-Bus environments (proxies/VMs), causing org.bluez.Error.DoesNotExist.
blueman-applet issues RegisterAgent and RequestDefaultAgent as two independent asynchronous D-Bus calls. In environments where D-Bus message processing or object export is not immediate (e.g. proxies, bridges, containers), this can lead to a race condition where RequestDefaultAgent is executed before the agent is fully registered, causing org.bluez.Error.DoesNotExist.
Fix this by ensuring RequestDefaultAgent is only called after completion of RegisterAgent, restoring correct ordering semantics required by BlueZ AgentManager1 API.