Skip to content

race condition between "systemctl daemon-reload" and "udevadm trigger" #9751

Closed

Description

@ssapalski

systemd version the issue has been seen with

v239

Used distribution

embedded system (but also reproduced with Debian and systemd v239)

Expected behavior you didn't see

serialized/deserialized device jobs don't hang forever after "daemon-reload"

Unexpected behavior you saw

serialized/deserialized device jobs hang forever after "daemon-reload"

Steps to reproduce the problem

To be executed in two different shells, a couple of iterations are enough. With proper timing this issue can be also reproduced with just one "udevadm trigger" & "systemctl daemon-reload" call in parallel if the latter is delayed a bit.

$ while true; do systemctl daemon-reload; done
$ while true; do udevadm trigger; done

If running device jobs get intercepted by "systemctl daemon-reload" (and in turn get serialized/deserialized), these will hang forever after "daemon-reload" returned. These device jobs hang in state "nop waiting" forever as can be seen afterwards with "systemctl list-jobs".

I've bisected this behavior down to the following commit:

f332611abee97247e40311d99492d53697152a1a is the first bad commit
commit f332611abee97247e40311d99492d53697152a1a
Author: Boucman <[email protected]>
Date: Fri Nov 10 17:00:32 2017 +0100

device : reload when udev generates a "changed" event (#6850)

This commit isn't the root cause of the problem but the one which caused to reproduce the issue easily with the above mentioned procedure. In general it seems that either all device jobs or "nop waiting" jobs which get serialized/deserialized hang forever after "daemon-reload" returns.

This issue can easily be reproduced, are further debug logs needed?

Activity

  1. ssapalski commented on Aug 6, 2018

    @ssapalski
    Author

    @poettering
    I've updated the description since I've analyzed the issue a bit further.
    Do you have an idea what happens here? Are further logs needed?

  2. poettering commented on Sep 12, 2018

    @poettering
    Member
  3. added
    bug 🐛
    on Mar 1, 2019
  4. r0l1 commented on Mar 2, 2021

    @r0l1
    Contributor

    @poettering Any updates on this issue?

  5. added this to the v258 milestone on Jan 7, 2025
  6. modified the milestones: v258, v259 on Jun 23, 2025
  7. modified the milestones: v259, v260 on Nov 18, 2025
  8. added a commit that references this issue on Jan 15, 2026
    bcbf80c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛pid1udev

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions