[Pkg-sysvinit-devel] Bug#677097: mountall-bootclean.sh nukes udev's data in /run

Jakub Wilk jwilk at debian.org
Thu Nov 8 11:44:09 UTC 2012


* Roger Leigh <rleigh at codelibre.net>, 2012-11-08, 00:22:
>>>mountall-bootclean.sh removes files from /run, but these may include 
>>>files created by init scripts earlier in the same boot process. I 
>>>observed this because the script nuked files in /run/udev/, leaving 
>>>my X server without any input devices.
>>I can still reproduce this bug.
>That's a bit frustrating, I thought we had this nailed now.
>
>Would it be possible to debug this in a bit more detail on your system? 
>/lib/init/bootclean.sh's clean function must be failing all these 
>checks:
>
>        # Does not exist
>        [ -d "$dir" ] || return 1
>        # tmpfs does not require cleaning
>        [ -f "$dir/.tmpfs" ] && return 0
>        # Can clean?
>        checkflagfile "$dir" || return 0
>        # Already cleaned
>        [ -f "${dir}/.clean" ] && return 0
>        # Can't clean yet?
>        which find >/dev/null 2>&1 || return 1
>
>Could you possibly put some print statements in there and find out if 
>all these pass?  If so, is the ".tmpfs" file missing? Or the ".clean" 
>flag file?  If that's the case, we really need to know why they aren't 
>present, since they should have been created before this point.
>
>If the init scripts are being run in the wrong order, these could 
>potentially be run after the files were deleted.

This is what happens with the attached patch:

Thu Nov  8 12:17:30 2012: Cleaning up temporary files....
Thu Nov  8 12:17:30 2012: BEFORE BOOTMISC: [ .tmpfs dhclient.eth0.pid initctl initramfs lock mount network sendsigs.omit.d shm udev utmp ]
Thu Nov  8 12:17:30 2012: AFTER BOOTMISC: [ dhclient.eth0.pid initctl initramfs lock mount network sendsigs.omit.d shm udev utmp ]
Thu Nov  8 12:17:31 2012: Setting up X socket directories... /tmp/.X11-unix /tmp/.ICE-unix.
Thu Nov  8 12:17:31 2012: BEFORE MOUNTALL-BOOTCLEAN: [ dhclient.eth0.pid initctl initramfs lock mount network sendsigs.omit.d shm udev utmp ]
Thu Nov  8 12:17:31 2012: Cleaning up temporary files... /tmp /lib/init/rw /run /run/lock /run/shm.
Thu Nov  8 12:17:31 2012: AFTER MOUNTALL-BOOTCLEAN: [ .clean initramfs lock mount network sendsigs.omit.d shm udev utmp ]
Thu Nov  8 12:17:31 2012: INIT: Entering runlevel: 2

(This is on a VM on which I had to impose a sleep to make the bug 
trigger. However, the bug also triggers naturally on my development 
machine, which I can't reboot right know, though I'm pretty sure the 
cause is the same there.)

As I understand it, bootmisc is supposed to be run _after_ 
mountall-bootclean, though this order doesn't seem to be enforced in any 
way.

-- 
Jakub Wilk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 677097-debug.diff
Type: text/x-diff
Size: 782 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20121108/dae810e0/attachment.diff>


More information about the Pkg-sysvinit-devel mailing list