Skip to content

Type=dbus NameOwnerChanged race condition #2136

@mischief

Description

@mischief

commit bbc2908 introduces a race condition that occurs during serialization/deserialization of the bus name matchers. an easy way to reproduce is run:

while sudo systemctl is-active polkit.service; do sudo systemctl daemon-reload; sleep 0.5; done &
while sudo systemctl is-active polkit.service; do sudo systemctl restart polkit.service; sleep 2; done &

and wait for polkit to get stuck in 'activating', since systemd missed the NameOwnerChange signal from polkit. eventually polkit is timed out and killed, even though it is running fine.

i'm not very familiar with dbus api, so i think NameHasOwner needs to be called after matching NameOwnerChange.

friendly ping @zonque :)

Metadata

Metadata

Assignees

Labels

pid1regression ⚠️A bug in something that used to work correctly and broke through some recent commitrelease-critical

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions