Bug 1209474 - udevadm settle --timeout is ignored
Summary: udevadm settle --timeout is ignored
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1216025
TreeView+ depends on / blocked
 
Reported: 2015-04-07 12:49 UTC by Ala Hino
Modified: 2015-12-02 17:51 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
: 1216025 (view as bug list)
Environment:
Last Closed: 2015-12-02 10:53:30 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch fixing this issue (1.94 KB, application/mbox)
2015-04-08 00:46 UTC, Nir Soffer
no flags Details

Description Ala Hino 2015-04-07 12:49:28 UTC
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.

Comment 1 Nir Soffer 2015-04-07 19:09:46 UTC
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.

Comment 2 Nir Soffer 2015-04-08 00:46:00 UTC
Created attachment 1011987 [details]
Patch fixing this issue

Comment 3 Nir Soffer 2015-04-11 20:37:38 UTC
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.

Comment 4 Nir Soffer 2015-04-11 20:39:43 UTC
But this fix is partial - when timeout is 0, the timeout is still ignored.
See bug 1210981.

Comment 5 Zbigniew Jędrzejewski-Szmek 2015-04-28 13:02:08 UTC
Marking as post, so we can remember to backport this.

Comment 6 Fedora End Of Life 2015-11-04 15:52:47 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 7 Fedora End Of Life 2015-12-02 10:53:41 UTC
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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