[systemd-devel] systemd kills mdmon if it was started manually by user

Williams, Dan J dan.j.williams at intel.com
Tue Nov 8 15:27:00 PST 2011


On Tue, Nov 8, 2011 at 6:43 AM, Lennart Poettering
<lennart at poettering.net> wrote:
> On Mon, 07.11.11 11:09, Williams, Dan J (dan.j.williams at intel.com) wrote:
>> So I think mdmon should always try to escape itself from cgroup based
>> killing.  It follows the lifespan of the array, and if the array is
>> not stopped by the cgroup exit (or the array lifespan is not
>> controlled in a service file), then mdmon must keep running.
>
> Well, I think when it gets killed by the cgroup-based killer then it
> should try to tear down its MD device.

We can easily fall off the complexity cliff trying to tear down the MD
device because it can be pinned by a mounted filesystem or being
claimed anywhere in an arbitrary stack of DM or MD devices.  I did not
think cgroup exit would umount() filesystems?

[..]
>> I notice that if the rootfs is on a dm or md device systemd/shutdown
>> will always fall through to ultimate_send_signal() which will not
>> discriminate against processes flagged with '@'.  Since we aren't
>> stopping the root md device I wonder if ultimate_send_signal() should
>> also ignore flagged processes, or whether the failure to stop the root
>> device is to be expected and let shutdown skip ultimate_send_signal()
>> if the only remaining work is shutting down the rootfs-blockdev.  I'm
>> leaning towards the latter.
>
> The idea was to skip processes flgged with '@' in both the
> ultimate_send_signal() and send_signal() calls.

Ok, that makes it easier.

--
Dan


More information about the systemd-devel mailing list