[systemd-devel] systemctl reboot get terminated by signal 15

Lennart Poettering lennart at poettering.net
Thu Apr 29 20:05:13 UTC 2021


On Do, 29.04.21 16:55, Pengpeng Sun (pengpengs at vmware.com) wrote:

> > > 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.

vmtoolsd.service is probably asked to shutdown because of the system
shutdown, and the forked off /sbin/telinit is part of that service, so
it gets terminated too?

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list