From: md@Linux.IT (Marco d'Itri) Date: Sun, 25 Oct 2009 18:16:22 +0000 Subject: sleep 5 seconds and log a message if the signalfd(2) fd returns 0 Message-Id: <20091025181622.GA30566@bongo.bofh.it> MIME-Version: 1 Content-Type: multipart/mixed; boundary="X1bOJ3K7DJ5YkBrT" List-Id: To: linux-hotplug@vger.kernel.org --X1bOJ3K7DJ5YkBrT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline This is better than just failing because it is quite annoying for the admin when udevd fails to start while it is being upgraded and breaks the system. -- ciao, Marco --X1bOJ3K7DJ5YkBrT Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=sleep_on_broken_signalfd Sleep 5 seconds and log a message if the signalfd(2) fd returns 0. Users running 2.6.22 kernels reported udevd spinning in a loop with the signalfd fd reported as readable but providing no data. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=551743 for details. --- a/udev/udevd.c +++ b/udev/udevd.c @@ -1076,6 +1076,10 @@ int main(int argc, char *argv[]) size = read(pfd[FD_SIGNAL].fd, &fdsi, sizeof(struct signalfd_siginfo)); if (size == sizeof(struct signalfd_siginfo)) handle_signal(udev, fdsi.ssi_signo); + else { + err(udev, "read(2) on the signalfd(2) fd returned 0: your kernel is buggy!\n"); + sleep(5); + } } /* device node and rules directory inotify watch */ --X1bOJ3K7DJ5YkBrT--