Bug#1125004: Type=oneshot lost for anacron.service ?
On 3/4/26 3:58 PM, Harald Dunkel wrote: I think the problem is, anacron.service is run by the postinst script at upgrade time. This conflicts with the intention to run it triggered by the timer only. And since some daily anacron jobs might have a random delay of a couple of minutes the anacron.service appears to be hung. So I tried to say already I could not reproduce this issue when I tested with a new install of bookworm upgraded to trixie. anacron.service (triggered by the timer) was running during the upgrade with some jobs completed and some waiting to run. anacron received SIGUSR1 and exited during the upgrade and then the jobs that did not run were started again with a delay. Since your command output shows systemd-tty-ask-password-agent watching, I think the hang is from daemon-reload initiated from anacron's postinst on upgrade in your environment. This bug report will close when there is another release of anacron, so please submit a new bug report with more information to reproduce and help debug if it continues to be an issue. Thank you! -- Lance Lin GPG Fingerprint: 4A31 DB5A 1EE4 096C 8739 9880 9036 4929 4C33 F9B7 OpenPGP_0x903649294C33F9B7.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature
Bug#1125004: Type=oneshot lost for anacron.service ?
I think the problem is, anacron.service is run by the postinst script at upgrade time. This conflicts with the intention to run it triggered by the timer only. And since some daily anacron jobs might have a random delay of a couple of minutes the anacron.service appears to be hung. Regards Harri
Bug#1125004: Type=oneshot lost for anacron.service ?
On Sat, 07 Feb 2026 09:01:37 +0100 Harald Dunkel wrote: Thats also the reason why the anacron upgrade to Debian 13 gets stuck with root 55481 1 0 08:08 ?00:00:01 sshd: root@pts/5 root 55488 55481 0 08:08 pts/500:00:00 \_ -bash root 56821 55488 0 08:14 pts/500:00:02 \_ apt dist-upgrade root 66570 56821 0 08:17 pts/600:00:00 \_ /usr/bin/dpkg --status-fd 40 --configure --pending root 66635 66570 0 08:17 pts/600:00:00 \_ /bin/sh /var/lib/dpkg/info/anacron.postinst configure 2.3-36 root 66697 66635 0 08:17 pts/600:00:00 \_ /usr/bin/perl /usr/bin/deb-systemd-invoke restart anacron.service anacron.timer root 66704 66697 0 08:17 pts/600:00:00 \_ systemctl --quiet --system restart anacron.service anacron.timer root 66705 66704 0 08:17 pts/600:00:00 \_ /usr/bin/systemd-tty-ask-password-agent --watch You have to kill the anacron.service for apt upgrade to proceed. So I could not reproduce a hanging upgrade from Debian 12 (bookworm) to Debian 13 (trixie). anacron's jobs from the previous anacron.service are killed before the "apt dist-upgrade" anacron.service is started and the upgrade finished with anacron.service running. I think systemd-tty-ask-password-agent waiting for a password is the hang which may occur from the daemon-reload [1] in your environment? Is there something different from a default install or permission changes? [1] https://salsa.debian.org/debian/debhelper/-/blob/main/autoscripts/postinst-systemd-restart?ref_type=heads -- Lance Lin GPG Fingerprint: 4A31 DB5A 1EE4 096C 8739 9880 9036 4929 4C33 F9B7 OpenPGP_0x903649294C33F9B7.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature
Bug#1125004: Type=oneshot lost for anacron.service ?
Thats also the reason why the anacron upgrade to Debian 13 gets stuck with root 55481 1 0 08:08 ?00:00:01 sshd: root@pts/5 root 55488 55481 0 08:08 pts/500:00:00 \_ -bash root 56821 55488 0 08:14 pts/500:00:02 \_ apt dist-upgrade root 66570 56821 0 08:17 pts/600:00:00 \_ /usr/bin/dpkg --status-fd 40 --configure --pending root 66635 66570 0 08:17 pts/600:00:00 \_ /bin/sh /var/lib/dpkg/info/anacron.postinst configure 2.3-36 root 66697 66635 0 08:17 pts/600:00:00 \_ /usr/bin/perl /usr/bin/deb-systemd-invoke restart anacron.service anacron.timer root 66704 66697 0 08:17 pts/600:00:00 \_ systemctl --quiet --system restart anacron.service anacron.timer root 66705 66704 0 08:17 pts/600:00:00 \_ /usr/bin/systemd-tty-ask-password-agent --watch You have to kill the anacron.service for apt upgrade to proceed.
Bug#1125004: Type=oneshot lost for anacron.service ?
> No, I think the service file should have the Install section, since it > was removed and added later also. The changelog says removing it would > left broken symlink in the system. Ain't the WantedBy trigger running the anacron.service at boot time, ignoring the anacron.timer? This is surely unexpected. Do you think this should be added to the documentation? Regards Harri
Bug#1125004: Type=oneshot lost for anacron.service ?
On Mon, 12 Jan 2026 19:34:57 +0100 Harald Dunkel wrote: PS: Would you agree that the [Install] WantedBy=multi-user.target should be dropped as well? AFAIU a service to be triggered by a timer should not be referenced by multi-user.target. I am not sure how this relates to /etc/init.d/anacron, though. No, I think the service file should have the Install section, since it was removed and added later also. The changelog says removing it would left broken symlink in the system. -- Lance Lin GPG Fingerprint: 4A31 DB5A 1EE4 096C 8739 9880 9036 4929 4C33 F9B7 OpenPGP_0x903649294C33F9B7.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature
Bug#1125004: Type=oneshot lost for anacron.service ?
PS: Would you agree that the [Install] WantedBy=multi-user.target should be dropped as well? AFAIU a service to be triggered by a timer should not be referenced by multi-user.target. I am not sure how this relates to /etc/init.d/anacron, though. Regards Harri
Bug#1125004: Type=oneshot lost for anacron.service ?
On Thu, 08 Jan 2026 10:01:32 +0100 Harald Dunkel wrote: Package: anacron Version: 2.3-36 Aparently all systemd services to be triggered by a timer have set [Service] Type=oneshot except for anacron. Is this on purpose? Reason for asking is, Zabbix complains about anacron.service to be not running, because the oneshot is missing. Would be nice if this can be fixed. Thank you I don't see Type set in the service file before. Setting Type to oneshot instead of the default simple type should be okay. I didn't see any issues when I tested setting the type. I also checked the other service files that have timers on my system, and each of those have this type set so I will add this for the next release. When it is released into unstable, this bug will close. -- Lance Lin GPG Fingerprint: 4A31 DB5A 1EE4 096C 8739 9880 9036 4929 4C33 F9B7 OpenPGP_0x903649294C33F9B7.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature
Bug#1125004: Type=oneshot lost for anacron.service ?
Package: anacron Version: 2.3-36 Aparently all systemd services to be triggered by a timer have set [Service] Type=oneshot except for anacron. Is this on purpose? Reason for asking is, Zabbix complains about anacron.service to be not running, because the oneshot is missing. Would be nice if this can be fixed. Thank you Harri

