]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/journal/journald-native.c
journal: normalize priority of logging sources 2290/head
authorVito Caputo <vito.caputo@coreos.com>
Fri, 8 Jan 2016 20:11:44 +0000 (12:11 -0800)
committerVito Caputo <vito.caputo@coreos.com>
Fri, 8 Jan 2016 22:00:04 +0000 (14:00 -0800)
commit48cef29504b1ffc0df9929f2d8b2af2ad74d2b4a
tree386f0cd38fff3ed8723701265a29b66cecfe6548
parentcf6c8c46fceac83dfb3f2d55fae5220e60841553
journal: normalize priority of logging sources

The stream event source has a priority of SD_EVENT_PRIORITY_NORMAL+5,
and stdout source +10, but the native and syslog event sources are left
at the default of 0.

As a result, any heavy native or syslog logger can cause starvation of
the other loggers.  This is trivially demonstrated by running:

 dd if=/dev/urandom bs=8k | od | systemd-cat & # native spammer
 systemd-run echo hello & # stream logger
 journalctl --follow --output=verbose --no-pager --identifier=echo &

... and wait, and wait, the "hello" never comes.

Now kill %1, "hello" arrives finally.
src/journal/journald-native.c
src/journal/journald-stream.c
src/journal/journald-syslog.c