udev - udevd fails to timeout events if the kernel have no inotify

Bug #25087 reported by Debian Bug Importer
4
Affects Status Importance Assigned to Milestone
udev (Debian)
Fix Released
Unknown
udev (Ubuntu)
Invalid
High
Scott James Remnant (Canonical)

Bug Description

Automatically imported from Debian bug report #337865 http://bugs.debian.org/337865

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Automatically imported from Debian bug report #337865 http://bugs.debian.org/337865

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Mon, 7 Nov 2005 00:07:03 +0100
From: Bastian Blank <email address hidden>
To: <email address hidden>
Subject: udev - udevd fails to timeout events if the kernel have no inotify

--b5gNqxB1S1yM7hjW
Content-Type: multipart/mixed; boundary="G4iJoqBmSsgzjUCe"
Content-Disposition: inline

--G4iJoqBmSsgzjUCe
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Package: udev
Version: 0.72-2
Severity: grave

udevd fails to timeout events if it runs on a kernel without inotify.
The attached patch fixes the select call.

Bastian

--=20
Actual war is a very messy business. Very, very messy business.
  -- Kirk, "A Taste of Armageddon", stardate 3193.0

--G4iJoqBmSsgzjUCe
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment; filename=diff
Content-Transfer-Encoding: quoted-printable

diff -urN udev-072.orig/udevd.c udev-072/udevd.c
--- udev-072.orig/udevd.c 2005-11-05 22:05:35.000000000 +0100
+++ udev-072/udevd.c 2005-11-07 00:01:32.000000000 +0100
@@ -996,12 +996,17 @@
=20
   FD_ZERO(&readfds);
   FD_SET(signal_pipe[READ_END], &readfds);
+ fdcount =3D signal_pipe[READ_END];
   FD_SET(udevd_sock, &readfds);
+ fdcount =3D UDEV_MAX(fdcount, udevd_sock);
   FD_SET(uevent_netlink_sock, &readfds);
