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

Full log


🔗 View this message in rfc822 format

X-Loop: owner@bugs.devuan.org
Subject: bug#483: eudev: eudev sometimes fails to generate initial hotplug events
Reply-To: David Kuehling <dvdkhlng@posteo.de>, 483@bugs.devuan.org
Resent-From: David Kuehling <dvdkhlng@posteo.de>
Resent-To: devuan-bugs@lists.dyne.org
Resent-CC: dvdkhlng@posteo.de, Devuan Dev Team <devuan-dev@lists.dyne.org>
X-Loop: owner@bugs.devuan.org
Resent-Date: Mon, 15 Jun 2020 15:18:02 +0000
Resent-Message-ID: <handler.483.B.159223380313351@bugs.devuan.org>
Resent-Sender: owner@bugs.devuan.org
X-Devuan-PR-Message: report 483
X-Devuan-PR-Package: eudev
X-Devuan-PR-Keywords: 
Received: via spool by submit@bugs.devuan.org id=B.159223380313351
          (code B); Mon, 15 Jun 2020 15:18:02 +0000
Received: (at submit) by bugs.devuan.org; 15 Jun 2020 15:10:03 +0000
Delivered-To: devuanbugs@dyne.org
Received: from tupac3.dyne.org [195.169.149.119]
	by doc.devuan.org with IMAP (fetchmail-6.4.0.beta4)
	for <debbugs@localhost> (single-drop); Mon, 15 Jun 2020 15:10:03 +0000 (UTC)
Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by vm6.ganeti.dyne.org (Postfix) with ESMTPS id 63C77F604A5
	for <submit@bugs.devuan.org>; Mon, 15 Jun 2020 17:08:48 +0200 (CEST)
Authentication-Results: vm6.ganeti.dyne.org;
	dkim=pass (2048-bit key; secure) header.d=posteo.de header.i=@posteo.de header.b="dKuRCLqw";
	dkim-atps=neutral
Received: from submission (posteo.de [89.146.220.130]) 
	by mout01.posteo.de (Postfix) with ESMTPS id 6C61D160062
	for <submit@bugs.devuan.org>; Mon, 15 Jun 2020 17:08:42 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017;
	t=1592233724; bh=5xLcoFLMzhy9RvzqQmmsE8XtB1X/x8I6EYRQUHQdOWw=;
	h=From:To:Subject:Date:From;
	b=dKuRCLqwwWI18qA8HRGFrIGZBtDhsbgrBO6IcRPc7iyuKbcIG8JaBGQZ1wefzvjhq
	 +9Z8KUCwuFiQZqfkHILLvtt2YCeoVSuJQNidCMh20g38HcjUbQ3hNlLc5Opl+1He23
	 xB/D0rz0iCU9jIR9o3oGUwlMKUFfGlAZGKvUGv0Uf6zhjWGyvhdMPxvb+8jSVuGx+D
	 x/8N0G1kwUykRKEkr8YcrqEWzzciiPV4Cz7qD5fu289v+/FEZVR0EO7jEa2okbNDup
	 7mPhH7mX7EHGWASpk9y0CYOnxfCt2BFcmlDGDWwkWpal8Zyhv5ggvsGUnW5zQeRjoj
	 HG5g1bJz+yf+w==
Received: from customer (localhost [127.0.0.1])
	by submission (posteo.de) with ESMTPSA id 49lvqG3d14z6tmR
	for <submit@bugs.devuan.org>; Mon, 15 Jun 2020 17:08:38 +0200 (CEST)
From: David Kuehling <dvdkhlng@posteo.de>
To: Devuan Bug Tracking System <submit@bugs.devuan.org>
Date: Mon, 15 Jun 2020 17:08:38 +0200
Message-ID: <87v9jsbc3t.fsf@snail.snail.pool>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED,
	DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,
	RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_PASS autolearn=disabled
	version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tupac3.dyne.org
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

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: Thu Apr 18 20:09:29 2024;