<div dir="ltr">Is <span style="font-size:12.8px">BB_DISKMON_DIRS enabled by default?</span><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Quick grep shows it only in local.conf.sample*:</span></div><div><div><span style="font-size:12.8px">meta/conf/local.conf.sample:BB_DISKMON_DIRS = &quot;\</span></div><div><span style="font-size:12.8px">meta/conf/local.conf.sample.extended:# inode is running low, it is enabled when BB_DISKMON_DIRS is set.</span></div><div><span style="font-size:12.8px">meta/conf/local.conf.sample.extended:#BB_DISKMON_DIRS = &quot;STOPTASKS,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K&quot;</span></div><div style="font-size:12.8px"><br></div></div><div style="font-size:12.8px">and my jenkins builds are very close to default oe-core nodistro config, so I don&#39;t think I have that enabled.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Maybe I should enable it, or maybe it should be enabled by default if we cannot fix this exception stream.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Thanks</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 27, 2017 at 10:08 AM, Patrick Ohly <span dir="ltr">&lt;<a href="mailto:patrick.ohly@intel.com" target="_blank">patrick.ohly@intel.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Thu, 2017-06-15 at 08:48 +0200, Martin Jansa wrote:<br>
&gt; This issue exists for very long time.<br>
&gt;<br>
&gt;<br>
&gt; I know that when the builder runs out of disk space there are multiple<br>
&gt; things which might go wrong (I&#39;ve seen bad archives on premirrors, bad<br>
&gt; sstate archives caused by this), so this issue isn&#39;t the main problem,<br>
&gt; but still would be nice to fail faster.<br>
&gt;<br>
&gt;<br>
&gt; In last build which was running for some 9 hours, it was first<br>
&gt; building for maybe 2 hours before it run out of disk space and this<br>
&gt; morning there is 50MB log just from bitbake output stored on the<br>
&gt; jenkins master. Repeating following message very quickly<br>
&gt;<br>
&gt;<br>
&gt; # grep -c &quot;Errno 28&quot; consoleText.txt<br>
&gt; 42986<br>
&gt;<br>
&gt;<br>
&gt; ERROR: Running command [[&#39;world&#39;], &#39;build&#39;]<br>
&gt; Traceback (most recent call last):<br>
&gt;   File &quot;/home/jenkins/oe/world/shr-<wbr>core/bitbake/lib/bb/event.py&quot;, line<br>
&gt; 211, in fire(event=&lt;bb.event.<wbr>HeartbeatEvent object at 0x7fcfed3e96a0&gt;,<br>
&gt; d=&lt;bb.data_smart.DataSmart object at 0x7fd00330b198&gt;):<br>
&gt;<br>
&gt;     &gt;    fire_class_handlers(event, d)<br>
&gt;          if worker_fire:<br>
&gt;   File &quot;/home/jenkins/oe/world/shr-<wbr>core/bitbake/lib/bb/event.py&quot;, line<br>
&gt; 134, in fire_class_handlers(event=&lt;bb.<wbr>event.HeartbeatEvent object at<br>
&gt; 0x7fcfed3e96a0&gt;, d=&lt;bb.data_smart.DataSmart object at<br>
&gt; 0x7fd00330b198&gt;):<br>
&gt;                          continue<br>
&gt;     &gt;            execute_handler(name, handler, event, d)<br>
&gt;<br>
&gt;   File &quot;/home/jenkins/oe/world/shr-<wbr>core/bitbake/lib/bb/event.py&quot;, line<br>
&gt; 106, in execute_handler(name=&#39;<wbr>runqueue_stats&#39;, handler=&lt;function<br>
&gt; runqueue_stats at 0x7fd0020c6158&gt;, event=&lt;bb.event.HeartbeatEvent<br>
&gt; object at 0x7fcfed3e96a0&gt;, d=&lt;bb.data_smart.DataSmart object at<br>
&gt; 0x7fd00330b198&gt;):<br>
&gt;          try:<br>
&gt;     &gt;        ret = handler(event)<br>
&gt;          except (bb.parse.SkipRecipe, bb.BBHandledException):<br>
&gt;   File<br>
&gt; &quot;/home/jenkins/oe/world/shr-<wbr>core/openembedded-core/meta/<wbr>classes/buildstats.bbclass&quot;, line 212, in runqueue_stats(e=&lt;bb.event.<wbr>HeartbeatEvent object at 0x7fcfed3e96a0&gt;):<br>
&gt;              done = isinstance(e, bb.event.BuildCompleted)<br>
&gt;     &gt;        system_stats.sample(e, force=done)<br>
&gt;              if done:<br>
&gt;   File<br>
&gt; &quot;/home/jenkins/oe/world/shr-<wbr>core/openembedded-core/meta/<wbr>lib/buildstats.py&quot;, line 148, in SystemStats.sample(event=&lt;bb.<wbr>event.HeartbeatEvent object at 0x7fcfed3e96a0&gt;, force=False):<br>
&gt;                                       data +<br>
&gt;     &gt;                                 b&#39;\n&#39;)<br>
&gt;                  self.last_proc = now<br>
&gt; OSError: [Errno 28] No space left on device<br>
&gt;<br>
&gt;<br>
&gt; It would be better to exit completely when something as bad as Errno<br>
&gt; 28 happens.<br>
<br>
</div></div>Do you have BB_DISKMON_DIRS active? Probably yes.<br>
<br>
The reason why it did not trigger here might be that the build ran out<br>
of disk space so quickly that the disk monitoring had no chance to<br>
detect the problem before system stat sampling itself started failing<br>
with the error above.<br>
<br>
System stat sampling and disk monitoring are hooking into the same<br>
event, so my theory is that once the system stat sampling fails, disk<br>
monitoring code no longer runs.<br>
<br>
I&#39;m not sure what exactly the right fix is: detect uncaught OSError like<br>
28 in the bitbake event loop and abort the build, and/or catch the error<br>
in buildstats.py and ignore it so that the normal disk monitoring can<br>
happen?<br>
<br>
I know how to do the latter, but not the former.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Best Regards, Patrick Ohly<br>
<br>
The content of this message is my personal opinion only and although<br>
I am an employee of Intel, the statements I make here in no way<br>
represent Intel&#39;s position on the issue, nor am I authorized to speak<br>
on behalf of Intel on this matter.<br>
<br>
<br>
<br>
</font></span></blockquote></div><br></div>