<?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>8452</bug_id>
          
          <creation_ts>2015-10-07 10:05:46 +0000</creation_ts>
          <short_desc>LSB builds fail in kernel sanity test with xmalloc failure</short_desc>
          <delta_ts>2015-11-10 12:35:40 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>1.9</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>High</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.0</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ross Burton">ross.burton</reporter>
          <assigned_to name="Aníbal Limón">anibal.limon</assigned_to>
          <cc>alexandru.c.georgescu</cc>
    
    <cc>anibal.limon</cc>
    
    <cc>benjamin.esquivel</cc>
    
    <cc>mariano.lopez</cc>
    
    <cc>markus.lehtonen</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>richard.purdie</cc>
          
          <qa_contact name="Lucian Musat">georgex.l.musat</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>Regression (Used to work)</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>55017</commentid>
    <comment_count>0</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2015-10-07 10:05:46 +0000</bug_when>
    <thetext>Specifically the LSB builds are failing the kernel sanity testing:

| ======================================================================
| FAIL: test_kernel_module (oeqa.runtime.kernelmodule.KernelModuleTest)
| ----------------------------------------------------------------------
| Traceback (most recent call last):
|   File &quot;/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/meta/lib/oeqa/utils/decorators.py&quot;, line 106, in wrapped_f
|     return func(*args)
|   File &quot;/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/meta/lib/oeqa/utils/decorators.py&quot;, line 94, in wrapped_f
|     return f(*args)
|   File &quot;/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/meta/lib/oeqa/utils/decorators.py&quot;, line 94, in wrapped_f
|     return f(*args)
|   File &quot;/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/meta/lib/oeqa/runtime/kernelmodule.py&quot;, line 31, in test_kernel_module
|     self.assertEqual(status, 0, msg=&quot;\n&quot;.join([cmd, output]))
| AssertionError: 2 != 0 : cd /usr/src/kernel &amp;&amp; make scripts
|   HOSTCC  scripts/basic/fixdep
|   HOSTCC  scripts/kconfig/conf.o
|   SHIPPED scripts/kconfig/zconf.tab.c
|   SHIPPED scripts/kconfig/zconf.lex.c
|   SHIPPED scripts/kconfig/zconf.hash.c
|   HOSTCC  scripts/kconfig/zconf.tab.o
|   HOSTLD  scripts/kconfig/conf
| scripts/kconfig/conf --silentoldconfig Kconfig
| bash: xmalloc: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/armv5e-poky-linux-gnueabi/bash/4.3.30-r0/bash-4.3.30/locale.c:81: cannot allocate 2 bytes (0 bytes allocated)
| bash: xmalloc: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/armv5e-poky-linux-gnueabi/bash/4.3.30-r0/bash-4.3.30/locale.c:81: cannot allocate 2 bytes (0 bytes allocated)
| bash: xmalloc: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/armv5e-poky-linux-gnueabi/bash/4.3.30-r0/bash-4.3.30/locale.c:81: cannot allocate 2 bytes (0 bytes allocated)
| Makefile:588: /usr/src/kernel/arch//Makefile: No such file or directory
| bash: xmalloc: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/armv5e-poky-linux-gnueabi/bash/4.3.30-r0/bash-4.3.30/locale.c:81: cannot allocate 2 bytes (0 bytes allocated)
| bash: xmalloc: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/armv5e-poky-linux-gnueabi/bash/4.3.30-r0/bash-4.3.30/locale.c:81: cannot allocate 2 bytes (0 bytes allocated)
| bash: xmalloc: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/armv5e-poky-linux-gnueabi/bash/4.3.30-r0/bash-4.3.30/locale.c:81: cannot allocate 2 bytes (0 bytes allocated)
| bash: xmalloc: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/armv5e-poky-linux-gnueabi/bash/4.3.30-r0/bash-4.3.30/locale.c:81: cannot allocate 2 bytes (0 bytes allocated)
| bash: xmalloc: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/armv5e-poky-linux-gnueabi/bash/4.3.30-r0/bash-4.3.30/locale.c:81: cannot allocate 2 bytes (0 bytes allocated)
| bash: xmalloc: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/armv5e-poky-linux-gnueabi/bash/4.3.30-r0/bash-4.3.30/locale.c:81: cannot allocate 2 bytes (0 bytes allocated)
| bash: xmalloc: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/armv5e-poky-linux-gnueabi/bash/4.3.30-r0/bash-4.3.30/locale.c:81: cannot allocate 2 bytes (0 bytes allocated)
| bash: xmalloc: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/armv5e-poky-linux-gnueabi/bash/4.3.30-r0/bash-4.3.30/locale.c:81: cannot allocate 2 bytes (0 bytes allocated)
| bash: xmalloc: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/armv5e-poky-linux-gnueabi/bash/4.3.30-r0/bash-4.3.30/locale.c:81: cannot allocate 2 bytes (0 bytes allocated)
| bash: xmalloc: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/armv5e-poky-linux-gnueabi/bash/4.3.30-r0/bash-4.3.30/locale.c:81: cannot allocate 2 bytes (0 bytes allocated)
| bash: xmalloc: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/armv5e-poky-linux-gnueabi/bash/4.3.30-r0/bash-4.3.30/locale.c:81: cannot allocate 2 bytes (0 bytes allocated)
| bash: xmalloc: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/armv5e-poky-linux-gnueabi/bash/4.3.30-r0/bash-4.3.30/locale.c:81: cannot allocate 2 bytes (0 bytes allocated)
| make: execvp: /usr/src/kernel/scripts/gcc-goto.sh: Permission denied
| bash: xmalloc: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/armv5e-poky-linux-gnueabi/bash/4.3.30-r0/bash-4.3.30/locale.c:81: cannot allocate 2 bytes (0 bytes allocated)
| make: *** No rule to make target &apos;/usr/src/kernel/arch//Makefile&apos;.  Stop.
|</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55044</commentid>
    <comment_count>1</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2015-10-07 20:28:54 +0000</bug_when>
    <thetext>One of the things that look strange here is that the test is not triggering the logic for gathering logs to see the host/target context (mem, proc, dmesg, etc). Mariano did an intentional failure of the test and it *should* be presenting such logs.

