[bitbake-devel] [PATCH 1/2] cooker.py: Close lock file and watcher fds when end.
Richard Purdie
richard.purdie at linuxfoundation.org
Tue Jul 7 23:12:05 UTC 2015
On Fri, 2015-07-03 at 15:40 -0500, Aníbal Limón wrote:
> When run cooker inside loop it reaches OS max fd's causing
> an exception.
>
> Signed-off-by: Aníbal Limón <anibal.limon at linux.intel.com>
> ---
> lib/bb/cooker.py | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
> index f31bca6..abe8a52 100644
> --- a/lib/bb/cooker.py
> +++ b/lib/bb/cooker.py
> @@ -1432,6 +1432,9 @@ class BBCooker:
> if self.state in (state.shutdown, state.forceshutdown, state.error):
> if hasattr(self.parser, 'shutdown'):
> self.parser.shutdown(clean=False, force = True)
> + self.configwatcher.close()
> + self.watcher.close()
> + self.lock.close()
> raise bb.BBHandledException()
>
> if self.state != state.parsing:
Burying this cleanup into the updateCache function seems wrong. The
updateCache call as you use it in tinfoil highlights how odd that is.
We really need a better shutdown mechanism of cooker. It'll be more
invasive to the codebase but better in the long run I think...
Cheers,
Richard
More information about the bitbake-devel
mailing list