> > Hi Lennart,
> >
> > After modify journald.conf, got systemd log when the issue
> > reproduced. Please find it in attachment.
>
> Looking at the logs there seems to be a lot missing, in particular all
> the debug output of PID 1 is eventually going away.
>
> My educated guess: you are runnning "systemctl reboot" from user
> context? i.e. some script you run as part of your user sesion? If so,
> when the system goes down your user session of course will be
> terminated. Thus it's a race: either your session (and its associated
> services) are terminated via SIGTERM first, including the systemctl
> command you issued, or the systemctl is quicker and exits before it
> gets killed.
>

Here is where our code calls “/sbin/telinit 6” to reboot Linux.
https://github.com/vmware/open-vm-tools/blob/master/open-vm-tools/libDeployPkg/linuxDeployment.c#L1466
This code is executed when systemd vmtoolsd.service starts, attached the
vmtoolsd.service file.
Not seeing this issue before /sbin/telinit becomes a softlink to systemctl.

After I did a small change to let loop continue if the first /sbin/telinit 
fails,
then I can see only the first iteration /sbin/telinit got uncaught signal 15,
the second, the third iterations /sbin/telinit exit code is 0, no errors.
It seems our session is not terminated when SIGTERM received,
or systemctl is quicker and exits, but how could the latter iterations got
no errors.
> The net effect is the same: before we go down we need to terminate all
> processes, of course. And user processes are terminated before sytem
> processes, of course.



>
> Lennart
>
> --
> Lennart Poettering, Berlin

Attachment: vmtoolsd.service
Description: vmtoolsd.service

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to