[systemd-devel] /dev/log tends to block on socket based activation ...

Hoyer, Marko (ADITG/SW2) mhoyer at de.adit-jv.com
Tue Aug 5 23:36:01 PDT 2014


Good morning everyone,

I'm playing around a bit with systemd's socket based activation of systemd-journald. My intention is to shift back in time the actual startup of systemd-journald.service to save resources (CPU) for early applications during startup. The respective socket is activated as usual to not lose any early (sys)logs. The actual startup of the service is delayed by adding some dependencies to targets (basic.target for instance).

In principal, the idea is working as expected but sometimes the logging via syslog("..") blocks applications until the daemon is actually started. Depending on how the startup of such application is integrated into the startup configuration, this might lead to deadlock situations.

Has anyone here any idea how one can prevent the blocking situation.

Some observations:
- The blocking situation is not happening on each syslog call, sometimes this happens after one call, sometimes after a few calls. I wasn't able by now isolating the concrete case that leads to a blocking socket
- I doubt that the underlying socket buffer is full
- The call is blocked by the kernel syscall send() that is invoked by the syslog() call

Thx in advance for any hints ...


Best regards

Marko Hoyer
Advanced Driver Information Technology GmbH
Software Group II (ADITG/SW2)
Robert-Bosch-Str. 200
31139 Hildesheim
Germany
Tel. +49 5121 49 6948
Fax +49 5121 49 6999
mhoyer at de.adit-jv.com
ADIT is a joint venture company of Robert Bosch GmbH/Robert Bosch Car Multimedia GmbH and DENSO Corporation
Sitz: Hildesheim, Registergericht: Amtsgericht Hildesheim HRB 3438
Geschäftsführung: Wilhelm Grabow, Katsuyoshi Maeda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20140806/436fd2a8/attachment.html>


More information about the systemd-devel mailing list