All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: "Aníbal Limón" <anibal.limon@linux.intel.com>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH 1/2] cooker.py: Close lock file and watcher fds when end.
Date: Wed, 08 Jul 2015 00:12:05 +0100	[thread overview]
Message-ID: <1436310725.27597.200.camel@linuxfoundation.org> (raw)
In-Reply-To: <1435956027-26996-1-git-send-email-anibal.limon@linux.intel.com>

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@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



      parent reply	other threads:[~2015-07-07 23:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-03 20:40 [PATCH 1/2] cooker.py: Close lock file and watcher fds when end Aníbal Limón
2015-07-03 20:40 ` [PATCH 2/2] tinfoil.py: Add shutdown method Aníbal Limón
2015-07-07 23:12 ` Richard Purdie [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1436310725.27597.200.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=anibal.limon@linux.intel.com \
    --cc=bitbake-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.