You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
orlyi freezes silently when the system log daemon stops reading /dev/log #641
orlyi freezes completely, and silently, if the system log daemon stops reading /dev/log.
Mechanism.
Every log line goes through glibc's syslog().
glibc holds one process-wide lock across both the stderr echo (LOG_PERROR, which --le turns on) and a blocking sendto() on the /dev/log socket.
If journald (or rsyslog) stalls, the socket's queue fills. The thread inside syslog() prints its line to stderr, then blocks in sendto.
Every other thread that logs then blocks on the lock without printing. The server stops serving and stops logging at the same moment, so the log looks like a clean hang with no cause.
Reproduced on an ubuntu-24.04-arm runner (probe run 37392296481):
Why it matters outside tests. A stalled log daemon is uncommon but real: journald under memory pressure, a full disk, or a slow log forwarder. Today that turns into a full server outage with no log line saying why. Inside containers it rarely applies, because the image has no /dev/log listener and syslog() then just drops the send. That's worth checking.
Options (a design decision, so not done yet):
A logging backend that never blocks: send to /dev/log with MSG_DONTWAIT, drop the line when the socket is full, count drops, and report the count on the reporting port. stderr keeps every line.
A stderr-only mode (no /dev/log) as a flag, used by the test fixtures and the container image; keep syslog() as it is otherwise.
Both: 2 now, 1 later.
How to recognise it next time: a thread in unix_wait_for_peer / sendto in a hang dump (the #565/#575 dumps capture wchan and the syscall line).
Activity