<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>14105</bug_id>
          
          <creation_ts>2020-10-22 16:04:15 +0000</creation_ts>
          <short_desc>Build fails during parse with pyinotify.WatchManagerError: add_watch: cannot watch /mnt/b/yoe/master/conf WD=-1</short_desc>
          <delta_ts>2020-10-29 17:32:36 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>oe-core other</component>
          <version>3.3</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Khem Raj">raj.khem</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>mhalstead</cc>
    
    <cc>richard.purdie</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>88477</commentid>
    <comment_count>0</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2020-10-22 16:04:15 +0000</bug_when>
    <thetext>I am seeing below error after a build and changing MACHINE to some other machine and trying another build. This error goes away if I delete tmp/ content then it works.

Traceback (most recent call last):
  File &quot;/mnt/b/yoe/master/sources/bitbake/bin/bitbake&quot;, line 35, in &lt;module&gt;
    sys.exit(bitbake_main(BitBakeConfigParameters(sys.argv),
  File &quot;/mnt/b/yoe/master/sources/bitbake/lib/bb/main.py&quot;, line 382, in bitbake_main
    return ui_module.main(server_connection.connection, server_connection.events,
  File &quot;/mnt/b/yoe/master/sources/bitbake/lib/bb/ui/knotty.py&quot;, line 396, in main
    params.updateToServer(server, os.environ.copy())
  File &quot;/mnt/b/yoe/master/sources/bitbake/lib/bb/cookerdata.py&quot;, line 75, in updateToServer
    raise Exception(&quot;Unable to update the server configuration with local parameters: %s&quot; % error)
Exception: Unable to update the server configuration with local parameters: Traceback (most recent call last):
  File &quot;/mnt/b/yoe/master/sources/bitbake/lib/bb/command.py&quot;, line 81, in runCommand
    result = command_method(self, commandline)
  File &quot;/mnt/b/yoe/master/sources/bitbake/lib/bb/command.py&quot;, line 277, in updateConfig
    command.cooker.updateConfigOpts(options, environment, cmdline)
  File &quot;/mnt/b/yoe/master/sources/bitbake/lib/bb/cooker.py&quot;, line 488, in updateConfigOpts
    self.reset()
  File &quot;/mnt/b/yoe/master/sources/bitbake/lib/bb/cooker.py&quot;, line 1699, in reset
    self.initConfigurationData()
  File &quot;/mnt/b/yoe/master/sources/bitbake/lib/bb/cooker.py&quot;, line 373, in initConfigurationData
    self.add_filewatch(mc.getVar(&quot;__base_depends&quot;, False), self.configwatcher)
  File &quot;/mnt/b/yoe/master/sources/bitbake/lib/bb/cooker.py&quot;, line 289, in add_filewatch
    watcher.add_watch(f, self.watchmask, quiet=False)
  File &quot;/mnt/b/yoe/master/sources/bitbake/lib/pyinotify.py&quot;, line 1908, in add_watch
    raise WatchManagerError(err, ret_)
pyinotify.WatchManagerError: add_watch: cannot watch /mnt/b/yoe/master/conf WD=-1, Errno=No space left on device (ENOSPC)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88503</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2020-10-27 12:46:01 +0000</bug_when>
    <thetext>Sounds like something is using up all the inotify watches. Why an existing build would do that, not sure, sounds like something is misconfigured. We really need a way to reproduce/debug it...

What was the inotify max watches on that machine?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88504</commentid>
    <comment_count>2</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2020-10-27 13:10:32 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; Sounds like something is using up all the inotify watches. Why an existing
&gt; build would do that, not sure, sounds like something is misconfigured. We
&gt; really need a way to reproduce/debug it...
&gt; 
&gt; What was the inotify max watches on that machine?

% cat /proc/sys/fs/inotify/max_user_instances
1024

whenever it happens, its usually after/during when I build eSDK</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88505</commentid>
    <comment_count>3</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2020-10-27 13:11:37 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; Sounds like something is using up all the inotify watches. Why an existing
&gt; build would do that, not sure, sounds like something is misconfigured. We
&gt; really need a way to reproduce/debug it...
&gt; 
&gt; What was the inotify max watches on that machine?

and this sdk is big. Around 3GB compressed, with Clang and gcc based toolchains in it and all debug/dev packages added</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88506</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2020-10-27 16:48:29 +0000</bug_when>
    <thetext>Have you tried increasing max_user_instances ?

eSDK involves running bitbake within bitbake which may be the issue, two sets of inotify watches on all the metadata (for memres and cache invalidation) could eat through 1024 quickly. I know we increase this on the autobuilder workers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88507</commentid>
    <comment_count>5</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2020-10-27 17:02:50 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; Have you tried increasing max_user_instances ?
&gt; 
&gt; eSDK involves running bitbake within bitbake which may be the issue, two
&gt; sets of inotify watches on all the metadata (for memres and cache
&gt; invalidation) could eat through 1024 quickly. I know we increase this on the
&gt; autobuilder workers.

These are distro defaults. What was it changed to on AB. I think these should be documented somewhere for community as well, perhaps How Do I sections in wiki.

OK I will try this out and see if this helps. What is a good value ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88508</commentid>
    <comment_count>6</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2020-10-28 04:51:46 +0000</bug_when>
    <thetext>Michael: Do we have this documented for the autobuilder setup somewhere?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88514</commentid>
    <comment_count>7</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2020-10-29 12:28:01 +0000</bug_when>
    <thetext>OK I ran into this issue again today. So the situation was

bitbake &lt;imabe&gt; -cpopulate_sdk_ext - Went fine

publish the eSDK on same system - Went fine

but then installing the SDK on same system runs into this error

So I changed 

$ sudo sysctl -w fs.inotify.max_user_instances=4098
$ sudo sysctl -w fs.inotify.max_user_watches=24576

and it did not help.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88516</commentid>
    <comment_count>8</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2020-10-29 17:32:36 +0000</bug_when>
    <thetext>
% sudo sysctl -n -w fs.inotify.max_user_watches=1048576

helped</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>