Bug 11809

Summary: Possible race in xcb recipes
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Joshua Lock <joshuagloe>
Component: graphicsAssignee: Ross Burton <ross.burton>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: Medium+ CC: juro.bystricky, meta.mr.watcher, meta.watcher
Version: 2.4   
Target Milestone: 2.5 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Joshua Lock 2017-07-19 15:01:02 UTC
We're seeing what looks like a race in the xcb recipes:

ERROR: libxcb-1.12-r0 do_prepare_recipe_sysroot: Error executing a python function in exec_python_func() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
     0001:
 *** 0002:extend_recipe_sysroot(d)
     0003:
File: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-extras/build/meta/classes/staging.bbclass', lineno: 510, function: extend_recipe_sysroot
     0506:                    dest = newmanifest[l]
     0507:                    if l.endswith("/"):
     0508:                        staging_copydir(l, targetdir, dest, seendirs)
     0509:                        continue
 *** 0510:                    staging_copyfile(l, targetdir, dest, postinsts, seendirs)
     0511:
     0512:    for f in fixme:
     0513:        if f == '':
     0514:            staging_processfixme(fixme[f], recipesysroot, recipesysroot, recipesysrootnative, d)
File: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-extras/build/meta/classes/staging.bbclass', lineno: 151, function: staging_copyfile
     0147:        os.symlink(linkto, dest)
     0148:        #bb.warn(c)
     0149:    else:
     0150:        try:
 *** 0151:            os.link(c, dest)
     0152:        except OSError as err:
     0153:            if err.errno == errno.EXDEV:
     0154:                bb.utils.copyfile(c, dest)
     0155:            else:
Exception: FileExistsError: [Errno 17] File exists: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-extras/build/build/tmp/sysroots-components/core2-64/xcb-proto/usr/lib/xcb-proto/xcbgen/__pycache__/matcher.cpython-35.pyc' -> '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-extras/build/build/tmp/work/core2-64-poky-linux/libxcb/1.12-r0/recipe-sysroot/usr/lib/xcb-proto/xcbgen/__pycache__/matcher.cpython-35.pyc'

ERROR: libxcb-1.12-r0 do_prepare_recipe_sysroot: Function failed: extend_recipe_sysroot
ERROR: Logfile of failure stored in: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-extras/build/build/tmp/work/core2-64-poky-linux/libxcb/1.12-r0/temp/log.do_prepare_recipe_sysroot.9322
NOTE: recipe libxcb-1.12-r0: task do_prepare_recipe_sysroot: Failed
ERROR: Task (/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-extras/build/meta/recipes-graphics/xorg-lib/libxcb_1.12.bb:do_prepare_recipe_sysroot) failed with exit code '1'

Transient link to AB output: https://autobuilder.yocto.io/builders/nightly-qa-extras/builds/361/steps/BuildImages_14/logs/stdio

Note we've observed this a couple of times on the Yocto Autobuilder since consolidating all of the nightly-qa-* builders into nightly-qa-extras.
Comment 1 Juro Bystricky 2017-07-19 20:34:28 UTC
Looks very much like:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=11631
so not necessarily a race, but multiple providers?
Comment 2 Ross Burton 2017-09-05 16:46:09 UTC
Can't see how this can happen as that file is by and only shipped by xcb-proto.

Looks like we need to resolve bug 11631 to solve this.
Comment 3 Ross Burton 2017-10-02 16:42:22 UTC
That bug is now fixed so if this happens again we'll either get told if something else is shipping them, or if there's genuinely another bug.

I'll also note that I haven't seen this bug since it was first reported so maybe it has  be resolved.
Comment 4 Ross Burton 2018-02-20 20:10:56 UTC
Saw it again recently. :rageface: :tableflip:
Comment 5 Ross Burton 2018-03-05 02:58:41 UTC
Figured it out, patch out shortly
Comment 6 Ross Burton 2018-03-09 03:57:42 UTC
Fixed in oe-core 6f6a2b5ff7ec23bd3782f0c3521f3576101cbc9d.