- if (inotify_fd > 0)
+ fdcount =3D UDEV_MAX(fdcount, uevent_netlink_sock);
+ if (inotify_fd > 0) {
    FD_SET(inotify_fd, &readfds);
+ fdcount =3D UDEV_MAX(fdcount, inotify_fd);
+ }
=20
- fdcount =3D select(UDEV_MAX(uevent_netlink_sock, inotify_fd)+1, &readfds=
, NULL, NULL, NULL);
+ fdcount =3D select(fdcount+1, &readfds, NULL, NULL, NULL);
   if (fdcount < 0) {
    if (errno !=3D EINTR)
     dbg("error in select: %s", strerror(errno));

--G4iJoqBmSsgzjUCe--

--b5gNqxB1S1yM7hjW
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iEYEARECAAYFAkNujJcACgkQnw66O/MvCNEfAQCfV+ZemwwcXFDyfsN0m6n5dzir
pc4An0enqxbZsix6n1NcsJl6V8lluGQC
=OIWC
-----END PGP SIGNATURE-----

--b5gNqxB1S1yM7hjW--

Revision history for this message
In , Marco d'Itri (md) wrote : tagging 337865

# Automatically generated email from bts, devscripts version 2.9.8
tags 337865 patch pending upstream

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Mon, 7 Nov 2005 01:45:19 +0100
From: Marco d'Itri <email address hidden>
To: <email address hidden>
Subject: tagging 337865

# Automatically generated email from bts, devscripts version 2.9.8
tags 337865 patch pending upstream

Revision history for this message
In , Marco d'Itri (md) wrote : Bug#337865: fixed in udev 0.073-1

Source: udev
Source-Version: 0.073-1

We believe that the bug you reported is fixed in the latest version of
udev, which is due to be installed in the Debian FTP archive:

udev-udeb_0.073-1_i386.udeb
  to pool/main/u/udev/udev-udeb_0.073-1_i386.udeb
udev_0.073-1.diff.gz
  to pool/main/u/udev/udev_0.073-1.diff.gz
udev_0.073-1.dsc
  to pool/main/u/udev/udev_0.073-1.dsc
udev_0.073-1_i386.deb
  to pool/main/u/udev/udev_0.073-1_i386.deb
udev_0.073.orig.tar.gz
  to pool/main/u/udev/udev_0.073.orig.tar.gz

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Marco d'Itri <email address hidden> (supplier of updated udev package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Mon, 7 Nov 2005 01:44:39 +0100
Source: udev
Binary: udev udev-udeb
Architecture: source i386
Version: 0.073-1
Distribution: unstable
Urgency: high
Maintainer: Marco d'Itri <email address hidden>
Changed-By: Marco d'Itri <email address hidden>
Description:
 udev - /dev/ and hotplug management daemon
 udev-udeb - /dev/ and hotplug management daemon (udeb)
Closes: 337826 337865 337881
Changes:
 udev (0.073-1) unstable; urgency=high
 .
   * New upstream release.
     + Fixes udevd on systems without inotify support.
       (Closes: #337865, #337826)
   * Use start-stop-daemon --name instead of --exec to be sure to kill
     udevd in prerm. (Closes: #337881)
   * Added a note about network hotplugging to README.Debian.
Files:
 0a1990ed8a2f717389ee67184730b1d8 593 admin optional udev_0.073-1.dsc
 6cc1d0c03cfd0c70fd3911959b7c614f 433569 admin optional udev_0.073.orig.tar.gz
 bd1c1172584db8e84c6ab2ba08091d23 43346 admin optional udev_0.073-1.diff.gz
 40d694dbc117fdf6d5af86c0f000c78d 295032 admin optional udev_0.073-1_i386.deb
 9df6098cd9c022ef62f97be52fe50444 52234 debian-installer optional udev-udeb_0.073-1_i386.udeb
Package-Type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD4DBQFDb0wvFGfw2OHuP7ERAk4wAJ9IvFrkNu7ZW47t4VeoTP1vM9Jm6wCWM6xG
rNajzo7XJL+PFuiiytJuPA==
=ElYJ
-----END PGP SIGNATURE-----

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Mon, 07 Nov 2005 06:47:18 -0800
From: Marco d'Itri <email address hidden>
To: <email address hidden>
Subject: Bug#337865: fixed in udev 0.073-1

Source: udev
Source-Version: 0.073-1

We believe that the bug you reported is fixed in the latest version of
udev, which is due to be installed in the Debian FTP archive:

udev-udeb_0.073-1_i386.udeb
  to pool/main/u/udev/udev-udeb_0.073-1_i386.udeb
udev_0.073-1.diff.gz
  to pool/main/u/udev/udev_0.073-1.diff.gz
udev_0.073-1.dsc
  to pool/main/u/udev/udev_0.073-1.dsc
udev_0.073-1_i386.deb
  to pool/main/u/udev/udev_0.073-1_i386.deb
udev_0.073.orig.tar.gz
  to pool/main/u/udev/udev_0.073.orig.tar.gz

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Marco d'Itri <email address hidden> (supplier of updated udev package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Mon, 7 Nov 2005 01:44:39 +0100
Source: udev
Binary: udev udev-udeb
Architecture: source i386
Version: 0.073-1
Distribution: unstable
Urgency: high
Maintainer: Marco d'Itri <email address hidden>
Changed-By: Marco d'Itri <email address hidden>
Description:
 udev - /dev/ and hotplug management daemon
 udev-udeb - /dev/ and hotplug management daemon (udeb)
Closes: 337826 337865 337881
Changes:
 udev (0.073-1) unstable; urgency=high
 .
   * New upstream release.
     + Fixes udevd on systems without inotify support.
       (Closes: #337865, #337826)
   * Use start-stop-daemon --name instead of --exec to be sure to kill
     udevd in prerm. (Closes: #337881)
   * Added a note about network hotplugging to README.Debian.
Files:
 0a1990ed8a2f717389ee67184730b1d8 593 admin optional udev_0.073-1.dsc
 6cc1d0c03cfd0c70fd3911959b7c614f 433569 admin optional udev_0.073.orig.tar.gz
 bd1c1172584db8e84c6ab2ba08091d23 43346 admin optional udev_0.073-1.diff.gz
 40d694dbc117fdf6d5af86c0f000c78d 295032 admin optional udev_0.073-1_i386.deb
 9df6098cd9c022ef62f97be52fe50444 52234 debian-installer optional udev-udeb_0.073-1_i386.udeb
Package-Type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD4DBQFDb0wvFGfw2OHuP7ERAk4wAJ9IvFrkNu7ZW47t4VeoTP1vM9Jm6wCWM6xG
rNajzo7XJL+PFuiiytJuPA==
=ElYJ
-----END PGP SIGNATURE-----

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Not our version of udev (and we're jumping straight past this anyway)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.