| Summary: | sstate relocation problem | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] Meta-yocto | Reporter: | Mark Hatle <mark.hatle> | ||||||
| Component: | meta-yocto | Assignee: | Joshua Lock - Disabled <josh> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | Medium | CC: | jessica.zhang, josh, poky.bs.watcher, poky.watcher, sgw | ||||||
| Version: | 1.1.1 | ||||||||
| Target Milestone: | 1.3 | ||||||||
| Hardware: | x86 | ||||||||
| OS: | Multiple | ||||||||
| Whiteboard: | |||||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||||
| Verified: | Documentation change: | --- | |||||||
| Attachments: |
|
||||||||
Created attachment 341 [details]
log.do_populate_sysroot
note if I rerun the build it will continue and go further.. until something else fails in approx the same place. If I retry enough times, it will succeed. Maybe it's not the mirror code after all. I just got the same error copying the sstate to a second user and using it as my primary SSTATE_DIR. I have deleted all of the native sstate cache entries and will be retrying the build. removing the natives caused everything in the system to be rebuilt, the sstate cached items were ignored. Further information. The issue is -not- related to the sstate_mirror, it is more fundamental then that. I am unable to share the sstate data in an edison build. I created the sstate data in a build: /home/yocto-admin/Desktop/poky/build/.... (uid yocto-admin) I attempted to use the sstate data, via the sstate_mirror, or a local copy, under the userid "yocto1". The build was attempted in: /home/yocto1/Desktop/poky/build/.... The failure condition and logs are as attached before, the -native elements simply can't be shared from one user to the next or failures occur during the extraction of various packages. I attempted to reproduce this failure with the current Poky master. I did NOT receive a failure following the steps that lead to one in Edison. However, I got a different failure. I don't believe it's related, but will include it and the steps here just in case it is. Build as user "test1", in /home/test1/poky/build. Run core-image-minimal... Store off the downloads and sstate-cache for use by another user -- remove the poky (and build) directories. Log in as user "test2". Using PREMIRRORS and SSTATE_MIRROR setup the new build to the copied downloads and sstate-cache location. Run a core-image-minimal build -- (it will succeed, unlike edison). Then run a "psplash" build, it will fail with: configure:3038: ccache i586-poky-linux-gcc -m32 -march=i586 --sysroot=/home/test2/poky/build/tmp/sysroots/qemux86 -c -O2 -pipe -g -feliminate-unused-debug-types conftest.c >&5 cc1: error: /home/test1/poky/build/tmp/sysroots/qemux86/home/test1/poky/build/tmp/sysroots/qemux86/usr/include: Permission denied cc1: error: /home/test1/poky/build/tmp/sysroots/qemux86/usr/include: Permission denied ---- The compiler is still looking into the older location(s) for items tat should only be coming from the new user code. Moved from 1.2 since this is against the stable release Using my edison[1] branch with a *read-only* shared sstate directory I get: " Failed to create a file in SSTATE_DIR: Permission denied " With a *writeable* shared sstate directory my -native recipes fail with errors such as: " ERROR: Task 10 (/home/sstatetest/poky-edsion/meta/recipes-devtools/quilt/quilt-native_0.48.bb, do_populate_sysroot_setscene) failed with exit code '1' " Followed later by: " | ERROR: Error executing a python function in /home/sstatetest/poky-edsion/meta/recipes-devtools/quilt/quilt-native_0.48.bb: | IOError: [Errno 13] Permission denied: '/srv/yocto/sstate-cache-edison/sstate-quilt-native-x86_64-linux-0.48-r0-x86_64-2-a8d5fafbb984e9267ddaa3433922fda2_populate-sysroot.tgz.siginfo' " because the sstate signature files are created -rw-r--r--, so the signatures cannot be overwritten when recreating the native sstate packages as the new user. Having taken a look at the code I'm pretty surprised that this doesn't happen in master. There aren't many differences between meta/classes/sstate.bbclass and bitbake/lib/bb/siggen.py in master and josh/edison ... 1. http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=josh/edison Note: things, unsurprisingly, go much smoother if I use my sstate-cache from another user as an SSTATE_MIRRORS rather than as an SSTATE_CACHE. We could write an extra sanity test to make sure that sstate-cache and any contents are writeable? That could be a pretty heavy test, though... Checking if the directory is writable as a one time test is probably fine and we should write the files with group write IMO OK, I'll write a patch series to check stat for user or group read/write and to change the write permissions of the sstate files. I've reported the issue in comment #9 as a separate bug #2450 Part of a solution is in place, ensuring siginfo files have group R/W permissions. http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=63ccc3f266496b909eec472a1671939498d6e5eb Sanity test to check for R/W permissions to SSTATE_CACHE implemented: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=c2df43b5dbeadc6fff26b8bc6e3bbc07f59b81fa Change to ensure files are created with group R/W: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=441c1f8faa82a5ff410a395d9086578f6ac8a93b In addition to the already mentioned change to ensure siginfo changes have group R/W: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=63ccc3f266496b909eec472a1671939498d6e5eb I feel that this bug is done. I'm loath to merge it to Edison, though. Anyone have strong opinions there? Fixed in master for 1.3 series |
Created attachment 340 [details] local.conf Using the head of the Edison branch, commit e3afb1ebc8eade48df6474e11cf1384ccc53c015, I am unable to get the sstate_mirror code to work reliably. My configuration is attached. The /git/sstate directory was populated with a previous build by setting the SSTATE_DIR = "/git/sstate". The building user does NOT have write permission to that directory, only read permission. I have verified all of the files and read permissions are properly set. I am attempting to build "core-image-minimal", error message follows: | tar (child): /home/yocto1/Desktop/poky/build/sstate-cache/sstate-dbus-x86_64-poky-linux-1.4.12-r1-x86_64-2-03c464c53be3a0482234651d6046e02f_populate-sysroot.tgz: Cannot open: Permission denied (full log is will be attached as well)