Tomas Volf wrote 2 weeks ago
(address . bug-guix@gnu.org)
Hi,
I might have find a bug in shepherd timers. I have a timer scheduled to
run every 24 hours, the definition is as follow:
Toggle snippet (21 lines)
(define %kerberos-log-in-refresh-service
(let ((name 'kerberos-log-in-refresh))
(simple-service
name
home-shepherd-service-type
(list (shepherd-service
(documentation "Refresh the kerberos ticket.")
(provision (list name))
(requirement '(kerberos-reachable?))
(start #~(make-timer-constructor
(calendar-event #:hours '(12) #:minutes '(0))
(command (list #$%kerberos-log-in))))
(stop #~(make-timer-destructor))
(modules (cons '(shepherd service timer)
%default-modules))
(actions (list (shepherd-action
(name 'trigger)
(documentation "Immediately refresh the ticket.")
(procedure #~trigger-timer)))))))))
This should run every 24 hours (at noon) and execute the
%kerberos-log-in script (simple guile program that authenticates against
kerberos).
However that did not happen. Here are the logs:
Toggle snippet (9 lines)
2025-02-22 19:17:00 Service kerberos-log-in running with value #<<process> id: 730 command: ("/gnu/store/8m21cnqnllk6g1kcgyj91i5h05s7c0c4-krb-log-in")>.
2025-02-22 19:17:00 [8m21cnqnllk6g1kcgyj91i5h05s7c0c4-krb-log-in] <redacted>
2025-02-22 19:17:00 [8m21cnqnllk6g1kcgyj91i5h05s7c0c4-krb-log-in] <redacted>
2025-02-22 19:17:00 [8m21cnqnllk6g1kcgyj91i5h05s7c0c4-krb-log-in] <redacted>
2025-02-22 19:17:00 [8m21cnqnllk6g1kcgyj91i5h05s7c0c4-krb-log-in] <redacted>
2025-02-23 12:00:02 Waiting anew for timer 'kerberos-log-in-refresh' (resuming from sleep state?).
2025-02-23 22:00:01 Not rotating '/home/<redacted>/.local/state/shepherd/dbus.log', which is below the 8192 B threshold.
The ones from 19:17:00 are from 'kerberos-log-in service, which is
one-shot executed upon login. That went fine.
However the 'kerberos-log-in-refresh is only at 12:00:02, and only as
"Waiting anew ...". The message indicates that the computer might be
resuming from sleep, however that was not the case here. It is a
desktop machine, and it was left running over night.
Here is herd status:
Toggle snippet (21 lines)
$ herd status kerberos-log-in-refresh
● Status of kerberos-log-in-refresh:
It is running since Sat 22 Feb 2025 07:17:00 PM CET (28 hours ago).
Timed service.
Periodically running: /gnu/store/8m21cnqnllk6g1kcgyj91i5h05s7c0c4-krb-log-in
It is enabled.
Provides: kerberos-log-in-refresh
Requires: kerberos-reachable?
Custom action: trigger
Will be respawned.
Upcoming timer alarms:
Mon 24 Feb 2025 12:00:00 PM CET (in 13 hours)
Tue 25 Feb 2025 12:00:00 PM CET (in 37 hours)
Wed 26 Feb 2025 12:00:00 PM CET (in 3 days)
Thu 27 Feb 2025 12:00:00 PM CET (in 4 days)
Fri 28 Feb 2025 12:00:00 PM CET (in 5 days)
Have a nice day,
Tomas
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
-----BEGIN PGP SIGNATURE-----
iQJCBAEBCgAsFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAme7m5QOHH5Ad29sZnNk
ZW4uY3oACgkQL7/ufbZ/wakYBQ/+K15AMkG2pgFPzykw3IaxyZTs0WYDaYgJwgw2
WQ9LrN0zit3qp3V3TaCPxjx33Lo3oiYeMpm4RsCz6MbuKkpPESZjeNp0Ei/dP2Ju
m6oDV5xLbfrknxzOSmtguCCOLvFmGmmout33df6Mg2gfBEBKfNBZlRYZHQgiK12E
szCSQ5QHLbV75BJfie0N+92B3XKUYDO006e1giVVNV4nhM/qxf+aPc5ezZkXtmAn
t2jd6d+UCptiBhVx5TGSEACJXWg9zl9Rvac0MhXEOSKPXtaYCKwb7wbjO1jI3gAg
nk53vs1s5Q9iGZE5agHlzTkwwDS8BgTBzZ7mv9nLaKF7MRIhf+5ey4P943l0goXa
mfsuY7ccDpAFh028C69OBIogMswzJ24IRsIlKyxxSLRq65iKzLBfcoNsx+8uSjUV
KgBuhCiAIM96KDn8KfRTFZ6WoveWln/khtRtQYFPkQRCQTHbY3PLhv/PO+Wp+Ars
QAnxbhB7u1VbG8/pz/DktY4A30fguevwxf2WFYEPYh0QPvFn6+VTiFHMhO2qhoqo
A+apJzk8msbMzLGmUXDl0F4n6lya3Qlq7KPRCEImtWE722s/fc8yeNxJkPfh+iTl
ylOMQayzgeMamBabSAyEfWNSjBG+KzzBfxgdwqT+1i6JJVCB3H0nRdYe0U5cLXqk
mrBZuGY=
=RcTh
-----END PGP SIGNATURE-----