Bug 14400 - lttng-tools fails in do_package
Summary: lttng-tools fails in do_package
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 3.3
Hardware: x86 x86
: Medium normal
Target Milestone: 3.4
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard: AB-INT AB-INT-TMPFS
Depends on:
Blocks:
 
Reported: 2021-05-21 12:16 UTC by Jon Mason
Modified: 2021-07-07 10:43 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Mason 2021-05-21 12:16:54 UTC
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 ['dwarfsrcfiles', '/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'])
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 '1'
stdio: ERROR: Command . ./oe-init-build-env; bitbake world -k failed with exit code 1, see errors above. (1621049127.9: 8195.6)
Comment 1 Randy MacLeod 2021-05-27 14:33:24 UTC
We'll monitor. Richard tried to reproduce the problem when this happened but it was not reproducible and has not recurred in 12 days.
Comment 2 Alexandre Belloni 2021-06-30 22:48:44 UTC
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 ['dwarfsrcfiles', '/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'])
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 "/home/pokybuild/yocto-worker/reproducible-debian/build/meta/lib/oe/utils.py", line 279, in run
    ret = self._target(*self._args, **self._kwargs)
  File "/home/pokybuild/yocto-worker/reproducible-debian/build/meta/classes/package.bbclass", line 407, in splitdebuginfo
    sources = source_info(file, d)
  File "/home/pokybuild/yocto-worker/reproducible-debian/build/meta/classes/package.bbclass", line 365, in source_info
    bb.fatal(msg)
  File "/home/pokybuild/yocto-worker/reproducible-debian/build/bitbake/lib/bb/__init__.py", line 165, in fatal
    raise BBHandledException()
bb.BBHandledException
Comment 3 Randy MacLeod 2021-07-01 13:24:16 UTC
ERRNO 7 is: E2BIG 7 Argument list too long
Are we passing in a list of packages that is too long?
Comment 4 Richard Purdie 2021-07-05 14:23:08 UTC
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)
Comment 5 Richard Purdie 2021-07-06 10:02:55 UTC
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 "Exiting $ec"
        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