[systemd-devel] cryptsetup vs. swapon/fsck (some kind of race condition)

Andy Kittner andy.kittner at gmail.com
Thu May 15 18:20:28 PDT 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 15/05/14 23:38, Lennart Poettering wrote:
> On Thu, 15.05.14 23:15, Andy Kittner (andy.kittner at gmail.com) wrote:
> 
>> | May 15 22:06:47 pinky systemd[1]: Mounted Runtime Directory.
>> | May 15 22:06:47 pinky systemd[1]: Mounted Lock Directory.
> 
> This looks like remains from a *really* old systemd version. THis does not
> exist anymore. What distribution is this?
Gentoo

> 
> This used to bind mount /run to /var/run, and similar for /var/lock.
Yeah this appears to do something similar, but it's provided by
sys-apps/gentoo-systemd-integration not systemd itself, so I guess it's 
something distro-specific.

> 
>> | May 15 22:06:47 pinky systemd[1]: Started udev Kernel Device Manager.
>> | May 15 22:06:47 pinky systemd-cryptsetup[2433]: AKI DEBUG udev: open_queue_file failed with errno 2
>> | May 15 22:06:47 pinky systemd-cryptsetup[2433]: AKI DEBUG libdm:_check_udev_is_running: Udev is not running. Not using udev synchronisation code.
>>
>> So the udev queue file does not yet exist, libdm thinks the system is
>> not running udev and things go wrong...
> 
> This really should be turned off in libdm. It's really stupid and
> broken. We start these things in parallel, they create these races
> without reason. Since ages we don't support non-devtmpfs kernels
> anymore, [...]
And that's fine for systemd, but it doesn't necessarily mean that other 
projects work under the same assumption. And IMHO especially for 
critical things like lvm it is a good thing to support minimal 
configurations.

> What does libdm even check there precisely?
They call udev_queue_get_udev_is_active() from libudev to determine 
whether the system currently runs udev, or not.
See check_udev_is_running():
https://git.fedorahosted.org/cgit/lvm2.git/tree/libdm/libdm-common.c#n2071

>[...]

> Nope, we don't need more synchronization. The LVM guys should stop doing
> mknod() on their own. And if they insist, your distro should turn that
> off, or patch it out.

That sounds like this can only end in a systemd vs. the rest of the 
world flamewar and I have no intention to get involved in one of those,
so I guess I'll just work around it locally and call it a day, saves 
nerves and effort for everyone.

Anyway, thanks for the pointer with the device node, to me that looked 
like a rather harmless warning and not like a serious issue.

Regards,
Andy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCgAGBQJTdWfcAAoJED4ymUd/KFGwP9MQALqupxFKdl42W/6g83uUI0uR
zzNNpJhry2Iv/pR/foQhl3ml3Y9B0h+pECH0/ey44dXWPsEjwpHTInS62vDouibO
6c22a8SJFXhNJdyrzXbaFWkni9yrJqHZHQGfydza0sgH0bgZxozTs7Y3/ANShzrI
l2qcRhYI3Ea3XFDvs+9BnjOiPpccqS1J2LXnBpTLgiZ44o/9dcMVlIXXli98zi81
ySUfnuP3SvtUJnbKicv/7Ei0DVSz8IoAdqP/5nAEZE32ZvPhPCyh1TRRBPxaQv67
EVF3lwIsNSKJ5ggxjCEWCsId4WXGkOxHDqS4EAZOVdYswREvnhqBWkQ8Y53A/KyM
4KPKUXh8Ovf5skbo4lZTNqWlnSOhjhwMD4z37vGQuy11QYRZQZvfDgEnHF4uWaBy
ym7/zN+FOdGkmyx4VfDOlkjnFsLcBQ+J6loV0dRV6iAwB9Bx28FiNuwiQSdf4Fzd
twfFTA4ANiKFMydHxA7usWzxLrNH+Qyr6W2tzW01DQVFnb/LPc9nwnnfoc48eViE
ts5cjWqITMAF2mXX51vGoCp+yyXh56S0NrHqGQ2bvWi0mVtD9zkTrovBOdU2Mgt5
/WoFV6J658hS65A4fYBr8PmPNZ4dWBAbJZRjKVaXYqZusoXS194B8zHQZRKYq1Q5
YZggRD4teAxNPOKtzVqr
=jBQS
-----END PGP SIGNATURE-----



More information about the systemd-devel mailing list