herd stop mcron yields instant shutdown of computer

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Tonton
Owner
unassigned
Submitted by
Tonton
Severity
normal
T
T
Tonton wrote on 31 Jul 2018 20:59
(address . bug-guix@gnu.org)
20180731205911.111b62de@merlin.browniehive.net
Triggering action:
from bash: sudo herd stop mcron

Result: Exactly the same behaviour as when I call halt/poweroff/reboot from
bash. Except one of the messages clearly seen midscreen on the TTY is
shepherds message that mcron has been stopped. It then scrolls off as the
system is doing it's regular shutdown routine. And reboots, ending at the
normal login screen.

Expected result: mcron service stopped with maybe a message to stdout or log.
System still running.

Guix pull was at:
Generation 9 Jul 28 2018 22:59:26
guix 48d7ac1
branch: origin/master
commit: 48d7ac175f69fea587eaa0358eddb5c76205e8ad

The configuration on the host at the time can be found at:
(I'm guessing most of it can be stripped out, I'll see if I can reproduce in
a minimal os)

I was implementing the battery-check job for mcron (line 71). Which I know
does not work as is in the config above. It has since been improved.


Here is /var/log/messages around the time (removed ip's and some ntpd lines
because ip's):

750117:Jul 31 18:24:55 localhost shepherd[1]: Service mcron has been started.
750118:Jul 31 18:24:55 localhost shepherd[1]: Service mcron has been disabled.
750119:Jul 31 18:24:55 localhost shepherd[1]: (Respawning too fast.)
750172:Jul 31 18:37:42 localhost shepherd[1]: Enabled service mcron.
750173:Jul 31 18:37:42 localhost shepherd[1]: Service mcron has been started.
750174:Jul 31 18:37:42 localhost shepherd[1]: Respawning mcron.
750175:Jul 31 18:37:42 localhost shepherd[1]: Service mcron has been started.
750176:Jul 31 18:37:42 localhost shepherd[1]: Respawning mcron.
750177:Jul 31 18:37:42 localhost shepherd[1]: Service mcron has been started.
750178:Jul 31 18:38:20 localhost shepherd[1]: [No documentation.]
750203:Jul 31 18:43:54 localhost shepherd[1]: Service mcron has been stopped.
750204:Jul 31 18:43:54 localhost shepherd[1]: Exiting shepherd...
750205:Jul 31 18:43:54 localhost shepherd[1]: Service console-font-tty2 has been stopped.
750206:Jul 31 18:43:54 localhost shepherd[1]: Service term-tty2 has been stopped.
750207:Jul 31 18:43:54 localhost shepherd[1]: Service cups has been stopped.
750208:Jul 31 18:43:54 localhost shepherd[1]: Service rpcbind-daemon has been stopped.
750209:Jul 31 18:43:54 localhost avahi-daemon[833]: Got SIGTERM, quitting.
750210:Jul 31 18:43:54 localhost shepherd[1]: Service avahi-daemon has been stopped.
750211:Jul 31 18:43:54 localhost avahi-daemon[833]: Leaving mDNS multicast group on interface wlp0s20u2.IPv6 with address
750212:Jul 31 18:43:54 localhost avahi-daemon[833]: Leaving mDNS multicast group on interface wlp0s20u2.IPv4 with address
750213:Jul 31 18:43:54 localhost ntpd[827]: ntpd exiting on signal 15 (Terminated)
750218:Jul 31 18:43:54 localhost shepherd[1]: Service ntpd has been stopped.
750219:Jul 31 18:43:54 localhost connmand[826]: Terminating
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEJpQ8ER/dPhCuYhy5z+UMpbuBoZAFAltgsYAACgkQz+UMpbuB
oZBbdhAAlDGGk9my7b0ceuzRSfNft73EoC+0X5Ebp+jkKURhzO6qqfOSHrWU+CjP
lZzhKEmuzbzJd59f/mh+L2gZ6TeUqgsYBGp1eJQb/crTUdoDCG5qwkGSHPhDt5QN
a5wKkAYSZ3IrjBWuXUtZ2To0rA2BtWb1BfcGXtqWsYmoEagLm7cNu0SifUu1oBsW
V1ptGKA46IXq0t/lr2PU7nCQW5JLqGdeFFAnRUBZjuriGa58LH1XTpDnBGUQEu/W
OaqHJmz0Uw90wdJJJdiRP/uMqKBRpm7E+QTYhpRxcWh1TS8Sozmw4V0vFUUMkcH3
oBevab9fD58kKP22EuRehDN3loXv46W2LoKNtvdNJMTc71WD8T6gxEyfkf3Gt1k5
WFTQrcKH3crhRSWVhgmbpj+drDPXQVoqz9lG7WNjpm9aJzcrCWKTr34C+NJHqhp7
JxQWXwcrjW8z17p7jIrktvT00f7SVCA0l1qxD5KE8KeR33hzSEC+IkZXQCorjb3a
qu0wn8fTbytCVjxWSIv/fnA1TVT/x5zfvPQ/79totCjfG8883lpAJNSmZqib+/Un
ccDHZqQfAj+x+ygE9pCm+Rao2kQV0px8kvYWMDffulArkQGRT3lwcBvZg5hXZvPj
2JkhKg3dYF8RZOckhdVvFvC0vO1VN3ifBTrORJGnf44EV2YavAI=
=4mpJ
-----END PGP SIGNATURE-----


T
T
Tonton wrote on 1 Aug 2018 01:51
(address . 32336@debbugs.gnu.org)
20180801015131.6d6e5fad@merlin.browniehive.net
I attempted to reproduce the bug in a minimal-ish vm. First I ran guix pull
--commit=48d7ac175f69fea587eaa0358eddb5c76205e8ad (the same as the previous
generation where this occured) Then I built the following config as a vm:

(add-to-load-path "/home/ton/guixsd/modules/")
(setenv "GUIX_PACKAGE_PATH" "/home/ton/guixsd/modules/:$GUIX_PACKAGE_PATH")
(use-modules (gnu)
(gnu system)
(gnu tests)
(guix monads)
(guix store)
(ice-9 rdelim)
(srfi srfi-1))

(use-service-modules networking mcron)

(use-package-modules search)

(define updatedb-job
#~(job '(next-hour '(3))
(lambda ()
(execl (string-append #$findutils "/bin/updatedb")
"updatedb"
"--prunepaths=/tmp /var/tmp /gnu/store"))
"Updatedb!"))

(define %mcron-os
(simple-operating-system
(dhcp-client-service)
(mcron-service (list updatedb-job))))

%mcron-os

When booted I log in as root, check mcron is running, then stop it. And it
behaves as expected.

So, as of now I have not been able to reproduce my own bug. I experienced it
twice some hours ago, but after running a guix pull and a reconfigure it is
gone AFAIK.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEJpQ8ER/dPhCuYhy5z+UMpbuBoZAFAltg9gMACgkQz+UMpbuB
oZD8Mg//d9vJ89Aaiwk0Otu4pSH+lVyM3Rt8hsb9smHaDmkHedNw0iJSZ2hWBLat
o4OSTxciPMPZ8kNCBvenYCAr1wFqQ+V4m94oCNNxYUYvPP//ly9eueeF024uqDXD
owF3BLwCaxdaItOfVfJb6EF2VCDZiYgcur5K9wUiylBujA5slRxdoCrqqkXDK9V7
5XpKwAA+ayxyxWup+TcKGnSFEHZR0XizReaAZJUPHK//BbHiVFUol3ZAxIpaMpHd
9eeMW74xcB3NC1LD20bPFZCAabbgqqGNxmh2vrzBbR0HEXIXYzwcIxqJ8wEcpbPK
OSUf1+ciuxY1KKboJCeVUb3Y4N+BljRmnkqvtD1uKP3bXg9LFq7ItSQ2M/XSq7Xs
GDVN+cm0sHis8pSVX/YaHZl5oo+WqKM3U4kiPAE0GTp2aZg+vij0Nv0KZEvBj+F1
RihFwcVOQtWMS2KQMxIYvFtbbsLFgrxbaU6mxyMCxmqomoxDaMmH2an0sg39B0m3
gTrgfKOqqfadA+W0mx/otWuCwKG9puSROlhqyRRHmvBwrW5QWOErksO5Cv0kzjte
V6LHn1COY2N7fcn/LtylzAjKNFTbdsJywba6GnKae+DwoKxbz6uklUYDryjUDoYv
6iYvNugr027Cv/IfccuhG+Qny6Oa9BK82JpOaKNYx6UrA8yEu3w=
=oEmM
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 21 Aug 2018 12:19
(name . Tonton)(address . tonton@riseup.net)(address . 32336@debbugs.gnu.org)
87tvnoowdh.fsf@gnu.org
Hello,

Tonton <tonton@riseup.net> skribis:

Toggle quote (3 lines)
> Triggering action:
> from bash: sudo herd stop mcron

[...]

Toggle quote (14 lines)
> 750173:Jul 31 18:37:42 localhost shepherd[1]: Service mcron has been started.
> 750174:Jul 31 18:37:42 localhost shepherd[1]: Respawning mcron.
> 750175:Jul 31 18:37:42 localhost shepherd[1]: Service mcron has been started.
> 750176:Jul 31 18:37:42 localhost shepherd[1]: Respawning mcron.
> 750177:Jul 31 18:37:42 localhost shepherd[1]: Service mcron has been started.
> 750178:Jul 31 18:38:20 localhost shepherd[1]: [No documentation.]
> 750203:Jul 31 18:43:54 localhost shepherd[1]: Service mcron has been stopped.
> 750204:Jul 31 18:43:54 localhost shepherd[1]: Exiting shepherd...
> 750205:Jul 31 18:43:54 localhost shepherd[1]: Service console-font-tty2 has been stopped.
> 750206:Jul 31 18:43:54 localhost shepherd[1]: Service term-tty2 has been stopped.
> 750207:Jul 31 18:43:54 localhost shepherd[1]: Service cups has been stopped.
> 750208:Jul 31 18:43:54 localhost shepherd[1]: Service rpcbind-daemon has been stopped.
> 750209:Jul 31 18:43:54 localhost avahi-daemon[833]: Got SIGTERM, quitting.

The “Exiting shepherd” message above normally only gets printed upon
‘halt’ or ‘reboot’ (or ‘herd stop root’.) Could it be that one of these
commands was run at that time?

Toggle quote (4 lines)
> So, as of now I have not been able to reproduce my own bug. I experienced it
> twice some hours ago, but after running a guix pull and a reconfigure it is
> gone AFAIK.

I’ve just tried in a VM and haven’t been able to reproduce it either.

I’m closing the bug but do reopen it if the problem comes up again.

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 21 Aug 2018 12:19
control message for bug #32336
(address . control@debbugs.gnu.org)
87sh38owd5.fsf@gnu.org
tags 32336 notabug
close 32336
?