<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>12302</bug_id>
          
          <creation_ts>2017-11-06 15:14:17 +0000</creation_ts>
          <short_desc>kernel&apos;s perf compilation failing in nightly-arm-lsb</short_desc>
          <delta_ts>2018-02-09 14:46:29 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>QA/Testing</classification>
          <product>Build Testing</product>
          <component>general</component>
          <version>2.5</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.5 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</reporter>
          <assigned_to name="Randy MacLeod">randy.macleod</assigned_to>
          <cc>akuster</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>ross.burton</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>77975</commentid>
    <comment_count>0</comment_count>
    <who name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</who>
    <bug_when>2017-11-06 15:14:17 +0000</bug_when>
    <thetext>Seems to be some kind of permission issue when AB is building kernel&apos;s perf source code as seen on this code snippet:

------
| BUILD: Doing &apos;make &amp;#27;[33m-j56&amp;#27;[m&apos; parallel build
|
| Auto-detecting system features:
| ... dwarf: [ &amp;#27;[32mon&amp;#27;[m ]
| ... dwarf_getlocations: [ &amp;#27;[32mon&amp;#27;[m ]
| ... glibc: [ &amp;#27;[32mon&amp;#27;[m ]
| ... gtk2: [ &amp;#27;[31mOFF&amp;#27;[m ]
| ... libaudit: [ &amp;#27;[31mOFF&amp;#27;[m ]
| ... libbfd: [ &amp;#27;[32mon&amp;#27;[m ]
| ... libelf: [ &amp;#27;[32mon&amp;#27;[m ]
| ... libnuma: [ &amp;#27;[31mOFF&amp;#27;[m ]
| ... numa_num_possible_cpus: [ &amp;#27;[31mOFF&amp;#27;[m ]
| ... libperl: [ &amp;#27;[32mon&amp;#27;[m ]
| ... libpython: [ &amp;#27;[32mon&amp;#27;[m ]
| ... libslang: [ &amp;#27;[32mon&amp;#27;[m ]
| ... libcrypto: [ &amp;#27;[32mon&amp;#27;[m ]
| ... libunwind: [ &amp;#27;[32mon&amp;#27;[m ]
| ... libdw-dwarf-unwind: [ &amp;#27;[32mon&amp;#27;[m ]
| ... zlib: [ &amp;#27;[32mo n&amp;#27;[m ]&lt; br&gt;| ... lzma: [ &amp;#27;[32mon&amp;#27;[m ]
| ... get_cpuid: [ &amp;#27;[31mOFF&amp;#27;[m ]
| ... bpf: [ &amp;#27;[32mon&amp;#27;[m ]
|
| Makefile.config:352: DWARF support is off, BPF prologue is disabled
| Makefile.config:479: No libaudit.h found, disables &apos;trace&apos; tool, please install audit-libs-devel or libaudit-dev
| GEN /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/qemuarm-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/common-cmds.h
| HOSTCC /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/qemuarm-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/fixdep.o
| HOSTLD /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/qemuarm-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/fixdep-in.o
| LINK /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/qemuarm-poky-linux-gnueabi/perf/1.0-r9/perf-1 .0/fixde p
| MKDIR /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/qemuarm-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/pmu-events/
| MKDIR /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/qemuarm-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/pmu-events/
| MKDIR /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/qemuarm-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/pmu-events/
| HOSTCC /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/qemuarm-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/pmu-events/json.o
| HOSTCC /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/qemuarm-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/pmu-events/jsmn.o
| HOSTCC /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/qemuarm-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/pmu-events/jevents.o
| / bin/sh: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/qemuarm-poky-linux-gnueabi/perf/1.0-r9/perf-1.0//fixdep: Permission denied
| /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work-shared/qemuarm/kernel-source/tools/build/Makefile.build:91: recipe for target &apos;/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/qemuarm-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/pmu-events/jsmn.o&apos; failed
| make[2]: *** [/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/qemuarm-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/pmu-events/jsmn.o] Error 1
| make[2]: *** Waiting for unfinished jobs....
| /bin/sh: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/qemuarm
--------

AB info:

Build status: FAILURE Build worker for this Build: opensuse423.yocto.io
Complete logs for all build steps: https://autobuilder.yocto.io/builders/nightly-arm-lsb/builds/550
Build Reason: Triggerable(trigger_main-build)
Build Properties:
• Contents of bblayers.conf (Note. LCONF_VERSION will not show up correctly)
POKY_BBLAYERS_CONF_VERSION =
BBPATH = &quot;${TOPDIR}&quot;
BBFILES ?=&quot;&quot;
BBLAYERS &amp;#43;= &quot; \
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/meta \
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/meta-poky \
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/meta-yocto-bsp \
&quot;

• BuildImages : core-image-lsb core-image-lsb-sdk
• DEST : /srv/autobuilder/autobuilder.yoctoproject.org/pub/nightly/20171103-3
• DISTRO : poky-lsb
• KEEP_BUILD_HIST : False
• Contents of auto.conf (local.conf for autobuilders)
INHERIT &amp;#43;= &quot;report-error&quot;
DISTRO = &quot;poky-lsb&quot;
PACKAGE_CLASSES = &quot;package_rpm package_deb package_ipk&quot;
BB_NUMBER_THREADS = &quot;24&quot;
PARALLEL_MAKE = &quot;-j 28&quot;
SDKMACHINE ?= &quot;i686&quot;
BB_TASK_NICE_LEVEL = &quot;5&quot;
BB_TASK_NICE_LEVEL_task-testimage = &quot;0&quot;
BB_TASK_IONICE_LEVEL = &quot;2.7&quot;
BB_TASK_IONICE_LEVEL_task-testimage = &quot;2.1&quot;
DL_DIR = &quot;/srv/autobuilder/autobuilder.yoctoproject.org/current_sources&quot;
SSTATE_DIR ?= &quot;/srv/autobuilder/autobuilder.yoctoproject.org/pub/sstate/&quot;
MACHINE = &quot;beaglebone&quot;
PREMIRRORS = &quot;&quot;
BB_GENERATE_MIRROR_TARBALLS = &quot;1&quot;
PRSERV_HOST = &quot;localhost:0&quot;
ADTREPO = &quot;http://adtrepo.yoctoproject.org//2.4&quot;
QEMU_USE_KVM = &quot;True&quot;
SDK_EXT_TYPE = &quot;minimal&quot;
SDK_INCLUDE_TOOLCHAIN = &quot;1&quot;
SANITY_TESTED_DISTROS = &quot;&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78109</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-11-09 15:54:55 +0000</bug_when>
    <thetext>*** Bug 12325 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78176</commentid>
    <comment_count>2</comment_count>
    <who name="Armin Kuster">akuster</who>
    <bug_when>2017-11-13 16:07:40 +0000</bug_when>
    <thetext>poking around google, I found

(Those errors would be caused by not linking against libdw, which it should be doing since the build script sets NO_LIBUNWIND=1)

I am planning on trying to reproducing this today, maybe I can help on this issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78177</commentid>
    <comment_count>3</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2017-11-13 16:32:16 +0000</bug_when>
    <thetext>I haven&apos;t done anything with this yet.

If you want the bug, feel free to take it :D or just dump your findings here and I can pick things up later.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78178</commentid>
    <comment_count>4</comment_count>
    <who name="Armin Kuster">akuster</who>
    <bug_when>2017-11-13 16:36:46 +0000</bug_when>
    <thetext>taking.

think this was introduce by
http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-4.9/commit/tools/perf/Makefile.config?h=standard/base&amp;id=03f5be20ec9befe477e9978bdba2b1f4f2ca9e42</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78218</commentid>
    <comment_count>5</comment_count>
    <who name="Armin Kuster">akuster</who>
    <bug_when>2017-11-15 17:57:58 +0000</bug_when>
    <thetext>can not reproduce this with latest master.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78219</commentid>
    <comment_count>6</comment_count>
    <who name="Armin Kuster">akuster</who>
    <bug_when>2017-11-15 18:01:22 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; can not reproduce this with latest master.

can we re-launch just this build?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78221</commentid>
    <comment_count>7</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-11-15 18:17:52 +0000</bug_when>
    <thetext>It&apos;s a race so won&apos;t reproduce on demand unless you do the right make invocations.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78353</commentid>
    <comment_count>8</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2017-11-27 17:06:00 +0000</bug_when>
    <thetext>https://autobuilder.yocto.io/builders/nightly-arm-lsb?numbuilds=60

shows 8 successful builds in a row. I guess this just shows how infrequent the bug is.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78380</commentid>
    <comment_count>9</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2017-11-28 17:27:04 +0000</bug_when>
    <thetext>I ran an overnight check and I&apos;m NOT able to duplicate the bug on a 128 core) build host even when running lots of cpu/io activity using stress in parallel with a loop of: 
  bitbake -c cleanall perf linux-yocto &amp;&amp; bitbake perf linux-yocto

I checked upstream in the main linux git repo:
   git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
   4fbd8d194f06 (HEAD -&gt; master, tag: v4.15-rc1, origin/master, origin/HEAD) Linux 4.15-rc1

and I did NOT see a fix. (git log tools/perf)

We now have 10 successful builds in a row: 
  https://autobuilder.yocto.io/builders/nightly-arm-lsb?numbuilds=50
Has anything changed in the build infrastructure that is related to this defect?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78396</commentid>
    <comment_count>10</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-11-29 09:08:53 +0000</bug_when>
    <thetext>No, it&apos;s just a race.  None of the recent ab builds have been touching anything that would cause perf to rebuild so I wouldn&apos;t take that as an assurance that it&apos;s fixed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78823</commentid>
    <comment_count>11</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2017-12-22 21:45:39 +0000</bug_when>
    <thetext>Are you saying that *all* of the nightly builds use sstate-cache?
How often does the system run a full re-build without sstate-cache? I would hope that your reply is once a week or better still every night for half of the build machines since there may be value testing full sstate-cache systems as well.
 
I still haven&apos;t found a nightly-arm build that failed on perf. Am I not looking in the right place? Most of the recent nightly-arm failures are from esdk failures such as:
https://autobuilder.yocto.io/builders/nightly-arm/builds/703/steps/Running%20Sanity%20Tests/logs/stdio
  FAIL: test_kernel_module (kernelmodule.KernelModuleTest)

and:
https://autobuilder.yocto.io/builders/nightly-arm/builds/716/steps/BuildImages_2/logs/stdio
   ERROR: buildtools-tarball-1.0-r0 do_populate_sdk: Could not invoke dnf.

¯\_(ツ)_/¯</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79002</commentid>
    <comment_count>12</comment_count>
    <who name="Armin Kuster">akuster</who>
    <bug_when>2018-01-10 19:23:42 +0000</bug_when>
    <thetext>has anyone seen this issue since?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79013</commentid>
    <comment_count>13</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2018-01-10 23:30:01 +0000</bug_when>
    <thetext>No sign of it on our build cluster.
Nothing in kernel.org it seemed either so I had a quick look at the perf recipe and found:

...
PACKAGECONFIG[libunwind] = &quot;,NO_LIBUNWIND=1 NO_LIBDW_DWARF_UNWIND=1,libunwind&quot;
PACKAGECONFIG[libnuma] = &quot;,NO_LIBNUMA=1&quot;
PACKAGECONFIG[systemtap] = &quot;,NO_SDT=1,systemtap&quot;

In looking at the perf Makefiles, I see:

ifndef NO_LIBAUDIT
  ifneq ($(feature-libaudit), 1)
    msg := $(warning No libaudit.h found, disables &apos;trace&apos; tool, please install audit-libs-devel or libaudit-dev);
    NO_LIBAUDIT := 1
  else
    CFLAGS += -DHAVE_LIBAUDIT_SUPPORT
    EXTLIBS += -laudit
    $(call detected,CONFIG_AUDIT)
  endif
endif

and as Ross said, it seems like a race (or perhaps host contamination).
I&apos;m working on trying to manually reproduce the error then I&apos;ll add the:
   PACKAGECONFIG[audit] = &quot;,NO_LIBAUDIT=1, audit&quot;
line and send a patch if that works.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79069</commentid>
    <comment_count>14</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2018-01-15 03:43:20 +0000</bug_when>
    <thetext>No that&apos;s wrong, the libaudit warning is a separate problem. I&apos;ve opened an enhancement:
  https://bugzilla.yoctoproject.org/show_bug.cgi?id=12482
to track it.


The fixdep permissions build error must have happened before the 4.12 kernel update since a commit:
   abb26210a395 perf tools: Force fixdep compilation at the start of the build
from Dec 2016, is in the 4.12 kernel tree.

$ git tag --contains abb26210a39522a6645bce3f438ed9a26bedb11b | grep -v rc
v4.10
v4.11
v4.12
v4.13
v4.14

*With*  the commit, fixdep is built before the auto-detection step:
----------------
make: Entering directory &apos;/.../tmp-glibc/work-shared/qemuarm/kernel-source/tools/perf&apos;
  BUILD:   Doing &apos;make -j128&apos; parallel build
  HOSTCC   /.../tmp-glibc/work/qemuarm-oe-linux-gnueabi/perf/1.0-r9/perf-1.0/fixdep.o
  HOSTLD   /.../tmp-glibc/work/qemuarm-oe-linux-gnueabi/perf/1.0-r9/perf-1.0/fixdep-in.o
  LINK     /.../tmp-glibc/work/qemuarm-oe-linux-gnueabi/perf/1.0-r9/perf-1.0/fixdep

Auto-detecting system features:
...
--------------------------------
whereas the logs given:
   https://bugzilla.yoctoproject.org/show_bug.cgi?id=12302#c0
start with auto-detection.

Can anyone confirm that this is only happening on pyro and earlier?

If so, should we backport the fix? It did not apply cleanly to 4.9.49 so best to give the defect to someone else.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79403</commentid>
    <comment_count>15</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2018-02-09 14:46:29 +0000</bug_when>
    <thetext>There was a race condition with the build but as explained already, this has been resolved for the 2.4 and master branches. I  don&apos;t think it&apos;s worth backporting the fix since it&apos;s relatively rare so I&apos;m closing this defect.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>