Bug 14441

Summary: possible DL_DIR cloning race condition
Product: [Build System, Metadata & Runtime] BitBake Reporter: Alexandre Belloni <alexandre.belloni>
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: poky.bs.watcher, poky.watcher, randy.macleod
Version: unspecified   
Target Milestone: 3.4 M4   
Hardware: x86   
OS: Multiple   
Whiteboard: AB-INT AB-INT-TMPFS
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Alexandre Belloni 2021-06-17 14:01:12 UTC
https://autobuilder.yoctoproject.org/typhoon/#/builders/23/builds/3797/steps/13/logs/stdio

ERROR: linux-yocto-5.10.41+gitAUTOINC+48a13749dc_33069919e2-r0 do_unpack: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export ftp_proxy="http://proxy.yocto.io:5187/"; export FTP_PROXY="http://proxy.yocto.io:5187/"; export PATH="/home/pokybuild/yocto-worker/build-appliance/build/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/pokybuild/yocto-worker/build-appliance/build/scripts:/home/pokybuild/yocto-worker/build-appliance/build/build/tmp/work/qemux86_64-poky-linux/linux-yocto/5.10.41+gitAUTOINC+48a13749dc_33069919e2-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux:/home/pokybuild/yocto-worker/build-appliance/build/build/tmp/work/qemux86_64-poky-linux/linux-yocto/5.10.41+gitAUTOINC+48a13749dc_33069919e2-r0/recipe-sysroot/usr/bin/crossscripts:/home/pokybuild/yocto-worker/build-appliance/build/build/tmp/work/qemux86_64-poky-linux/linux-yocto/5.10.41+gitAUTOINC+48a13749dc_33069919e2-r0/recipe-sysroot-native/usr/sbin:/home/pokybuild/yocto-worker/build-appliance/build/build/tmp/work/qemux86_64-poky-linux/linux-yocto/5.10.41+gitAUTOINC+48a13749dc_33069919e2-r0/recipe-sysroot-native/usr/bin:/home/pokybuild/yocto-worker/build-appliance/build/build/tmp/work/qemux86_64-poky-linux/linux-yocto/5.10.41+gitAUTOINC+48a13749dc_33069919e2-r0/recipe-sysroot-native/sbin:/home/pokybuild/yocto-worker/build-appliance/build/build/tmp/work/qemux86_64-poky-linux/linux-yocto/5.10.41+gitAUTOINC+48a13749dc_33069919e2-r0/recipe-sysroot-native/bin:/home/pokybuild/yocto-worker/build-appliance/build/bitbake/bin:/home/pokybuild/yocto-worker/build-appliance/build/build/tmp/hosttools"; export HOME="/home/pokybuild"; git -c core.fsyncobjectfiles=0 clone -n -s /home/pokybuild/yocto-worker/build-appliance/build/build/downloads/git2/git.yoctoproject.org.linux-yocto.git/ /home/pokybuild/yocto-worker/build-appliance/build/build/tmp/work/qemux86_64-poky-linux/linux-yocto/5.10.41+gitAUTOINC+48a13749dc_33069919e2-r0/git/ failed with exit code 128, output:
Cloning into '/home/pokybuild/yocto-worker/build-appliance/build/build/tmp/work/qemux86_64-poky-linux/linux-yocto/5.10.41+gitAUTOINC+48a13749dc_33069919e2-r0/git'...
error: refs/heads/master does not point to a valid object!
error: refs/heads/master-4.19 does not point to a valid object!
error: refs/heads/v4.14/base does not point to a valid object!
error: refs/heads/v4.15/standard/arm-versatile-926ejs does not point to a valid object!
error: refs/heads/v4.15/standard/base does not point to a valid object!
Comment 1 Randy MacLeod 2021-06-17 14:52:48 UTC
Audit the nfs locking.
Comment 2 Richard Purdie 2021-07-07 12:19:37 UTC
It can't be NFS since build-appliance does local fetches and the paths in question are local to the build directory. It will not reference git repos via the file:// urls either.

To result in corruption like this I'm wondering if there was a race over creation of the mirror tarballs and a truncated mirror tarball was accessed.

The creation of the git mirror tarballs in git.py uses tar directly on the file and could mv the file into position after creation to avoid races.
Comment 3 Richard Purdie 2021-09-16 14:26:16 UTC
I plan to fix the mirror tarball race and then see if this recurs
Comment 4 Richard Purdie 2021-09-20 15:36:26 UTC
Fix in http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=626e949292a4d21cc828fcc6c8d5f62a93622f61 and we can reopen or file a new bug if the issue recurs.
Comment 5 Randy MacLeod 2021-10-28 14:58:13 UTC
*** Bug 14516 has been marked as a duplicate of this bug. ***