Hello Lance,
On Fri, Sep 30, 2022 at 05:10:01PM +0200, Helge Kreutzmann wrote:
> On Fri, Sep 30, 2022 at 12:53:09PM +0000, Lance Lin wrote:
> > Thank you for your help in tracking this down. I apologize that the -35 
> > revision didn't fix it.
> > 
> > > So the check in the cron file is wrong! It should be
> > > if [ -d /run/systemd/system ]; then …
> > > 
> > 
> > > Is this the solution? Or is there a downside in changing this? And I
> > > definitely did not configure this manually. And if I log at old log
> > > entries (when anacron was still working fine), the call is the same:
> > > Jul 16 20:30:01 twentytwo CRON[15482]: (root) CMD ([ -x 
> > > /etc/init.d/anacron ] && if [ ! -d /run/systemd/system ]; then 
> > > /usr/sbin/invoke-rc.d anacron start >/dev/null; fi)
> > 
> > It could be. I have not changed d/cron.d at all. The only changes I made 
> > were to the service file (d/anacron.service) and that 
> > 
> > was after input from another user saying the timeout 
> > (TimeoutStopSec=infinity). Perhaps this caused the problem? Maybe this is 
> > something
> > we could both test (e.g. deleting this line)? The user said the change was 
> > just strictly better and suited their needs as well as the typical 
> > functionality.
> > See Bug#915379. 
> 
> I just deleted this line in /usr/lib/systemd/system/anacron.service
> and then run
> systemctl restart anacron
> (Hope this is right)
> 
> > If anacron was working before, this is now the only change since -32. If 
> > this breaks anacron, I am happy to remove the TimeoutStopSec line.
> 
> I'll report the outcome.

I made two reboots today, but the stamp file did not get updated. So
no need to revert the change from #915379.

So it might be some coincidental change, but where? Systemd?

> P.S. Is there some explanation about the check of 
>      "! -d /run/systemd/system"
>      ?

This is obviously not working. So I checked on a stable system, which
has seen many upgrades over the years. There this directory also
exists, anacron runs, but:

In the logs, I see 
… anacron.service: Suceeded
and 
… Started Trigger anacron every hour

I now checked old logs, and there I also see the messages about the
triggers.

So somehow the trigger is no longer executed. 

The anacron config files are the same as on my stable system (after
the above change).

# systemctl status timers.target
• timers.target - Timer Units
     Loaded: loaded (/lib/systemd/system/timers.target; static)
     Active: active since Sat 2022-10-01 09:14:51 CEST; 4h 57min ago
      Until: Sat 2022-10-01 09:14:51 CEST; 4h 57min ago
       Docs: man:systemd.special(7)

Okt 01 09:14:51 twentytwo systemd[1]: Reached target Timer Units.

So timers should be there.

I see this in the logs until 2022-09-05.

According to /var/log/apt/history.log, the following packages were updated then:
Upgrade: josm-l10n:amd64 (0.0.svn18531+dfsg-1, 0.0.svn18543+dfsg-1), josm:amd64 
(0.0.svn18531+dfsg-1, 0.0.svn18543+dfsg-1), node-write-file-atomic:amd64 
(4.0.1+~4.0.0-2, 4.0.2+~4.0.0-1), libsoup-3.0-0:amd64 (3.1.3-2, 3.1.4-1), 
bash:amd64 (5.1-6.1+b1, 5.2~rc2-2), anacron:amd64 (2.3-33, 2.3-34), 
libsoup-3.0-common:amd64 (3.1.3-2, 3.1.4-1)

All the other packages look unrelated. 

So I now remove anacron, and install 2.3-33.

dpkg -i anacron_2.3-33_amd64.deb
Vormals nicht ausgewähltes Paket anacron wird gewählt.
(Lese Datenbank ... 775863 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von anacron_2.3-33_amd64.deb ...
Entpacken von anacron (2.3-33) ...
anacron (2.3-33) wird eingerichtet ...
anacron.service is a disabled or a static unit not running, not starting it.
anacron.timer is a disabled or a static unit not running, not starting it.
Trigger für man-db (2.10.2-3) werden verarbeitet ...

And indeed:
root@twentytwo:/var/log# systemctl status anacron.service
◈ anacron.service - Run anacron jobs
     Loaded: loaded (/lib/systemd/system/anacron.service; disabled; preset: 
enabled)
     Active: inactive (dead)
       Docs: man:anacron
             man:anacrontab
root@twentytwo:/var/log# systemctl status anacron.timer
◈ anacron.timer - Trigger anacron every hour
     Loaded: loaded (/lib/systemd/system/anacron.timer; disabled; preset: 
enabled)
     Active: inactive (dead)
    Trigger: n/a
   Triggers: • anacron.service


Do you have any idea what both anacron.service and anacron.timer are
disabled?

So somehow anacron -34 disabled both the service and the timer. 

Anything you want me to look at? 

Next step would be how to properly enable them again…

Thanks!

Greetings

              Helge
-- 
      Dr. Helge Kreutzmann                     deb...@helgefjell.de
           Dipl.-Phys.                   http://www.helgefjell.de/debian.php
        64bit GNU powered                     gpg signed mail preferred
           Help keep free software "libre": http://www.ffii.de/

Attachment: signature.asc
Description: PGP signature

Reply via email to