<?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>526</bug_id>
          
          <creation_ts>2010-11-09 11:07:34 +0000</creation_ts>
          <short_desc>LD_PRELOAD missing libpseudo.so</short_desc>
          <delta_ts>2011-11-02 06:36:42 +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>Meta-yocto</product>
          <component>meta-yocto</component>
          <version>1.0</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.0 M3</target_milestone>
          
          <blocked>507</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Gary Thomas">gary</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>jiajun.xu</cc>
    
    <cc>ke.yu</cc>
    
    <cc>kevin.tian</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
    
    <cc>shane.wang</cc>
    
    <cc>wenhuax.fan</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>10862</commentid>
    <comment_count>0</comment_count>
    <who name="Gary Thomas">gary</who>
    <bug_when>2010-11-09 11:07:34 +0000</bug_when>
    <thetext>Using master d9ff2f897aa271e6b2d7e4dcaf8b8d19de513b50

If you build a completely new tree with SSTATE_MIRRORS set to a valid staging tree, most of the initial steps produce this error:

ERROR: ld.so: object &apos;libpseudo.so&apos; from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object &apos;libpseudo.so&apos; from LD_PRELOAD cannot be preloaded: ignored.

I think this is because the LD_PRELOAD variable is always present, pointing into the sysroots tree, even before that tree has been created.  From meta/conf/meta.conf:
  LD_PRELOAD=libpseudo.so LD_LIBRARY_PATH=${STAGING_LIBDIR_NATIVE}/pseudo/lib64:${STAGING_LIBDIR_NATIVE}/pseudo/lib

This is trivial to reproduce.  Just build a tree from scratch, without using SSTATE_MIRRORS.  Then build another, again from scratch, with SSTATE_MIRRORS pointing to the sstate-cache tree produced by the first build.  The preload 
error will occur as early as step 2.

Meta-template to reproduce:
  % cd &lt;&lt;POKY-SRC-TREE&gt;&gt;
  % mkdir &lt;&lt;BUILD-TREE1&gt;&gt;
  % . poky-init-build-env &lt;&lt;BUILD-TREE1&gt;&gt;
  -- Adjust conf/local.conf, etc, as necessary
  % bitbake poky-image-minimal

When this finishes
  % cd &lt;&lt;POKY-SRC-TREE&gt;&gt;
  % mkdir &lt;&lt;BUILD-TREE2&gt;&gt;
  % . poky-init-build-env &lt;&lt;BUILD-TREE2&gt;&gt;
  -- Adjust conf/local.conf, etc, as necessary
  -- Set SSTATE_MIRRORS to point to &lt;&lt;BUILD-TREE1&gt;&gt;/sstate-cache/
  % bitbake poky-image-minimal</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11186</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2010-12-15 07:48:27 +0000</bug_when>
    <thetext>This is still happening, and on my build machine I&apos;m fairly confident it is what&apos;s causing the build to fail at a later stage (e.g. building the kernel). I have found if you bitbake pseudo-native explicitly so it is finished as early as possible, then build the image it works fine. I&apos;m guessing when building from sstate with many threads running, a lot more packages get built before pseudo-native because individually they take less time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11190</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2010-12-15 08:23:02 +0000</bug_when>
    <thetext>With the planned switch back from exec to fork in bitbake and the need to handle pseudo as a special case, this problem should thankfully go away when that happens.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11249</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2010-12-20 14:49:57 +0000</bug_when>
    <thetext>This should be fixed in master with the exec() to fork() changes and the new way we call pseudo.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17011</commentid>
    <comment_count>4</comment_count>
    <who name="wenhua.fan">wenhuax.fan</who>
    <bug_when>2011-10-31 18:52:00 +0000</bug_when>
    <thetext>With commit id 269172... for poky tree, this issue reproduce when building nightly-x86/x86-64/arm/mips/ppc on autobuilder, it cause sanity test failed. 

Part of log as below:

########
| NOTE: Run ssh test in scenario sanity
| /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/scripts/runqemu
| Copying rootfs /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/build/tmp/deploy/images/core-image-sato-qemux86-20111027213425.rootfs.ext3 to /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/build/tmp/work/qemux86-poky-linux/core-image-sato-1.0-r0/qemuimagetest/tmp/core-image-sato-qemux86-test.ext3
| Running xterm -display localhost:1 -e &apos;OE_TMPDIR=/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/build/tmp /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/scripts/runqemu /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/build/tmp/deploy/images/bzImage-qemux86.bin /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/build/tmp/work/qemux86-poky-linux/core-image-sato-1.0-r0/qemuimagetest/tmp/core-image-sato-qemux86-test.ext3 &amp;&amp; /bin/sleep 60&apos; &amp;
| 	Test_Info: There is no Qemu process
| 	Test_Info: Wait for qemu up...
| ERROR: ld.so: object &apos;libpseudo.so&apos; from LD_PRELOAD cannot be preloaded: ignored.
| 	Test_Info: There is at least one Qemu process running
| 	Test_Info: Begin to check if qemu network is up
| ERROR: ld.so: object &apos;libpseudo.so&apos; from LD_PRELOAD cannot be preloaded: ignored.
########

Detail information could be found at:

http://autobuilder.yoctoproject.org:8010/builders/nightly-x86/builds/202/steps/shell_20/logs/stdio
or
http://autobuilder.yoctoproject.org:8010/builders/nightly-mips/builds/123/steps/shell_20/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17028</commentid>
    <comment_count>5</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-11-01 11:38:36 +0000</bug_when>
    <thetext>This message occurs whenever sudo is used since it would be a security issue to honor LD_PRELOAD when raising privileges. Are you 100% sure this is the reason for the sanity test failures?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17040</commentid>
    <comment_count>6</comment_count>
    <who name="wenhua.fan">wenhuax.fan</who>
    <bug_when>2011-11-01 23:03:21 +0000</bug_when>
    <thetext>Sorry for this operation, I didn&apos;t know this issue was caused by security issue. Then I don&apos;t very sure this is the reason for the sanity test failures.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17045</commentid>
    <comment_count>7</comment_count>
    <who name="Jiajun Xu">jiajun.xu</who>
    <bug_when>2011-11-02 06:36:42 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; This message occurs whenever sudo is used since it would be a security issue to
&gt; honor LD_PRELOAD when raising privileges. Are you 100% sure this is the reason
&gt; for the sanity test failures?

Sorry, Richard.
The sanity failure is caused by bug 1699 - connman could not start due to dbus file missing.
Mark the bug to RESOLVED FIXED again due to wrong operation.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>