RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1216025 - udevadm settle --timeout is ignored
Summary: udevadm settle --timeout is ignored
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: systemd-maint
QA Contact: Frantisek Sumsal
URL:
Whiteboard:
Depends On: 1209474
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-28 11:45 UTC by Nir Soffer
Modified: 2015-11-19 15:00 UTC (History)
14 users (show)

Fixed In Version: systemd-219-2.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 1209474
Environment:
Last Closed: 2015-11-19 15:00:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2092 0 normal SHIPPED_LIVE systemd bug fix and enhancement update 2015-11-19 12:13:57 UTC

Description Nir Soffer 2015-04-28 11:45:27 UTC
+++ This bug was initially created as a clone of Bug #1209474 +++

Description of problem:
udevadm-settle doesn't calculate timeout even if a value is provided.
Looking at the code, we see that udevadm-settle uses timeout value only for pinging udev process when running as root, but it is not related to waiting until the udev event queue is empty.

Version-Release number of selected component (if applicable):


How reproducible:
Constantly.

Steps to Reproduce:
Write a program that invokes udevadm-settle with timeout.
Run the program *not* under root.

Actual results:
Program will not return even when timeout is reached.

Expected results:
Program to return once timeout is reached.

Additional info:
If already making changes in this area, it would be good to return a specific return value timeout occurs. This way the caller could figure out that timeout occurred.

--- Additional comment from Nir Soffer on 2015-04-07 15:09:46 EDT ---

The timeout implementation was removed in:

commit 9ea28c55a2488e6cd4a44ac5786f12b71ad5bc9f
Author: Kay Sievers <kay>
Date:   Sat Apr 12 22:35:50 2014 -0700

    udev: remove seqnum API and all assumptions about seqnums
    
    The way the kernel namespaces have been implemented breaks assumptions
    udev made regarding uevent sequence numbers. Creating devices in a
    namespace "steals" uevents and its sequence numbers from the host. It
    confuses the "udevadmin settle" logic, which might block until util a
    timeout is reached, even when no uevent is pending.
    
    Remove any assumptions about sequence numbers and deprecate libudev's
    API exposing these numbers; none of that can reliably be used anymore
    when namespaces are involved.

--- Additional comment from Nir Soffer on 2015-04-07 20:46:00 EDT ---



--- Additional comment from Nir Soffer on 2015-04-11 16:37:38 EDT ---

Fixed in upstream by:

commit 0736455b1186c9515e0f093e1e686e684d225787
Author: Nir Soffer <nirsof>
Date:   Wed Apr 8 04:04:16 2015 +0300

    udev: restore udevadm settle timeout
    
    Commit 9ea28c55a2 (udev: remove seqnum API and all assumptions about
    seqnums) introduced a regresion, ignoring the timeout option when
    waiting until the event queue is empty.
    
    Previously, if the udev event queue was not empty when the timeout was
    expired, udevadm settle was returning with exit code 1.  To check if the
    queue is empty, you could invoke udevadm settle with timeout=0. This
    patch restores the previous behavior.
    
    (David: fixed timeout==0 handling and dropped redundant assignment)

We need a backport for Fedora 21.

--- Additional comment from Nir Soffer on 2015-04-11 16:39:43 EDT ---

But this fix is partial - when timeout is 0, the timeout is still ignored.
See bug 1210981.

Comment 1 Nir Soffer 2015-04-28 11:47:06 UTC
We would like a backport for 7.1.z, since rhev is effected by this since 3.5.1.

Comment 2 Nir Soffer 2015-04-28 11:50:45 UTC
Correction: 7.1.z is not effected by this, since it does not include the version of systemd including this regression.

This may be relevant on 7.2 - not sure what systemd version and patches will be there.

Comment 8 errata-xmlrpc 2015-11-19 15:00:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2092.html


Note You need to log in before you can comment on or make changes to this bug.