Bug 1774

Summary: sstate create package issue
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: Matthew McClintock <msm-oss>
Component: meta-yoctoAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Low CC: aprasad, msm-oss, poky.bs.watcher, poky.watcher
Version: 1.1   
Target Milestone: ---   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---
Attachments:
Description Flags
full console log of failure none

Description Matthew McClintock 2011-11-19 11:33:18 UTC
I've seen this before, but it's rare. I think its a threaded task issue... I have not looked too closely beyond that though.

ERROR: Function 'sstate_create_package' failed (see /opt/yocto/cache-build/mpc8572ds/build_mpc8572ds_release/tmp/work/ppce500v2-fsl-linux-gnuspe/zlib-1.2.5-r0/temp/log.do_populate_lic.23458 for further information)
ERROR: Logfile of failure stored in: /opt/yocto/cache-build/mpc8572ds/build_mpc8572ds_release/tmp/work/ppce500v2-fsl-linux-gnuspe/zlib-1.2.5-r0/temp/log.do_populate_lic.23458
Log data follows:
| DEBUG: Staging /opt/yocto/cache-build/mpc8572ds/build_mpc8572ds_release/tmp/work/ppce500v2-fsl-linux-gnuspe/zlib-1.2.5-r0/license-destdir/zlib to /opt/yocto/cache-build/mpc8572ds/build_mpc8572ds_release/tmp/deploy/licenses/zlib
| DEBUG: Staging /opt/yocto/cache-build/mpc8572ds/build_mpc8572ds_release/tmp/work/ppce500v2-fsl-linux-gnuspe/zlib-1.2.5-r0/license-destdir/zlib/generic_Zlib to /opt/yocto/cache-build/mpc8572ds/build_mpc8572ds_release/tmp/deploy/licenses/zlib/generic_Zlib
| DEBUG: Staging /opt/yocto/cache-build/mpc8572ds/build_mpc8572ds_release/tmp/work/ppce500v2-fsl-linux-gnuspe/zlib-1.2.5-r0/license-destdir/zlib/zlib.h to /opt/yocto/cache-build/mpc8572ds/build_mpc8572ds_release/tmp/deploy/licenses/zlib/zlib.h
| DEBUG: Preparing /opt/yocto/cache-build/mpc8572ds/build_mpc8572ds_release/tmp/work/ppce500v2-fsl-linux-gnuspe/zlib-1.2.5-r0/license-destdir/zlib/generic_Zlib for packaging at /opt/yocto/cache-build/mpc8572ds/build_mpc8572ds_release/tmp/work/ppce500v2-fsl-linux-gnuspe/zlib-1.2.5-r0/sstate-build-populate-lic/zlib/generic_Zlib
| DEBUG: Replacing absolute path /opt/yocto/cache-build/mpc8572ds/build_mpc8572ds_release/tmp/deploy/licenses/common-licenses/Zlib with relative path ../../..//deploy/licenses/common-licenses/Zlib
| DEBUG: Preparing /opt/yocto/cache-build/mpc8572ds/build_mpc8572ds_release/tmp/work/ppce500v2-fsl-linux-gnuspe/zlib-1.2.5-r0/license-destdir/zlib/zlib.h for packaging at /opt/yocto/cache-build/mpc8572ds/build_mpc8572ds_release/tmp/work/ppce500v2-fsl-linux-gnuspe/zlib-1.2.5-r0/sstate-build-populate-lic/zlib/zlib.h
| DEBUG: SITE files ['endian-big', 'bit-32', 'powerpc-common', 'common-linux', 'common-glibc', 'powerpc-linux', 'powerpc32-linux', 'powerpc-linux-gnuspe', 'common']
| ERROR: Function 'sstate_create_package' failed (see /opt/yocto/cache-build/mpc8572ds/build_mpc8572ds_release/tmp/work/ppce500v2-fsl-linux-gnuspe/zlib-1.2.5-r0/temp/log.do_populate_lic.23458 for further information)
| tar (child): gzip: Cannot exec: Text file busy
| tar (child): Error is not recoverable: exiting now
NOTE: package zlib-1.2.5-r0: task do_populate_lic: Failed
Comment 1 Richard Purdie 2011-11-20 02:29:41 UTC
Do you have any more logs from when this happened. It sounds like the gzip binary in the sysroot is being updated (hence it being busy) at the same time as something else was trying to run it.
Comment 2 Matthew McClintock 2011-11-20 17:04:39 UTC
Created attachment 282 [details]
full console log of failure
Comment 3 Matthew McClintock 2011-11-20 17:05:17 UTC
(In reply to comment #1)
> Do you have any more logs from when this happened. It sounds like the gzip
> binary in the sysroot is being updated (hence it being busy) at the same time
> as something else was trying to run it.

Anyone else besides this? The log in tmp/work/ where just the same thing thats in this console message
Comment 4 Richard Purdie 2011-11-21 02:31:34 UTC
No, that is perfect, thanks. You'll notice the line:

14: gzip-native-1.4-r0 do_populate_sysroot (pid 20711)

which confirms my suspicion about what this was racing with. The trouble is we don't list gzip-native in dependencies and if we did, it would be everywhere although I notice its not in ASSUME_PROVIDED. Perhaps the correct solution is to put it there and also not to install the gzip binary in gzip-native.

Looking at the code:
# don't use version earlier than 1.4 for gzip-native, as it's necessary for
# some packages using an archive format incompatible with earlier gzip
PREFERRED_VERSION_gzip-native ?= "1.4"
and expat does:

do_unpack[depends] += "gzip-native:do_populate_sysroot"

undoubtedly due to file format issues we've had in the past. Not an easy problem...

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=0ff62b0462f3f64672bd4704de9a192eb1a730d1

The solution might be to treat this the same way as we treat tar-native (check version and build right at the start if needed).
Comment 5 Matthew McClintock 2011-12-12 15:22:47 UTC
*** Bug 1822 has been marked as a duplicate of this bug. ***
Comment 6 Richard Purdie 2012-03-21 10:46:18 UTC
I think I have a way to resolve this kind of problem. We should do something similar to http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=rpurdie/t1&id=9cdb7194592c1bec5d332268d1be3e736dbcdd47 for the package creation step, removing binaries in the sysroot from the equation.