Bug 12664

Summary: glibc-binary-localedata packages may contain .tmp files
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Juro Bystricky <juro.bystricky>
Component: coreAssignee: Ross Burton <ross.burton>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: meta.mr.watcher, meta.watcher, randy.macleod, stephano
Version: 2.5   
Target Milestone: 2.8 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
diffoscope output comparing two builds.
none
another case of packing .tmp file
none
Experiment to expose the problem none

Description Juro Bystricky 2018-04-06 10:52:39 UTC
Created attachment 4259 [details]
diffoscope output comparing two builds.

Very rarely I run into a QA warning such as:
WARNING: glibc-locale-2.27-r0 do_package_qa: QA Issue: glibc-locale: /glibc-binary-localedata-el-gr/usr/lib/locale/el_GR/LC_PAPER.tmp is owned by uid 1000, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]

Although similar to (but possibly related to) :
https://bugzilla.yoctoproject.org/show_bug.cgi?id=11299

this is a different problem: any .tmp file should not be packaged at all.
Please see the attached diffoscope file.

Last time this happened was with:

Build Configuration:
BB_VERSION           = "1.37.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "ubuntu-16.04"
TARGET_SYS           = "x86_64-poky-linux"
MACHINE              = "qemux86-64"
DISTRO               = "poky"
DISTRO_VERSION       = "2.4+snapshot-20180406"
TUNE_FEATURES        = "m64 core2"
TARGET_FPU           = ""
meta                 
meta-poky            
meta-yocto-bsp       = "master:f44ab1fa66e2a3b418c73106306e761a98a25e73"

but it was observed prior to this as well.
Comment 1 Richard Purdie 2018-04-12 07:35:22 UTC
Add a test for .tmp files so it at least has a hard failure if this happens?
Comment 2 Juro Bystricky 2018-04-13 14:12:14 UTC
Created attachment 4267 [details]
another case of packing .tmp file
Comment 3 Ross Burton 2018-11-08 16:06:32 UTC
Created attachment 4386 [details]
Experiment to expose the problem

The hypothesis is that this is a rare race in the build.  Attached is a patch to glibc-locale to cause the build to fail early if this is detected.
Comment 4 Ross Burton 2019-09-05 12:58:37 UTC
I suspect this was fixed in oe-core 93d935927dd0ec0fa6f0a80a71236a7b00a5d1a4.