Bug 8924

Summary: Race condition in OpkgIndexer.write_index()
Product: [Build System, Metadata & Runtime] OE-Core Reporter: ulfalizer
Component: deploymentAssignee: Mariano Lopez <mariano.lopez>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: leonardo.sandoval.gonzalez
Version: 2.1   
Target Milestone: 2.1 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description ulfalizer 2016-01-14 10:51:40 UTC
There is a potential race condition in OpkgIndexer.write_index() (in package_manager.py). When e.g. "all" appears twice in ALL_MULTILIB_PACKAGE_ARCHS/SDK_PACKAGE_ARCHS/MULTILIB_ARCHS, then two opkg-make-index instances will be run in parallel on tmp/deploy/ipk/all/Packages. This is probably what causes https://www.mail-archive.com/yocto@yoctoproject.org/msg22808.html, and we are seeing the same error sporadically.

A simple fix would be to e.g. turn index_cmds into a set().
Comment 1 Mariano Lopez 2016-03-10 23:08:04 UTC
Thanks for the solution! I have tested this with rpm and deb and those packaging methods doesn't have this problem.
Comment 2 Mariano Lopez 2016-03-11 15:38:49 UTC
Sent patch to the mailing list:

http://lists.openembedded.org/pipermail/openembedded-core/2016-March/118859.html
Comment 3 Mariano Lopez 2016-03-16 17:13:24 UTC
This has been solved in commit:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=36bf66654a557c570011db0b06f2084ee2ccf9cc