<?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>14400</bug_id>
          
          <creation_ts>2021-05-21 12:16:54 +0000</creation_ts>
          <short_desc>lttng-tools fails in do_package</short_desc>
          <delta_ts>2021-07-07 10:43:22 +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>3.3</version>
          <rep_platform>x86</rep_platform>
          <op_sys>x86</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>AB-INT AB-INT-TMPFS</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>3.4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jon Mason">jon.mason</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>alexandre.belloni</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>90454</commentid>
    <comment_count>0</comment_count>
    <who name="Jon Mason">jon.mason</who>
    <bug_when>2021-05-21 12:16:54 +0000</bug_when>
    <thetext>From https://autobuilder.yoctoproject.org/typhoon/#/builders/52/builds/3414

on centos7 worker, building for qemux86

stdio: ERROR: lttng-tools-2.12.3-r0 do_package: dwarfsrcfiles failed with exit code -7 (cmd was [&apos;dwarfsrcfiles&apos;, &apos;/home/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/core2-64-poky-linux/lttng-tools/2.12.3-r0/package/usr/lib64/lttng-tools/ptest/tests/regression/ust/baddr-statedump/prog.strip&apos;])
stdio: ERROR: lttng-tools-2.12.3-r0 do_package: Fatal errors occurred in subprocesses:
stdio: ERROR: Logfile of failure stored in: /home/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/core2-64-poky-linux/lttng-tools/2.12.3-r0/temp/log.do_package.42771
stdio: ERROR: Task (/home/pokybuild/yocto-worker/qemux86-world/build/meta/recipes-kernel/lttng/lttng-tools_2.12.3.bb:do_package) failed with exit code &apos;1&apos;
stdio: ERROR: Command . ./oe-init-build-env; bitbake world -k failed with exit code 1, see errors above. (1621049127.9: 8195.6)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90489</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-05-27 14:33:24 +0000</bug_when>
    <thetext>We&apos;ll monitor. Richard tried to reproduce the problem when this happened but it was not reproducible and has not recurred in 12 days.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90807</commentid>
    <comment_count>2</comment_count>
    <who name="Alexandre Belloni">alexandre.belloni</who>
    <bug_when>2021-06-30 22:48:44 +0000</bug_when>
    <thetext>Unfortunately, it did reproduce:

https://autobuilder.yoctoproject.org/typhoon/#builders/116/builds/392/steps/12/logs/stdio

ERROR: lttng-tools-2.12.4-r0 do_package: dwarfsrcfiles failed with exit code -7 (cmd was [&apos;dwarfsrcfiles&apos;, &apos;/home/pokybuild/yocto-worker/reproducible-debian/build/build-st/reproducibleB/tmp/work/core2-64-poky-linux/lttng-tools/2.12.4-r0/package/usr/lib/lttng-tools/ptest/tests/regression/ust/baddr-statedump/prog.strip&apos;])
NOTE: recipe libhandy-1.2.3-r0: task do_packagedata: Started
ERROR: lttng-tools-2.12.4-r0 do_package: Fatal errors occurred in subprocesses:
: Traceback (most recent call last):
  File &quot;/home/pokybuild/yocto-worker/reproducible-debian/build/meta/lib/oe/utils.py&quot;, line 279, in run
    ret = self._target(*self._args, **self._kwargs)
  File &quot;/home/pokybuild/yocto-worker/reproducible-debian/build/meta/classes/package.bbclass&quot;, line 407, in splitdebuginfo
    sources = source_info(file, d)
  File &quot;/home/pokybuild/yocto-worker/reproducible-debian/build/meta/classes/package.bbclass&quot;, line 365, in source_info
    bb.fatal(msg)
  File &quot;/home/pokybuild/yocto-worker/reproducible-debian/build/bitbake/lib/bb/__init__.py&quot;, line 165, in fatal
    raise BBHandledException()
bb.BBHandledException</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90819</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-07-01 13:24:16 +0000</bug_when>
    <thetext>ERRNO 7 is: E2BIG 7 Argument list too long
Are we passing in a list of packages that is too long?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90857</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2021-07-05 14:23:08 +0000</bug_when>
    <thetext>It is hard to tell whether E2BIG has come from the kernel or possibly from argp due to argp.h:

#define ARGP_ERR_UNKNOWN	E2BIG /* Hurd should never need E2BIG.  XXX */

(which is used on Linux+Hurd)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90861</commentid>
    <comment_count>5</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2021-07-06 10:02:55 +0000</bug_when>
    <thetext>I have some info on this. -7 is actually SIGBUS. The key is to look at the file it is complaining about which is a binary with a gnudebug-link to another binary that package.bbclass may be calling objcopy on.

You can reproduce if you take prog.strip and prog.debug from an lttng-tools build and place in a directory with a copy in orig/prog.debug as well, then create two scripts:

#!/bin/bash
while true
do
    cp orig/prog.debug prog.debug
    rm -f prog.debug2
    sleep 0.01
    objcopy --only-keep-debug prog.debug prog.debug2
    objcopy --add-gnu-debuglink prog.debug2 prog.debug
    sleep 0.01
done

#!/bin/bash
while true
do
    /media/build1/poky/build/tmp-arctest/work/core2-64-poky-linux/lttng-tools/2.12.4-r0/recipe-sysroot-native/usr/bin/dwarfsrcfiles prog.strip
    ec=$?
    if [ $ec -ne 0 ]; then
        echo &quot;Exiting $ec&quot;
        exit
    fi
    sleep 0.01
done

Launch the first in the background, then run the second. Before long you see an exit 135 and a SIGBUS. 135 = 128+7</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90878</commentid>
    <comment_count>6</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2021-07-07 10:43:22 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=5c928099edcb8c7d7ca46071b6d82e12e71f18bc</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>