All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Richard Purdie" <richard.purdie@linuxfoundation.org>
To: Jacob Kroon <jacob.kroon@gmail.com>,
	bitbake-devel@lists.openembedded.org
Subject: Re: [bitbake-devel] [PATCH] server/process: Fix a rare lockfile race
Date: Sun, 12 Jul 2020 14:14:35 +0100	[thread overview]
Message-ID: <c81353254ba925b0d1b11165cdd5df522e8e55b0.camel@linuxfoundation.org> (raw)
In-Reply-To: <fa3dd37a-0cf2-95ec-46e0-c7df69f211fa@gmail.com>

On Sun, 2020-07-12 at 14:05 +0200, Jacob Kroon wrote:
> On 7/12/20 12:55 PM, Richard Purdie wrote:
> > diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
> > index 83385baf60..b3a7f8b419 100644
> > --- a/lib/bb/server/process.py
> > +++ b/lib/bb/server/process.py
> > @@ -243,7 +243,6 @@ class ProcessServer(multiprocessing.Process):
> >                   lock = bb.utils.lockfile(lockfile, shared=False,
> > retry=False, block=True)
> >                   if lock:
> >                       # We hold the lock so we can remove the file
> > (hide stale pid data)
> > -                    bb.utils.remove(lockfile)
> >                       bb.utils.unlockfile(lock)
> >                       return
> >   
> 
> I'm no export on the bb lockfiles, but if this is correct we should 
> update the comment aswell.

I left the comment as its still right in that unlockfile does remove
the stale pid data potentially but I guess it could be tweaked to
better match the code...

Cheers,

Richard




      reply	other threads:[~2020-07-12 13:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-12 10:55 [PATCH] server/process: Fix a rare lockfile race Richard Purdie
2020-07-12 12:05 ` [bitbake-devel] " Jacob Kroon
2020-07-12 13:14   ` 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=c81353254ba925b0d1b11165cdd5df522e8e55b0.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=jacob.kroon@gmail.com \
    /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.