cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
kevinkit
Observer
Observer
659 Views
Registered: ‎08-10-2020

petalinux build fails with ENOSPC despite having enough space

I am trying to build my petalinux for a zcu106, however sometimes I get this error message:

ERROR: No space left on device or exceeds fs.inotify.max_user_watches?
ERROR: To check max_user_watches: sysctl -n fs.inotify.max_user_watches.
ERROR: To modify max_user_watches: sysctl -n -w fs.inotify.max_user_watches=<value>.
ERROR: Root privilege is required to modify max_user_watches.
ERROR: Command execution failed: Traceback (most recent call last):
  File "/home/XXXX/xilinx-zcu106-2020.1/components/yocto/layers/core/bitbake/lib/bb/command.py", line 103, in runAsyncCommand
    self.cooker.updateCache()
  File "/home/XXXX/xilinx-zcu106-2020.1/components/yocto/layers/core/bitbake/lib/bb/cooker.py", line 1564, in updateCache
    self.add_filewatch([[dirent]], dirs=True)
  File "/home/XXXX/petalinux_single_dpu/xilinx-zcu106-2020.1/components/yocto/layers/core/bitbake/lib/bb/cooker.py", line 295, in add_filewatch
    watcher.add_watch(f, self.watchmask, quiet=False)
  File "/home/XXXX/petalinux_single_dpu/xilinx-zcu106-2020.1/components/yocto/layers/core/bitbake/lib/pyinotify.py", line 1908, in add_watch
    raise WatchManagerError(err, ret_)
pyinotify.WatchManagerError: add_watch: cannot watch /home/XXXX/petalinux_single_dpu/xilinx-zcu106-2020.1/components/yocto/layers/core/meta/recipes-devtools/cdrtools WD=-1, Errno=No space left on device (ENOSPC)

 Most of the time this happens after I had an error and the build process failed due to other circumstances, and most of the time a reboot will fix the problem. However, sometimes it does not help and I have to create a whole new project to make it work again.

Greetings,

Kevin

0 Kudos
3 Replies
ksloatdesignlinx
Explorer
Explorer
628 Views
Registered: ‎02-24-2020

I have had this happen on my machine too. I fix it by simply increasing the amount of watches like it says in the error there:

sudo sysctl -n -w fs.inotify.max_user_watches=<new-value>

 

Ken Sloat - Embedded Software Engineer
https://www.designlinxhs.com
kevinkit
Observer
Observer
626 Views
Registered: ‎08-10-2020

Oh wow, I just decreased the value thinking it was like something that has to be small. What is that value anyways?

0 Kudos
ksloatdesignlinx
Explorer
Explorer
623 Views
Registered: ‎02-24-2020

It appears to be some kind of notification mechanism that is used to determine when files are accessed:

https://daverupert.com/2019/07/a-lament-for-max-user-watches/

I never dug into it too much, I simply increase the value if I ever see the error.

Ken Sloat - Embedded Software Engineer
https://www.designlinxhs.com