Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
+++ 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.
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.
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