avahi-daemon can fail to restart due to stale /run/avahi-daemon/pid

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Vagrant Cascadian
Owner
unassigned
Submitted by
Ludovic Courtès
Severity
important
Merged with
L
L
Ludovic Courtès wrote on 16 Aug 15:32 +0200
(address . bug-guix@gnu.org)
877ccg8ufm.fsf@inria.fr
The ‘avahi-daemon’ service fails to restart these days: a stale
/run/avahi-daemon/pid upon reboot leads it to abandon. From
/var/log/messages:

Toggle snippet (11 lines)
Aug 16 13:29:11 localhost shepherd[1]: Starting service avahi-daemon...
Aug 16 13:29:11 localhost shepherd[1]: Service avahi-daemon has been started.
Aug 16 13:29:11 localhost shepherd[1]: Service avahi-daemon started.
Aug 16 13:29:11 localhost shepherd[1]: Service avahi-daemon running with value (("unknown" . #<input-output: socket 27>)).
Aug 16 13:29:11 localhost shepherd[1]: Spawning systemd-style service /gnu/store/yfl1x5k3njghkg4ckximqb0ysppvx8na-avahi-0.8/sbin/avahi-daemon.
Aug 16 13:29:11 localhost shepherd[1]: Running value of service avahi-daemon changed to 1497.
Aug 16 13:29:11 localhost shepherd[1]: Service avahi-daemon (PID 1497) exited with 255.
Aug 16 13:29:11 localhost shepherd[1]: Service avahi-daemon has been disabled.
Aug 16 13:29:11 localhost shepherd[1]: (Respawning too fast.)

… and /var/log/avahi-daemon.log:

Toggle snippet (9 lines)
2024-08-16 13:29:11 Daemon already running on PID 1346
2024-08-16 13:29:11 Daemon already running on PID 1346
2024-08-16 13:29:11 Daemon already running on PID 1346
2024-08-16 13:29:11 Daemon already running on PID 1346
2024-08-16 13:29:11 Daemon already running on PID 1346
2024-08-16 13:29:11 Daemon already running on PID 1346
2024-08-16 13:29:11 Daemon already running on PID 1346

The issue was uncovered by the switch to socket activation in commit
3298ec0200af0d0b0850a388df0a78e87320307f: despite using socket
activation, avahi-daemon checks for the presence of a PID file; however,
there’s no longer a cleanup process as is the case when #:log-file is
used, hence the bug.

But the core problem seems to be that ‘cleanup-service-type’ deletes
/var/run at boot but not /run. I guess it should delete /run as well?

Ludo’.
L
L
Ludovic Courtès wrote on 18 Aug 22:47 +0200
(address . 72670@debbugs.gnu.org)
87sev14kyb.fsf@gnu.org
Ludovic Courtès <ludo@gnu.org> skribis:

Toggle quote (3 lines)
> But the core problem seems to be that ‘cleanup-service-type’ deletes
> /var/run at boot but not /run. I guess it should delete /run as well?

Oh, it’s already filed here: https://issues.guix.gnu.org/64775
L
L
Ludovic Courtès wrote on 18 Aug 22:48 +0200
control message for bug #64775
(address . control@debbugs.gnu.org)
87r0al4kxk.fsf@gnu.org
merge 64775 72670
quit
L
L
Ludovic Courtès wrote on 18 Aug 22:48 +0200
(address . control@debbugs.gnu.org)
87plq54kxf.fsf@gnu.org
severity 64775 important
quit
V
V
Vagrant Cascadian wrote on 20 Sep 23:26 +0200
Re: [bug#72920] [PATCH 0/3] Clean out /run upon boot
8734lukoev.fsf@wireframe
On 2024-08-31, Ludovic Courtès wrote:
Toggle quote (5 lines)
> Ludovic Courtès (3):
> services: cleanup: Run under C.UTF-8 locale.
> services: cleanup: Create directories with the right mode upfront.
> services: cleanup: Delete /run upon boot.

As they say, Looks Good To Me. :)

live well,
vagrant
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZu3oaAAKCRDcUY/If5cW
qmR4AP0d/G8/mlAelJUR8hv4R4Bbpws/YhbEef9A0J7ret+shAD6ArNIowpg4bCH
6kLn33u7J+854xvPpJtWlj6PR2nCYwE=
=STTZ
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 25 Sep 16:26 +0200
(name . Vagrant Cascadian)(address . vagrant@debian.org)
8734lnu7we.fsf@gnu.org
Vagrant Cascadian <vagrant@debian.org> skribis:

Toggle quote (8 lines)
> On 2024-08-31, Ludovic Courtès wrote:
>> Ludovic Courtès (3):
>> services: cleanup: Run under C.UTF-8 locale.
>> services: cleanup: Create directories with the right mode upfront.
>> services: cleanup: Delete /run upon boot.
>
> As they say, Looks Good To Me. :)

Thanks, pushed as c250033aa69f35e64949a87fd8482b253dd416b4, except for
the first one because I remembered that C.UTF-8 is unavailable in
cross-compiled programs.

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 72670@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 72670
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch