[Pkg-lirc-maint] Bug#676343: lirc: /var/run/lirc contents disappear due to subtle udev interaction

Matthijs Kooijman matthijs at stdin.nl
Wed Jun 6 10:50:13 UTC 2012


Package: lirc
Version: 0.9.0~pre1-1
Severity: normal

Hi,

I was trying to get lirc running, but for some reason the /var/run/lirc
directory showed up empty after boot. Lircd was running, but the socket
and pidfile were not there. After a morning of debugging I found out
what was happening, but I'm not sure whose "fault" this is or what is
the best way to fix it, nor why this does not affect all users.

The system I'm trying this on is a highly customized Debian-live setup,
but I don't think that the behaviour I'm about to describe is limited to
this system. This system uses an on-board CIR controller (connected
internally through PCI I think), so perhaps this bug doesn't trigger for
USB devices, only for PCI devices and that's why nobody noticed it until
now?


Anyway, here's what happens for me:

 - During system boot, /etc/rcS.d/S03udev makes udev synthesize initial
   hotplug add events.
 - Udev responds to the add event for the CIR controller by calling
   /etc/init.d/lirc restart, which starts lircd.
 - /etc/rcS.d/S13mountall-bootclean.sh then runs, and cleans out all
   files in /var/run/lirc (leaving the directory to exist, I think).
 - /etc/rc2.d/S19lirc runs, but lircd doesn't start because it's already
   running.

The end result is a system with a running lircd, but no way to actually
reach it.

I'll be working around this problem by removing the udev rules file, but
I'm happy to help out with further details or by testing proposed fixes.

Gr.

Matthijs





More information about the Pkg-lirc-maint mailing list