<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Good morning everyone,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Has anyone here any idea how one can prevent the blocking situation.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Some observations:<o:p></o:p></p>
<p class="MsoNormal">- 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<o:p></o:p></p>
<p class="MsoNormal">- I doubt that the underlying socket buffer is full<o:p></o:p></p>
<p class="MsoNormal">- The call is blocked by the kernel syscall send() that is invoked by the syslog() call<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thx in advance for any hints …<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Best regards</span><span style="font-size:8.0pt;font-family:"Times New Roman","serif""><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt;text-autospace:none"><b><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Marko Hoyer</span></b><span style="font-size:8.0pt;font-family:"Times New Roman","serif""><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:5.0pt;text-autospace:none"><b><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue">A</span></b><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">dvanced
<b><span style="color:blue">D</span></b>river <b><span style="color:blue">I</span></b>nformation
<b><span style="color:blue">T</span></b>echnology GmbH</span><span style="font-size:8.0pt;font-family:"Arial","sans-serif""><br>
</span><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Software Group II (ADITG/SW2)</span><span style="font-size:8.0pt;font-family:"Arial","sans-serif"">
<br>
</span><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Robert-Bosch-Str. 200</span><span style="font-size:8.0pt;font-family:"Arial","sans-serif""><br>
</span><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">31139 Hildesheim</span><span style="font-size:8.0pt;font-family:"Arial","sans-serif""><br>
</span><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Germany</span><span style="font-size:8.0pt;font-family:"Arial","sans-serif""><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt;text-autospace:none"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Tel. +49 5121 49 6948<br>
Fax +49 5121 49 6999<br>
mhoyer@de.adit-jv.com</span><span style="font-size:8.0pt;font-family:"Times New Roman","serif""><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Arial","sans-serif"">ADIT is a joint venture company of Robert Bosch GmbH/Robert Bosch Car Multimedia GmbH and DENSO Corporation<br>
Sitz: Hildesheim, Registergericht: Amtsgericht Hildesheim HRB 3438  <br>
Geschäftsführung: Wilhelm Grabow, Katsuyoshi Maeda</span><o:p></o:p></p>
</div>
</body>
</html>