[bitbake-devel] [PATCH] fetch2/gitsm: fix config file concurrent update race

Richard Purdie richard.purdie at linuxfoundation.org
Fri Jan 25 11:18:12 UTC 2019


On Fri, 2019-01-25 at 11:57 +0100, liu.ming50 at gmail.com wrote:
> From: Ming Liu <liu.ming50 at gmail.com>
> 
> A following issue was observed with gitsm:
> > git -c core.fsyncobjectfiles=0 config submodule... failed with exit code 255, output:
> > error: could not lock config file config: File exists
> 
> Since all git submodules share a config file and Git creates a lock
> file (.git/config.lock) to synchronize access to it, but Git only tries
> exactly once and returns a error if it's already locked. This leads to
> a race condition if there are many 'git config submodule' run in
> different processes.
> 
> It could be fixed by introducing a bitbake file lock to protect config
> file from concurrent update from submodules.
> 
> Reported-by: Stefan Agner <stefan.agner at toradex.com>
> Signed-off-by: Ming Liu <liu.ming50 at gmail.com>
> ---
>  lib/bb/fetch2/gitsm.py | 19 +++++++++++++++----
>  1 file changed, 15 insertions(+), 4 deletions(-)

This issue should already have been fixed with recent changes to the
gitsm fetcher. Could you confirm which version of the code you were
seeing this problem with?

Cheers,

Richard



More information about the bitbake-devel mailing list