← Back to team overview

touch-packages team mailing list archive

[Bug 1319047] Re: udev rule file execution races with fs to become writable

 

Ah indeed. But this has worked by sheer accident, not by design. udev
rules aren't supposed for this, and if they write any files it should be
into /dev/ or /run. They can race in both ways: before the file system
becomes available, or they run too late when the display manager is
already starting (admittedly the latter is much less probable, but still
possible).

The cleanest solution for this would be to move that logic into an
init.d file/upstart job/systemd unit, so that you can put it into the
proper place in the boot sequence. As a hack you could either add a
WAIT_FOR clause and wait on a file (in /run or so) that only starts to
exist after the fs becomes writable, or add a waiting loop to the RUN
clause (/bin/sh -c 'while [ ! -w /etc ]; do sleep 0.5; done; ln -s
...').

** Summary changed:

- udev rule file naming requirements changed breaking compatibility to Ubuntu 12.04
+ udev rule file execution races with fs to become writable

** Changed in: systemd (Ubuntu)
       Status: Incomplete => Won't Fix

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1319047

Title:
  udev rule file execution races with fs to become writable

Status in “systemd” package in Ubuntu:
  Won't Fix

Bug description:
  Binary package:

    udev:
      Installed: 204-5ubuntu20
      Candidate: 204-5ubuntu20
      Version table:
     *** 204-5ubuntu20 0
            500 http://de.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
            100 /var/lib/dpkg/status

  Source package:
    systemd 

  Ubuntu release:
    Description:	Ubuntu 14.04 LTS
    Release:	14.04

  
  Expected behavior:

    All rule files in /etc/udev/rules.d/ having the extension '.rules'
  [see udev(7)] should be honored by udevd (as it has been in Ubuntu
  12.04  and as it is still by "udevadm test <syspath>").

  Actual behavior:

    If udev rule file has an additional '.' (dot) in its name (e.g.
  "graphics-xorg.conf.rules) it will be silently ignored by udevd. But
  such a file will not be ignored by "udevadm test <syspath>", which
  even adds to the confusion about why the rule is not working. Also the
  man page udev(7) does not mention any additional/new naming
  requirements.

  How to reproduce:

    Create or rename a rule file in /etc/udev/rules.d/ so that its name
  contains an additional '.' (dot) (beside the one in '.rules', e.g.
  'graphics-xorg.conf.rules') and run "udevadm control --reload". From
  now on the udev rules in that file will be ignored silently by udevd
  (but not by 'udevadm test <syspath>'!).

  How to solve this issue:

    (1) Revert to the old behavior and make udevd honor rule file names as in Ubuntu 12.04 (preferred alternative)
    __OR__
    (2) If this change has been introduced intentionally then 
       (2a) Announce it (e.g. in a changelog and/or upgrade guide so that users/admins know about it and can rename their rule files not matching the changed needs)
       (2b) Change the code of "udevadm test" (and possibly other tools) to behave consistently so that users have a chance to narrow down the naming issue
       (2c) Add the changed naming requirement to man page udev(7), info files, tutorials... 

  Urgency/Importance:
    Normal

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1319047/+subscriptions