Bug 7436

Summary: kbd build race
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Ross Burton <ross.burton>
Component: graphicsAssignee: Maxin B. John <maxin.john>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: jku, meta.mr.watcher, meta.watcher, richard.purdie, sgw
Version: 1.8   
Target Milestone: 2.2 M3   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Ross Burton 2015-03-09 16:01:35 UTC
| make[3]: Entering directory `/data/poky-master/tmp/work/ppc7400-poky-linux/kbd/2.0.2-r0/build/data'
| cp -r /data/poky-master/tmp/work/ppc7400-poky-linux/kbd/2.0.2-r0/kbd-2.0.2/data/keymaps keymaps_Z
| cp -r /data/poky-master/tmp/work/ppc7400-poky-linux/kbd/2.0.2-r0/kbd-2.0.2/data/consolefonts consolefonts_Z
| cp -r /data/poky-master/tmp/work/ppc7400-poky-linux/kbd/2.0.2-r0/kbd-2.0.2/data/partialfonts partialfonts_Z
| chmod -R u+w keymaps_Z
| chmod -R u+w consolefonts_Z partialfonts_Z
| cd keymaps_Z && gzip -f -n -9 */*.map */*/*.map
| chmod: cannot read directory `consolefonts_Z/README.Cyrillic': Not a directory
| make[3]: *** [consolefonts_Z] Error 1
| make[3]: *** Waiting for unfinished jobs....
| make[3]: Leaving directory `/data/poky-master/tmp/work/ppc7400-poky-linux/kbd/2.0.2-r0/build/data'
Comment 1 Ross Burton 2015-07-20 16:17:06 UTC
Or,

| make  install-data-hook
| make[3]: Entering directory '/data/poky-master/tmp/work/corei7-64-poky-linux/kbd/2.0.2-r0/build/data'
| cp -r /data/poky-master/tmp/work/corei7-64-poky-linux/kbd/2.0.2-r0/kbd-2.0.2/data/keymaps keymaps_Z
| cp -r /data/poky-master/tmp/work/corei7-64-poky-linux/kbd/2.0.2-r0/kbd-2.0.2/data/consolefonts consolefonts_Z
| chmod -R u+w keymaps_Z
| chmod: cannot read directory 'keymaps_Z/i386/qwerty/hypermap.m4': Not a directory
| Makefile:506: recipe for target 'keymaps_Z' failed
| make[3]: *** [keymaps_Z] Error 1
Comment 2 Maxin B. John 2015-09-29 09:02:12 UTC
Ross: I have tried and failed to re-create the kbd build error in a 16 core build machine. Is it acceptable to disable parallel make as a temporary work-around (PARALLEL_MAKE = "") ?
Comment 3 Ross Burton 2015-09-29 12:18:42 UTC
It's almost certainly a race in the $(KEYMAPDIR)_Z and $(FONTDIR)_Z in data/Makefile.am, but for now PARALLEL_MAKE_INST=0 (the rules only trigger in make install) would be a workaround.
Comment 4 Maxin B. John 2015-10-07 08:07:36 UTC
patch sent to oe-core:
http://lists.openembedded.org/pipermail/openembedded-core/2015-October/111337.html
Comment 5 Maxin B. John 2015-10-15 14:56:11 UTC
Upstreamed the work-around :
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=acdc2db899307b9a0fdbf1bc672964bb83fd58fc

Will close after pushing a "real" fix for the race.
Comment 6 Jussi Kukkonen 2015-11-18 12:56:46 UTC
This is probably no longer medium+: the workaround is in place and works.
Comment 7 Jussi Kukkonen 2016-04-08 08:08:28 UTC
Still don't think this is medium+ importance but... I had a look and this one is weird. There's no obvious race in the Makefile.am and:

> chmod: cannot read directory `consolefonts_Z/README.Cyrillic': Not a directory

This seems to be chmod saying "I can't even". The only way I could see that happening is README.Cyrillic being a directory first and then getting replaced by a file while chmod is running, and this seems unlikely.
Comment 8 Maxin B. John 2016-05-04 08:32:56 UTC
Created an upstream bug. Maintainer mentioned that he can't re-create the failure at his setup.

https://github.com/legionus/kbd/issues/1
Comment 9 Ross Burton 2016-09-22 15:08:29 UTC
We've had this in oe-core since August:

Author:     Robert Yang <liezhi.yang@windriver.com>
AuthorDate: Thu Aug 18 18:29:16 2016 -0700
Commit:     Richard Purdie <richard.purdie@linuxfoundation.org>
CommitDate: Sat Aug 20 16:06:03 2016 +0100

    kbd: remove PARALLEL_MAKEINST = ""

    There isn't anything wrong when looked into its Makefile, I guess that
    it had been fixed during ugprade, and I've applied this patch locally
    for more than 2 months, there isn't anything wrong.

    (From OE-Core rev: 53687cadaab307fc843768d61973ed1630eb28af)

    Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

So, closing.