[OE-core] [PATCHv2 2/2] rpm: run binary package generation via thread pools

Alexander Kanavin alexander.kanavin at linux.intel.com
Fri Jun 9 11:18:43 UTC 2017


On 06/09/2017 12:02 PM, Alexander Kanavin wrote:
> Ah, now I get you. You are saying that if these functions are executed
> once at the start to pre-populate the static data, then they
> subsequently become thread-safe. Unfortunately this is not the case: I
> have no idea why this happens, as they would only read static data, but
> when I did that (in the first iteration of the patch which used nspr
> instead of openmp), there was a very rare, but still happening data
> corruption issue. There was no explicit first call, but the first
> package was built ahead of others (for other reasons, and it still is),
> and that's where the first call happened.

Actually, looking at code again, that may not be true - building a first 
package may not necessarily guarantee the pre-population of static data. 
See what I mean about code that is hard to reason about? It's best to 
get rid of static data altogether, even if it makes for a larger patch.


Alex



More information about the Openembedded-core mailing list