Bug 12765

Summary: Race condition do_package_write_ipk fails due to empty package-split dir.
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Hains <hainsvdbosch>
Component: coreAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: betacentauri, meta.mr.watcher, meta.watcher, openatv, richard.purdie
Version: unspecified   
Target Milestone: 2.6 M1   
Hardware: Other   
OS: mips   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Hains 2018-06-01 14:49:23 UTC
Introduced with commit:
http://cgit.openembedded.org/openembedded-core/commit/?id=f04e6bd144deb0c8fe2742f66b18904b6619a502


ERROR: enigma2-plugin-systemplugins-autobouquetsmaker-2.1+gitAUTOINC+5ceda844ba-r2 do_package_write_ipk:
Error executing a python function in exec_python_func() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
     0001:
 *** 0002:do_package_ipk(d)
     0003:
File: '/home/hains/openpli-dm8000-oe-core/openembedded-core/meta/classes/package_ipk.bbclass', lineno: 87, function: do_package_ipk
     0083:
     0084:    os.chdir(oldcwd)
     0085:
     0086:    if error:
 *** 0087:        raise error
     0088:}
     0089:do_package_ipk[vardeps] += "ipk_write_pkg"
     0090:do_package_ipk[vardepsexclude] = "BB_NUMBER_THREADS"
     0091:
Exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/hains/openpli-dm8000-oe-core/build/tmp/work/dm8000-oe-linux/
enigma2-plugin-systemplugins-autobouquetsmaker/2.1+gitAUTOINC+5ceda844ba-r2/packages-split/enigma2-plugin-systemplugins-autobouquetsmaker'

ERROR: enigma2-plugin-systemplugins-autobouquetsmaker-2.1+gitAUTOINC+5ceda844ba-r2 do_package_write_ipk: Function failed: do_package_ipk
ERROR: Logfile of failure stored in: /home/hains/openpli-dm8000-oe-core/build/tmp/work/dm8000-oe-linux/enigma2-plugin-systemplugins-autobouquetsmaker/
2.1+gitAUTOINC+5ceda844ba-r2/temp/log.do_package_write_ipk.20920
ERROR: Task (/home/hains/openpli-dm8000-oe-core/meta-openpli/recipes-openpli/e2openplugins/enigma2-plugin-systemplugins-autobouquetsmaker.bb:do_package_write_ipk)
failed with exit code '1'


This occurs with a lot more packages (allarch/machine arch).
packages-split directory does exist but it's empty when this error occur.
I noticed this happens with relative small packages only.
How smaller the package, the greater the chance this race condition occurs.

To fix this temporarily to finish build:
bitbake -c cleanall <package name>
and run build again.

Using latest bitbake, meta-openembedded and openembedded-core master branch.
Comment 1 Hains 2018-06-04 12:14:41 UTC
For test to fix race condition, i moved '*do_package|*do_package.*|*do_package_setscene.*)'
to the top of the loop.
So it's before the '*_setscene*)' now, as it was in the old situation before commit:
http://cgit.openembedded.org/openembedded-core/commit/?id=f04e6bd144deb0c8fe2742f66b18904b6619a502

I rebuild some packages by bumping PR in recipe and create new git commits in test repo and it's seems OK now so far.
Comment 3 Hains 2018-06-21 10:48:01 UTC
Tested and OK now.
Thanks.
Comment 4 betacentauri 2018-06-24 09:28:55 UTC
Can you merge that into sumo branch?