Bug 5038

Summary: linux-libc-headers: icecc
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Lukas Bulwahn <lukas.bulwahn>
Component: devtools / tool chainAssignee: Laurentiu Palcu <laurentiu.palcu>
Status: RESOLVED INVALID QA Contact:
Severity: minor    
Priority: Low CC: bruce.ashfield, lukas.bulwahn, Martin.Jansa, meta.mr.watcher, meta.watcher, richard.purdie, tom.zanussi
Version: unspecified   
Target Milestone: Future   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Lukas Bulwahn 2013-08-22 09:42:10 UTC
Setup:
  - one machine that is used by two users to bitbake various layers.
  
When bitbaking linux-libc-headers, the following error occurs:

| ICECC[29548] 11:17:03: failed to creat /tmp/.icecream-root/local_lock: Permission denied
| ICECC[29548] 11:17:03: can't lock for local job
| make[1]: *** [arch/x86/tools/relocs] Error 100
| make[1]: Leaving directory `/home/lukas.bulwahn/dev/git.yoctoproject.org/poky/build/tmp/work/i586-poky-linux/linux-libc-headers/3.8-r0/linux-3.8'
| make: *** [archscripts] Error 2

The error occurs with poky 1.4+snapshot-20130821 and openembedded-core (fd9e591f266e1a6c183e77f24e50d31e0d52bdd5).

After one user has been bitbaking linux-libc-headers, the file

/tmp/.icecream-root/local_lock

is created under his user account with his default umask.

Now, if another users tries to bitbake linux-libc-headers, bitbake fails.

Suggested Solution:
  * explicitly delete the local_lock file after finishing with linux-libc-headers

The full log is:

[lukas.bulwahn@cheetara build]$ bitbake -k pseudo
Loading cache: 100% |##############################################################################################################| ETA:  00:00:00
Loaded 1181 entries from dependency cache.

Build Configuration:
BB_VERSION        = "1.19.1"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Fedora-18"
TARGET_SYS        = "i586-poky-linux"
MACHINE           = "qemux86"
DISTRO            = "poky"
DISTRO_VERSION    = "1.4+snapshot-20130821"
TUNE_FEATURES     = "m32 i586"
TARGET_FPU        = ""
meta
meta-yocto
meta-yocto-bsp    = "master:6382979cca1d1c57467f983ba9611f91555b20a9"

NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: Function failed: do_install (log file is located at /home/lukas.bulwahn/dev/git.yoctoproject.org/poky/build/tmp/work/i586-poky-linux/linux-libc-headers/3.8-r0/temp/log.do_install.29415)
ERROR: Logfile of failure stored in: /home/lukas.bulwahn/dev/git.yoctoproject.org/poky/build/tmp/work/i586-poky-linux/linux-libc-headers/3.8-r0/temp/log.do_install.29415
Log data follows:
| DEBUG: Executing shell function do_install
| NOTE: make -j 4 -e MAKEFLAGS= headers_install INSTALL_HDR_PATH=/home/lukas.bulwahn/dev/git.yoctoproject.org/poky/build/tmp/work/i586-poky-linux/linux-libc-headers/3.8-r0/image/usr
| make: i586-poky-linux-gcc: Command not found
|   CHK     include/generated/uapi/linux/version.h
| make[1]: Entering directory `/home/lukas.bulwahn/dev/git.yoctoproject.org/poky/build/tmp/work/i586-poky-linux/linux-libc-headers/3.8-r0/linux-3.8'
| make[1]: Leaving directory `/home/lukas.bulwahn/dev/git.yoctoproject.org/poky/build/tmp/work/i586-poky-linux/linux-libc-headers/3.8-r0/linux-3.8'
| make[1]: Entering directory `/home/lukas.bulwahn/dev/git.yoctoproject.org/poky/build/tmp/work/i586-poky-linux/linux-libc-headers/3.8-r0/linux-3.8'
| make[1]: Leaving directory `/home/lukas.bulwahn/dev/git.yoctoproject.org/poky/build/tmp/work/i586-poky-linux/linux-libc-headers/3.8-r0/linux-3.8'
| make[1]: Entering directory `/home/lukas.bulwahn/dev/git.yoctoproject.org/poky/build/tmp/work/i586-poky-linux/linux-libc-headers/3.8-r0/linux-3.8'
| make[1]: Leaving directory `/home/lukas.bulwahn/dev/git.yoctoproject.org/poky/build/tmp/work/i586-poky-linux/linux-libc-headers/3.8-r0/linux-3.8'
| make[1]: Entering directory `/home/lukas.bulwahn/dev/git.yoctoproject.org/poky/build/tmp/work/i586-poky-linux/linux-libc-headers/3.8-r0/linux-3.8'
| make[1]: Nothing to be done for `all'.
| make[1]: Leaving directory `/home/lukas.bulwahn/dev/git.yoctoproject.org/poky/build/tmp/work/i586-poky-linux/linux-libc-headers/3.8-r0/linux-3.8'
| make[1]: Entering directory `/home/lukas.bulwahn/dev/git.yoctoproject.org/poky/build/tmp/work/i586-poky-linux/linux-libc-headers/3.8-r0/linux-3.8'
|   HOSTCC  arch/x86/tools/relocs
| ICECC[29548] 11:17:03: failed to creat /tmp/.icecream-root/local_lock: Permission denied
| ICECC[29548] 11:17:03: can't lock for local job
| make[1]: *** [arch/x86/tools/relocs] Error 100
| make[1]: Leaving directory `/home/lukas.bulwahn/dev/git.yoctoproject.org/poky/build/tmp/work/i586-poky-linux/linux-libc-headers/3.8-r0/linux-3.8'
| make: *** [archscripts] Error 2
| ERROR: oe_runmake failed
| ERROR: Function failed: do_install (log file is located at /home/lukas.bulwahn/dev/git.yoctoproject.org/poky/build/tmp/work/i586-poky-linux/linux-libc-headers/3.8-r0/temp/log.do_install.29415)
ERROR: Task 347 (/home/lukas.bulwahn/dev/git.yoctoproject.org/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.8.bb, do_install) failed with exit code '1'
Comment 1 Darren Hart 2013-08-22 14:41:43 UTC
Martin, would you have any ideas on this one?
Comment 2 Martin Jansa 2013-08-22 15:20:48 UTC
Isn't it caused by ICECC_BASEDIR pointing to /tmp/.icecream-root where the user running bitbake cannot write?
Comment 3 Richard Purdie 2013-09-25 09:41:17 UTC
So the best fix would be to point ICECC_BASEDIR to be under TMPDIR somewhere?
Comment 4 Martin Jansa 2014-01-17 12:20:48 UTC
icecc is usually configured outside OE (sort of ASSUME_PROVIDED when user inherits icecc).

Pointing it to TMPDIR looks sane, but if the user is using icecc for other project than OE then any user-write-able directory will work - it could be a bit confused from pseudo (I guess root's icecc.conf was used instead of user running bitbake).
Comment 5 Richard Purdie 2014-04-04 15:51:04 UTC
I doubt this issue is pseudo related since compile tasks are not performed under pseudo. I'm going to resolve this as 'invalid' for want of a better category since I believe this is a configuration issue, the user shouldn't point icecc at a shared directory for locks.