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

Richard Purdie richard.purdie at linuxfoundation.org
Fri Jan 25 14:10:46 UTC 2019


On Fri, 2019-01-25 at 14:44 +0100, Ming Liu wrote:
> Hi, Richard:
> 
> Involve in Mark.
> 
> Please correct me if I am wrong, but according to the code, seems
> these upper level locks could not protect this race condition,
> because it's inside the GitSM unpack function, the call chain is:
> 
> Inside GitSM:
> ```
> def unpack
>   -> for module in submodules:
>        -> unpack_submodules 
>             -> runfetchcmd
>                  -> bb.process.run
>                       -> git config submodule
> ```
> 
> since 'git config submodule' run concurrently and try to modify a
> same git config file, hence the race might happen, but it's hard to
> be reproduced since 'git config submodule' finishes quite quickly.

for that git config call, workdir=ud.destdir so its not in any shared
location like DL_DIR but in a recipe's workdir?

Cheers,

Richard



More information about the bitbake-devel mailing list