Bug#791944: /etc/init.d/sendsigs kills systemd-udevd upon shutdown, causing dmsetup to hang

Pali Rohár pali.rohar at gmail.com
Sat Jun 10 20:14:43 BST 2017


On Wednesday 07 June 2017 09:58:55 Pali Rohár wrote:
> On Tuesday 06 June 2017 11:56:45 Felipe Sateler wrote:
> > On Mon, Jun 5, 2017 at 2:32 PM, Pali Rohár <pali.rohar at gmail.com>
> > wrote:
> > > On Monday 05 June 2017 20:23:52 Michael Biebl wrote:
> > >> Am 05.06.2017 um 13:12 schrieb Pali Rohár:
> > >> >> Am 05.06.2017 um 09:59 schrieb Pali Rohár:
> > >> >>> /etc/rc0.d/K08cryptdisks
> > >> >>> /etc/rc0.d/K09cryptdisks-early
> > >> >>> /etc/rc0.d/K10udev
> > >> > 
> > >> > Problem is that in K08 and K09 phase is udev not running, but
> > >> > socket is present. udev is probably killed by
> > >> > /etc/rc0.d/K03sendsigs which is before K08 and K09. Above
> > >> > patch modify K10 which is *after* K08 and K09, therefore it
> > >> > has absolutely no effect on fixing this issue.
> > >> 
> > >> Ah, ok. The info about sendsigs being ordered before udev on
> > >> shutdown was missing.
> > > 
> > > Anyway, if you are patching K10udev and whole freeze happens in
> > > K08cryptdisks and K09cryptdisks-early, then such patch is noop as
> > > whole freeze happens before patch line is executed. sendsigs
> > > does not change behaviour of patch.
> > > 
> > >> I guess we need both then:
> > >> - udev using the sendsigs.omit.d interface to avoid being killed
> > >> by /etc/init.d/sendsigs
> > >> and
> > >> - removing the socket on stop and making sure udev is stopped in
> > >> 0 / 6.
> > >> 
> > >> Anyone willing to work on a patch?
> > > 
> > > I think the first thing which needs to be done is to define order
> > > sendsigs, cryptdisks and udev. Should be udev really stopped
> > > after cryptdisks? Or not? If not, then udev should be stopped
> > > *before* sendsigs. Otherwise sendsigs needs to be patched to not
> > > kill udev.
> > 
> > If the udev pid is added to sendsigs.omit.d as noted by Michael
> > then sendsigs should stop killing udev. So no need to patch
> > sendsigs.
> 
> Yes, this seems to work.
> 
> > > But other question is what happens in system when udev is still
> > > running even after unmounting filesystem and when basically all
> > > other remaining services were already killed by sendsigs...
> > 
> > Udev would still be stopped, just later. I note that under systemd
> > udev is not stopped until the final killing spree, so hopefully
> > this delay in stopping will not introduce problems.
> 
> See attached patch for /etc/init.d/udev. I tested it and it fixed
> problem this problem with freezing computer at reboot.
> 
> I need to use --background --make-pidfile because udev itself cannot
> create pidfile.

PING. Do you need to test something more? Or is that patch enough?

-- 
Pali Rohár
pali.rohar at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20170610/2fc8c064/attachment-0002.sig>


More information about the Pkg-systemd-maintainers mailing list