Devuan bug report logs - #483
eudev: eudev sometimes fails to generate initial hotplug events

version graph

Package: eudev; Maintainer for eudev is Devuan Dev Team <devuan-dev@lists.dyne.org>; Source for eudev is src:eudev.

Reported by: David Kuehling <dvdkhlng@posteo.de>

Date: Mon, 15 Jun 2020 15:18:02 UTC

Severity: normal

Found in version 3.2.7-6

Fixed in version 3.2.9-8

Done: dak@devuan.org

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to devuan-bugs@lists.dyne.org, dvdkhlng@posteo.de, Devuan Dev Team <devuan-dev@lists.dyne.org>:
bug#483; Package eudev. (Mon, 15 Jun 2020 15:18:02 GMT) (full text, mbox, link).


Acknowledgement sent to David Kuehling <dvdkhlng@posteo.de>:
New bug report received and forwarded. Copy sent to dvdkhlng@posteo.de, Devuan Dev Team <devuan-dev@lists.dyne.org>. (Mon, 15 Jun 2020 15:18:05 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.devuan.org (full text, mbox, reply):

From: David Kuehling <dvdkhlng@posteo.de>
To: Devuan Bug Tracking System <submit@bugs.devuan.org>
Subject: eudev: eudev sometimes fails to generate initial hotplug events
Date: Mon, 15 Jun 2020 17:08:38 +0200
Package: eudev
Version: 3.2.7-6
Severity: normal
File: /etc/init.d/eudev

Dear Maintainer,

eudev sometimes fails to generate the initial hotplug events for one of
my systems.  The symptoms are that many required kernel modules are
missing after boot (no sound, no 3-D acceleration).

The error is not determinstic.  Sometimes the system boots up
successfully and everything works.  Sometimes the system boots up and
essential kernel modules are missing.

Doing '/etc/init.d/eudev stop' followed by '/etc/init.d/eudev start'
corrects the issue (i.e. results in all modules being loaded).  The
issue can also be corrected by manually running 'udevadm trigger
--action=add'.

The actual root cause seems to be a race condition in the
/etc/init.d/eudev startup script: The script first starts eudev via
start-stop-daemon, then calls 'udevadm trigger --action=add'.

On the system in question, after modifying the script, adding 'sleep 1s'
after start-stop-daemon, the startup now succeeded all the (two) times I
tried.

Note that the system in question runs from a root partition that resides
on a NBD-devices, so startup times of eudev may be very different from a
normal HDD-based system, thereby amplifying the likelhood of the race.

I have no clear idea how a proper fix for that race would look like.
Clearly 'start-stop-daemon --background' does NOT wait for the daemon to
be operational and looks like the wrong approach.  Maybe running
start-stop-daemon without "--background" and depending on eudev's
"--daemon" option is better?  Does eudev support using
start-stop-daemon's --notify-await command?  Should we run 'udevadm
trigger' in a loop until it succeeds?


-- System Information:
Distributor ID:	Debian
Description:	Devuan GNU/Linux 3 (beowulf)
Release:	3
Codename:	beowulf
Architecture: x86_64

Kernel: Linux 4.19.0-9-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled

Versions of packages eudev depends on:
ii  adduser      3.118
ii  debconf      1.5.71
ii  libblkid1    2.33.1-0.1+devuan1~beowulf2
ii  libc6        2.28-10
ii  libeudev1    3.2.7-6
ii  libkmod2     26-1
ii  libselinux1  2.8-1+b1
ii  lsb-base     10.2019051400
ii  procps       2:3.3.15-2+devuan1
ii  util-linux   2.33.1-0.1+devuan1~beowulf2

eudev recommends no packages.

eudev suggests no packages.

-- no debconf information


Information forwarded to devuan-bugs@lists.dyne.org, Devuan Dev Team <devuan-dev@lists.dyne.org>:
bug#483; Package eudev. (Mon, 15 Jun 2020 20:18:01 GMT) (full text, mbox, link).


Acknowledgement sent to fsmithred <fsmithred@gmail.com>:
Extra info received and forwarded to list. Copy sent to Devuan Dev Team <devuan-dev@lists.dyne.org>. (Mon, 15 Jun 2020 20:18:03 GMT) (full text, mbox, link).


Message #10 received at 483@bugs.devuan.org (full text, mbox, reply):

From: fsmithred <fsmithred@gmail.com>
To: 483@bugs.devuan.org
Subject: eudev: eudev sometimes fails to generate initial hotplug events
Date: Mon, 15 Jun 2020 16:00:29 -0400
[Message part 1 (text/plain, inline)]
On 6/15/20 12:15 PM, David Kuehling wrote:
>
> This is my diff:
>
> --- /etc/init.d/eudev	2019-02-09 13:22:24.000000000 +0100
> +++ /tmp/eudev	2020-06-15 17:59:00.384481497 +0200
> @@ -210,6 +210,7 @@
>  	sleep 15
>      fi
>
> +    sleep 1s
>      log_action_begin_msg "Synthesizing the initial hotplug events"
>      if udevadm trigger --action=add; then
>  	log_action_end_msg $?


This fixes a problem I'm having with live-isos booted from optical media.
It boots, but many kernel modules are missing. I used a 10-second sleep to
test, and it works.

For live-isos, the workaround I used was to stop and start eudev in
/etc/rc.local. Here's discussion about that:
https://dev1galaxy.org/viewtopic.php?pid=22137#p22137

fsmithred
[0xA73823D3094C5620.asc (application/pgp-keys, attachment)]

Information forwarded to devuan-bugs@lists.dyne.org, Devuan Dev Team <devuan-dev@lists.dyne.org>:
bug#483; Package eudev. (Wed, 17 Jun 2020 22:33:02 GMT) (full text, mbox, link).


Acknowledgement sent to fsmithred <fsmithred@gmail.com>:
Extra info received and forwarded to list. Copy sent to Devuan Dev Team <devuan-dev@lists.dyne.org>. (Wed, 17 Jun 2020 22:33:04 GMT) (full text, mbox, link).


Message #15 received at 483@bugs.devuan.org (full text, mbox, reply):

From: fsmithred <fsmithred@gmail.com>
To: 483@bugs.devuan.org
Subject: Re: bug#483: eudev: eudev sometimes fails to generate initial hotplug events
Date: Wed, 17 Jun 2020 18:22:27 -0400
[Message part 1 (text/plain, inline)]
I tested with shorter sleep times. One second is enough when booting from dvd.

fsmithred
[0xA73823D3094C5620.asc (application/pgp-keys, attachment)]

Information forwarded to devuan-bugs@lists.dyne.org, Devuan Dev Team <devuan-dev@lists.dyne.org>:
bug#483; Package eudev. (Mon, 13 Jul 2020 18:33:01 GMT) (full text, mbox, link).


Acknowledgement sent to svante.signell@gmail.com:
Extra info received and forwarded to list. Copy sent to Devuan Dev Team <devuan-dev@lists.dyne.org>. (Mon, 13 Jul 2020 18:33:08 GMT) (full text, mbox, link).


Message #20 received at 483@bugs.devuan.org (full text, mbox, reply):

From: Svante Signell <svante.signell@gmail.com>
To: David Kuehling <dvdkhlng@posteo.de>, fsmithred <fsmithred@gmail.com>
Cc: 483@bugs.devuan.org
Subject: eudev: eudev sometimes fails to generate initial hotplug events
Date: Mon, 13 Jul 2020 20:16:42 +0200
[Message part 1 (text/plain, inline)]
Hello,

regarding bug #483, can you try to insert the sleep 1 at the following
place, see the attached patch: eudev.init.diff.

This should apply to eudev-3.2.7-6. Since we plan to include 3.2.9-
7~beowulf1 in beowulf-proposed-updates can you please also test that
patch on eudev.init for that version. It is available from the unstable
release. Don't bother about spacing/tab changes. 

Thanks you very much for your help!

[eudev.init.diff (text/x-patch, attachment)]

Information forwarded to devuan-bugs@lists.dyne.org, Devuan Dev Team <devuan-dev@lists.dyne.org>:
bug#483; Package eudev. (Mon, 13 Jul 2020 21:33:02 GMT) (full text, mbox, link).


Acknowledgement sent to fsmithred <fsmithred@gmail.com>:
Extra info received and forwarded to list. Copy sent to Devuan Dev Team <devuan-dev@lists.dyne.org>. (Mon, 13 Jul 2020 21:33:09 GMT) (full text, mbox, link).


Message #25 received at 483@bugs.devuan.org (full text, mbox, reply):

From: fsmithred <fsmithred@gmail.com>
To: svante.signell@gmail.com, David Kuehling <dvdkhlng@posteo.de>
Cc: 483@bugs.devuan.org
Subject: Re: eudev: eudev sometimes fails to generate initial hotplug events
Date: Mon, 13 Jul 2020 17:06:59 -0400
[Message part 1 (text/plain, inline)]
I tested the fix with 3.2.9-7 that I pulled from ceres and installed in
beowulf. Made a new live-iso, burned it to DVD and it loads all modules on
boot as it should. Looks good here.

fsmithred
[0xA73823D3094C5620.asc (application/pgp-keys, attachment)]

Information forwarded to devuan-bugs@lists.dyne.org, Devuan Dev Team <devuan-dev@lists.dyne.org>:
bug#483; Package eudev. (Wed, 15 Jul 2020 00:33:02 GMT) (full text, mbox, link).


Acknowledgement sent to Trek <trek00@inbox.ru>:
Extra info received and forwarded to list. Copy sent to Devuan Dev Team <devuan-dev@lists.dyne.org>. (Wed, 15 Jul 2020 00:33:09 GMT) (full text, mbox, link).


Message #30 received at 483@bugs.devuan.org (full text, mbox, reply):

From: Trek <trek00@inbox.ru>
To: 483@bugs.devuan.org
Subject: Re: [devuan-dev] bug#483: eudev: eudev sometimes fails to generate initial hotplug events
Date: Wed, 15 Jul 2020 02:20:31 +0200
adding sleep 1 is unreliable (it really depends how fast/slow is the
hardware) as you can see in debian bug #908796

the fix was to add --notify-await to start-stop-daemon without any
additional sleep

if eudev does not implement the notify protocol, then i think it should
be started with --daemon paramenter, but this could bring back the
debian bug #791944, in case eudev does not remove the control socket on
stop or if it does not creates a pidfile

in that case a new init.d script should be written to remove the control
socket just after sendsigs, in order to fix the device-mapper/cryptsetup
shutdown issue

you can see more proposed fixes/workarounds in the bugs linked, but i
give some can help if needed

ciao!

Information forwarded to devuan-bugs@lists.dyne.org, Devuan Dev Team <devuan-dev@lists.dyne.org>:
bug#483; Package eudev. (Tue, 11 Aug 2020 15:33:02 GMT) (full text, mbox, link).


Acknowledgement sent to Trek <trek00@inbox.ru>:
Extra info received and forwarded to list. Copy sent to Devuan Dev Team <devuan-dev@lists.dyne.org>. (Tue, 11 Aug 2020 15:33:11 GMT) (full text, mbox, link).


Message #35 received at 483@bugs.devuan.org (full text, mbox, reply):

From: Trek <trek00@inbox.ru>
To: 483@bugs.devuan.org
Subject: Re: [devuan-dev] bug#483: eudev: eudev sometimes fails to generate initial hotplug events
Date: Tue, 11 Aug 2020 17:24:22 +0200
[Message part 1 (text/plain, inline)]
I had some time to check the sources of eudev and it does not contains
the f59118e commit, that prevented the removal of the control socket on
exit[1], so I send this patch to restore the old rock solid start-up
behavior of udev

the patch is based on the Devuan unstable ed8c5770e0 commit, but please
note that it is untested, as i don't have a Devuan system, nor eudev,
but at least it shows how to do it

basically eudev is launched with --daemon argument and all the pidfile
tracking stuff is removed, because when eudev is killed by sendsigs, it
removes the control socket and dmsetup/cryptsetup will not hang trying
to connect to eudev on shutdown

ciao!

1. https://github.com/systemd/systemd/issues/2477#issuecomment-239077407
[eudev-daemon.patch (text/x-patch, attachment)]

Information forwarded to devuan-bugs@lists.dyne.org, Devuan Dev Team <devuan-dev@lists.dyne.org>:
bug#483; Package eudev. (Wed, 12 Aug 2020 19:18:01 GMT) (full text, mbox, link).


Acknowledgement sent to Trek <trek00@inbox.ru>:
Extra info received and forwarded to list. Copy sent to Devuan Dev Team <devuan-dev@lists.dyne.org>. (Wed, 12 Aug 2020 19:18:04 GMT) (full text, mbox, link).


Message #40 received at 483@bugs.devuan.org (full text, mbox, reply):

From: Trek <trek00@inbox.ru>
To: 483@bugs.devuan.org
Subject: Re: [devuan-dev] bug#483: eudev: eudev sometimes fails to generate initial hotplug events
Date: Wed, 12 Aug 2020 21:01:58 +0200
[Message part 1 (text/plain, inline)]
sorry to write again, but my previous patch could work only if the
interpreter is set to /bin/sh without the -e option

if you don't want to remove the -e option, then this patch should
applied instead

ciao!
[eudev-daemon-e.patch (text/x-patch, attachment)]

Reply sent to dak@devuan.org:
You have taken responsibility. (Fri, 06 Nov 2020 16:48:01 GMT) (full text, mbox, link).


Notification sent to David Kuehling <dvdkhlng@posteo.de>:
bug acknowledged by developer. (Fri, 06 Nov 2020 16:48:05 GMT) (full text, mbox, link).


Message #45 received at 483-done@bugs.devuan.org (full text, mbox, reply):

From: dak@devuan.org
To: 483-done@bugs.devuan.org
Subject: #483: fixed in src:eudev version 3.2.9-8
Date: Fri, 06 Nov 2020 16:38:02 +0000
Version: 3.2.9-8

Source package eudev (3.2.9-8) added to Devuan suite unstable.

This closes bug report 483.

Thanks

DAK managing the Devuan archive

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Wed, 04 Nov 2020 16:48:24 +0100
Source: eudev
Binary: eudev libeudev1 libeudev-dev eudev-udeb libeudev1-udeb
Architecture: source
Version: 3.2.9-8
Distribution: unstable
Urgency: medium
Maintainer: Devuan Dev Team <devuan-dev@lists.dyne.org>
Changed-By: Svante Signell <svante.signell@gmail.com>
Description:
 eudev      - /dev/ and hotplug management daemon
 eudev-udeb - /dev/ and hotplug management daemon (udeb)
 libeudev-dev - libeudev development files
 libeudev1  - libeudev shared library
 libeudev1-udeb - libeudev shared library (udeb)
Closes: 483
Changes:
 eudev (3.2.9-8) unstable; urgency=medium
 .
   * debian/eudev.init:
     - Fix startup with slow boot media like DVD and USB.
       Thanks Trek <trek00@inbox.ru> for the patch (Closes: #483)
   * debian/control: Fix Vcs-Git and Vcs-Browser entries.
   * debian/watch: Use tags to find latest release.
   * debian/rules:
     - Use autogen.sh directly and remove target autoreconf.
     - Use DEB_BUILD_MAINT_OPTIONS = hardening=+all instead of CFLAGS etc.
   * debian/changelog: Fix spelling error in 3.2.7-2.
   * .gitignore: Add emacs backup files *~.
 .
   * Fixed lintian warning/info entries:
 .
   * debian/patches: man_udev.xml.patch
     Fixes: eudev: spelling-error-in-manpage
 .
   * debian/control:
     Fixes: eudev source: rules-requires-root-missing,
       out-of-date-standards-version (no changes),
       binary-control-field-duplicates-source field "section" in package eudev,
       binary-control-field-duplicates-source field "priority" in package
       libeudev1 libeudev-dev eudev-udeb libeudev1-udeb,
       xc-package-type-in-debian-control
 .
   * debian/rules:
     Fixes: eudev: hardening-no-bindnow
 .
   * debian/tests: New directory. Contents: control, udev
     Fixes: eudev source: testsuite-autopkgtest-missing
 .
   * debian/copyright:
     Fixes: eudev source: insecure-copyright-format-uri,
       wildcard-matches-nothing-in-dep5-copyright src/core/securebits.h,
       unused-file-paragraph-in-dep5-copyright
 .
   * debian/compat: Remove
   * debian/control: Replace build dependency on
     debhelper (>=10) with debhelper-compat (=12)
     Fixes: package-uses-old-debhelper-compat-version,
       extended-description-is-probably-too-short: eudev, libeudev, libeudev-dev
 .
   * debian/eudev.pre{inst,rm},eudev.post{inst,rm}
     Fixes: eudev: maintainer-script-without-set-e: pre{inst,rm}, post{inst,rm}
 .
   * debian/libeudev1.symbols: Don't include a libeudev1.symbols file to avoid:
     symbols-file-contains-current-version-with-debian-revision.
     Instead use an override for the warning: no-symbols-control-file.
 .
   * debian/source/lintian-overrides:
     eudev source: source-contains-data-from-ieee-data-oui-db
     eudev source: upstream-metadata-file-is-missing
     eudev source: debian-watch-does-not-check-gpg-signature
 .
   * debian/eudev.lintian-overrides:
     eudev: appstream-metadata-missing-modalias-provide
     eudev: spelling-error-in-binary
     eudev: improbable-bug-number-in-closes
     eudev: conflicts-with-version udev (<< 1:3.2.9+devuan4)
     # Unknown why
     eudev: hardening-no-fortify-functions lib/udev/mtd_probe
 .
   * debian/libeudev1.lintian-overrides:
     libeudev1: package-name-doesnt-match-sonames
     libeudev1: improbable-bug-number-in-closes
     libeudev1: conflicts-with-version libudev1 (<< 1:3.2.9+devuan4)
     libeudev1: no-symbols-control-file lib/x86_64-linux-gnu/libudev.so.1.6.3
 .
   * debian/libeudev-dev.lintian-overrides:
     libeudev-dev: improbable-bug-number-in-closes
     libeudev-dev: conflicts-with-version libudev-dev (<< 1:3.2.9+devuan4)
 .
   * eudev-udeb.lintian-overrides:
     # None of these overrides work: Why?
     eudev-udeb udeb: hardening-no-fortify-functions lib/udev/mtd_probe
     eudev-udeb udeb: spelling-error-in-binary bin/udevadm ressize resize
     eudev-udeb udeb: spelling-error-in-binary sbin/udevd ressize resize
     eudev-udeb udeb: debug-package-should-be-named-dbg usr/lib/debug/.dwz/
 .
   * libeudev1-udeb.lintian-overrides:
    # This override does not work: Why?
    libeudev1-udeb udeb: package-name-doesnt-match-sonames libudev1
Checksums-Sha1:
 4ca7ee690bb592afbd64d08953132463a3b3ea7d 2345 eudev_3.2.9-8.dsc
 d65744b42d59d5227fb85eb08596dd82efc6daf1 62164 eudev_3.2.9-8.debian.tar.xz
 1714353a61e6ca1b2b5d4126c08448d4101c2e19 3398 eudev_3.2.9-8_source.buildinfo
Checksums-Sha256:
 1b0077b1ce82b96a8ab914babed2bbffd697b6ff9ce5255789ae3260b3505fa9 2345 eudev_3.2.9-8.dsc
 d555e267c2543e9aa4323321bded4a904c11c5c7f392bc247fd7efe2dac69e21 62164 eudev_3.2.9-8.debian.tar.xz
 4e3a6fce281146eda3c84a75766cc42b86b12c43566382e03379dead1979755b 3398 eudev_3.2.9-8_source.buildinfo
Files:
 42a1a80e3c22e3919c9816f52e9892ee 2345 admin optional eudev_3.2.9-8.dsc
 b8a33e81ca64d2087591fc96f9740e65 62164 admin optional eudev_3.2.9-8.debian.tar.xz
 e6c4054498bb40bc94776ae4eb9960dd 3398 admin optional eudev_3.2.9-8_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEcuPLdzMV36LkZHQ9lFMhJFQZIvsFAl+leHoACgkQlFMhJFQZ
Ivu+FQf/aBpjytxX+C6RWffqiHHtHJAw0MxTMpfcLZe3uadr8tP28hdC9DV+KsP9
qaovq3zJJjeJzqlzt9uDQfNN3HbboTCXDi8cBLqZ4JzEUvVUPsFnaoikRJN+n6Fa
it58BZ1kkLuYyMnypXLbExGIDRgyNkTDkZFAA7CozziWh5CvaAGQfdZNDzPcQCku
OOdtiDDThcnpxxZjk0iG6s77fu+HWHUYbH6o34P6AIq/MvpgAwTZltpeIwcdi8ET
q8HgOuLlVT0yBf0UK9JHS/NxS5af5JkePC7U8Rd4EpexkiVmEmXBkLz6hhWxftTq
4ixDJKKqF+00CHwswGd9fqJAophUOA==
=V3Q+
-----END PGP SIGNATURE-----

Information forwarded to devuan-bugs@lists.dyne.org, Devuan Dev Team <devuan-dev@lists.dyne.org>:
bug#483; Package eudev. (Thu, 04 Nov 2021 10:42:02 GMT) (full text, mbox, link).


Acknowledgement sent to <lotteryusa_agen@daum. net>:
Extra info received and forwarded to list. Copy sent to Devuan Dev Team <devuan-dev@lists.dyne.org>. (Thu, 04 Nov 2021 10:42:05 GMT) (full text, mbox, link).


Information forwarded to devuan-bugs@lists.dyne.org, Devuan Dev Team <devuan-dev@lists.dyne.org>:
bug#483; Package eudev. (Sun, 10 Apr 2022 05:28:02 GMT) (full text, mbox, link).


Acknowledgement sent to matthais.michael@cheapnet.it:
Extra info received and forwarded to list. Copy sent to Devuan Dev Team <devuan-dev@lists.dyne.org>. (Sun, 10 Apr 2022 05:28:04 GMT) (full text, mbox, link).


Information forwarded to devuan-bugs@lists.dyne.org, Devuan Dev Team <devuan-dev@lists.dyne.org>:
bug#483; Package eudev. (Wed, 14 Dec 2022 15:02:01 GMT) (full text, mbox, link).


Acknowledgement sent to Thomas Liu <thomas@cndomainnames.net>:
Extra info received and forwarded to list. Copy sent to Devuan Dev Team <devuan-dev@lists.dyne.org>. (Wed, 14 Dec 2022 15:02:02 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Devuan BTS -- Powered by Debian bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.

Devuan Bugs Owner <owner@bugs.devuan.org>.
Last modified: Fri Apr 19 23:58:55 2024;