Bug 56407

Summary: Service that fails to start gets stuck in respawn loop, spamming logs
Product: systemd Reporter: Evan Martin <martine>
Component: generalAssignee: systemd-bugs
Status: RESOLVED FIXED QA Contact: systemd-bugs
Severity: normal    
Priority: medium CC: fred
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Evan Martin 2012-10-25 18:19:42 UTC
systemd 194-4 on Arch.

I screwed up my /etc/groups by accidentally deleting the 'avahi' group, so the avahi daemon was failing to start.  My fault.

The bug is that systemd got into a tight loop of failing to start, spamming the logs.

Oct 25 09:31:31 kitten avahi-daemon[297]: Failed to find group 'avahi'.
Oct 25 09:32:19 kitten systemd[1]: avahi-daemon.service: main process exite...55
Oct 25 09:32:19 kitten systemd[1]: Unit avahi-daemon.service entered failed...e.
Oct 25 10:54:33 kitten avahi-daemon[470]: Failed to find group 'avahi'.
Oct 25 10:54:33 kitten systemd[1]: avahi-daemon.service: main process exite...55
Oct 25 10:54:33 kitten systemd[1]: Unit avahi-daemon.service entered failed...e.
Oct 25 10:54:33 kitten avahi-daemon[472]: Failed to find group 'avahi'.
Oct 25 10:54:33 kitten systemd[1]: avahi-daemon.service: main process exite...55
Oct 25 10:54:33 kitten systemd[1]: Unit avahi-daemon.service entered failed...e.
Oct 25 10:54:33 kitten avahi-daemon[474]: Failed to find group 'avahi'.
Oct 25 10:54:33 kitten systemd[1]: avahi-daemon.service: main process exite...55
Oct 25 10:54:33 kitten systemd[1]: Unit avahi-daemon.service entered failed...e.
Oct 25 10:54:33 kitten avahi-daemon[476]: Failed to find group 'avahi'.
Oct 25 10:54:33 kitten systemd[1]: avahi-daemon.service: main process exite...55
Oct 25 10:54:33 kitten systemd[1]: Unit avahi-daemon.service entered failed...e.
Oct 25 10:54:34 kitten avahi-daemon[478]: Failed to find group 'avahi'.
Oct 25 10:54:34 kitten systemd[1]: avahi-daemon.service: main process exite...55
Oct 25 10:54:34 kitten systemd[1]: Unit avahi-daemon.service entered failed...e.
Oct 25 10:54:34 kitten avahi-daemon[480]: Failed to find group 'avahi'.
Oct 25 10:54:34 kitten systemd[1]: avahi-daemon.service: main process exite...55
Oct 25 10:54:34 kitten systemd[1]: Unit avahi-daemon.service entered failed...e.

The last line repeats continually, with a ton of output, hundreds of lines per second.

$ journalctl -b | grep avahi | wc -l
52539

I'm not sure it's related (perhaps the journal reserves space before filling it in) but I upgraded my system to systemd only yesterday and my /var/log/journal is already 520mb:

$ du -sh /var/log/journal/
520M	/var/log/journal/
Comment 1 Frederic Crozat 2012-11-12 10:12:22 UTC
We just got hit by a similar issue on openSUSE Factory. This is due to avahi socket activation (avahi.socket) which is trying to activate avahi again and again, despite systemd deciding to not starting it.

When this occurs, the socket activation should probably go to FAIL mode.
Comment 2 Lennart Poettering 2013-04-04 01:13:25 UTC
This has been fixed a while back. The rate limiting on restarts was broken for a while.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.