The first thing that occurs to us is to check what is going on with the host memory at the time of failure so we&apos;ll send a forced build with a patch that writes periodically the memory status to a file in the disc so we can come later an analyze it.

One of the theories is that if the Ram is not being sufficient then the process for gathering the logs cannot start as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55047</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-10-08 06:22:41 +0000</bug_when>
    <thetext>As I&apos;ve mentioned elsewhere, if you download one of the broken images and boot it locally, you can reproduce this the first time you run &quot;make scripts&quot; inside an image. I&apos;ve run top in an image whilst showing the bug and I didn&apos;t see any significant resource problem.

If you google the error, there are comments about PAM. We enable PAM in poky-lsb. We&apos;re also seeing this bug on x86, x86-64, arm and ppc so it looks like its something strucutural in our images, not something kernel/arch specific.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55132</commentid>
    <comment_count>3</comment_count>
    <who name="Aníbal Limón">anibal.limon</who>
    <bug_when>2015-10-09 19:54:26 +0000</bug_when>
    <thetext>I tested with arm lsb sdk image that fails and the problem is caused by bash custom malloc.

I found it because i disabled bash custom malloc passing --without-bash-malloc to configure and all works good.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55133</commentid>
    <comment_count>4</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2015-10-09 20:29:26 +0000</bug_when>
    <thetext>Also of note is that the latest master runs on the AB don&apos;t fail like this...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55134</commentid>
    <comment_count>5</comment_count>
    <who name="Aníbal Limón">anibal.limon</who>
    <bug_when>2015-10-09 21:58:01 +0000</bug_when>
    <thetext>I found that all the distr(In reply to comment #3)
&gt; I tested with arm lsb sdk image that fails and the problem is caused by bash
&gt; custom malloc.
&gt; 
&gt; I found it because i disabled bash custom malloc passing
&gt; --without-bash-malloc to configure and all works good.

I found that common distros don&apos;t use it, for example:

Debian &amp; Ubuntu: http://bazaar.launchpad.net/~doko/+junk/pkg-bash-debian/view/head:/rules#L89

Fedora 20 (extract and see spec): ftp://rpmfind.net/linux/fedora-secondary/development/rawhide/source/SRPMS/b/bash-4.2.45-4.fc20.src.rpm

LFS: http://www.linuxfromscratch.org/lfs/view/development/chapter06/bash.html

So there is no reason for maintain enabled.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55262</commentid>
    <comment_count>6</comment_count>
    <who name="Aníbal Limón">anibal.limon</who>
    <bug_when>2015-10-13 14:55:31 +0000</bug_when>
    <thetext>Merge at,

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=05594f86366d97975501ffd84886d37f0c72e238</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56354</commentid>
    <comment_count>7</comment_count>
    <who name="Lucian Musat">georgex.l.musat</who>
    <bug_when>2015-11-10 12:35:40 +0000</bug_when>
    <thetext>Having been seeing this of late so setting this as verified (on commit fc45deac89ef63ca1c44e763c38ced7dfd72cbe1)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>