Bug 8924 - Race condition in OpkgIndexer.write_index()
Summary: Race condition in OpkgIndexer.write_index()
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: deployment (show other bugs)
Version: 2.1
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.1 M4
Assignee: Mariano Lopez
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-01-14 10:51 UTC by ulfalizer
Modified: 2016-03-16 17:13 UTC (History)
1 user (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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