<?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>14923</bug_id>
          
          <creation_ts>2022-10-07 21:41:16 +0000</creation_ts>
          <short_desc>devtool.DevtoolUpgradeTests.test_devtool_virtual_kernel_modify fails during &apos;devtool build linux-yocto&apos;</short_desc>
          <delta_ts>2024-06-06 14:59:02 +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>kernel</component>
          <version>unspecified</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>AB-INT AB-HAVE-PLAN</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>5.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Luca Ceresoli">luca.ceresoli</reporter>
          <assigned_to name="Bruce Ashfield">bruce.ashfield</assigned_to>
          <cc>alexandre.belloni</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>tom.zanussi</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>94120</commentid>
    <comment_count>0</comment_count>
    <who name="Luca Ceresoli">luca.ceresoli</who>
    <bug_when>2022-10-07 21:41:16 +0000</bug_when>
    <thetext>Got this failure once:

https://autobuilder.yoctoproject.org/typhoon/#/builders/80/builds/4159/steps/14/logs/stdio



Log:

2022-10-07 07:18:00,969 - oe-selftest - INFO - devtool.DevtoolUpgradeTests.test_devtool_virtual_kernel_modify (subunit.RemotedTestCase)
2022-10-07 07:18:00,970 - oe-selftest - INFO -  ... FAIL
Stderr:
2022-10-07 06:51:41,103 - oe-selftest - INFO - Adding: &quot;include selftest.inc&quot; in /home/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-1192384/conf/local.conf
2022-10-07 06:51:41,104 - oe-selftest - INFO - Adding: &quot;include bblayers.inc&quot; in bblayers.conf
2022-10-07 07:18:00,970 - oe-selftest - INFO - 5: 13/30 368/503 (1060.51s) (devtool.DevtoolUpgradeTests.test_devtool_virtual_kernel_modify)
2022-10-07 07:18:00,970 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last):
  File &quot;/home/pokybuild/yocto-worker/oe-selftest-debian/build/meta/lib/oeqa/selftest/cases/devtool.py&quot;, line 2036, in test_devtool_virtual_kernel_modify
    runCmd(&apos;devtool build %s&apos; % kernel_provider)
  File &quot;/home/pokybuild/yocto-worker/oe-selftest-debian/build/meta/lib/oeqa/utils/commands.py&quot;, line 214, in runCmd
    raise AssertionError(&quot;Command &apos;%s&apos; returned non-zero exit status %d:\n%s&quot; % (command, result.status, exc_output))
AssertionError: Command &apos;devtool build linux-yocto&apos; returned non-zero exit status 1:

...

ERROR: linux-yocto-5.19.9+git999-r0 do_package: Error executing a python function in exec_func_python() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: &apos;exec_func_python() autogenerated&apos;, lineno: 2, function: &lt;module&gt;
     0001:
 *** 0002:split_kernel_module_packages(d)
     0003:
File: &apos;/tmp/devtoolqa7pq7w2jz/core-copy/meta/classes-recipe/kernel-module-split.bbclass&apos;, lineno: 184, function: split_kernel_module_packages
     0180:    module_pattern_prefix = d.getVar(&apos;KERNEL_MODULE_PACKAGE_PREFIX&apos;)
     0181:    module_pattern_suffix = d.getVar(&apos;KERNEL_MODULE_PACKAGE_SUFFIX&apos;)
     0182:    module_pattern = module_pattern_prefix + kernel_package_name + &apos;-module-%s&apos; + module_pattern_suffix
     0183:
 *** 0184:    modules = do_split_packages(d, root=&apos;${nonarch_base_libdir}/modules&apos;, file_regex=module_regex, output_pattern=module_pattern, description=&apos;%s kernel module&apos;, postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends=&apos;%s-%s&apos; % (kernel_package_name, kernel_version))
     0185:    if modules:
     0186:        d.appendVar(&apos;RDEPENDS:&apos; + metapkg, &apos; &apos;+&apos; &apos;.join(modules))
     0187:
     0188:    # If modules-load.d and modprobe.d are empty at this point, remove them to
File: &apos;/tmp/devtoolqa7pq7w2jz/core-copy/meta/classes-global/package.bbclass&apos;, lineno: 240, function: do_split_packages
     0236:            d.setVar(&apos;pkg_postinst:&apos; + pkg, postinst)
     0237:        if postrm:
     0238:            d.setVar(&apos;pkg_postrm:&apos; + pkg, postrm)
     0239:        if callable(hook):
 *** 0240:            hook(f, pkg, file_regex, output_pattern, m.group(1))
     0241:
     0242:    d.setVar(&apos;PACKAGES&apos;, &apos; &apos;.join(packages))
     0243:    return list(split_packages)
     0244:
File: &apos;/tmp/devtoolqa7pq7w2jz/core-copy/meta/classes-recipe/kernel-module-split.bbclass&apos;, lineno: 92, function: frob_metadata
     0088:            vals[m.group(1)] = m.group(2)
     0089:        return vals
     0090:
     0091:    def frob_metadata(file, pkg, pattern, format, basename):
 *** 0092:        vals = extract_modinfo(file)
     0093:
     0094:        dvar = d.getVar(&apos;PKGD&apos;)
     0095:
     0096:        # If autoloading is requested, output /etc/modules-load.d/&lt;name&gt;.conf and append
File: &apos;/tmp/devtoolqa7pq7w2jz/core-copy/meta/classes-recipe/kernel-module-split.bbclass&apos;, lineno: 74, function: extract_modinfo
     0070:                raise msg
     0071:            cmd = &quot;%sobjcopy -j .modinfo -O binary %s %s&quot; % (d.getVar(&quot;HOST_PREFIX&quot;) or &quot;&quot;, tmpkofile, tmpfile)
     0072:        else:
     0073:            cmd = &quot;%sobjcopy -j .modinfo -O binary %s %s&quot; % (d.getVar(&quot;HOST_PREFIX&quot;) or &quot;&quot;, file, tmpfile)
 *** 0074:        subprocess.check_call(cmd, shell=True)
     0075:        # errors=&apos;replace&apos;: Some old kernel versions contain invalid utf-8 characters in mod descriptions (like 0xf6, &apos;ö&apos;)
     0076:        f = open(tmpfile, errors=&apos;replace&apos;)
     0077:        l = f.read().split(&quot;\000&quot;)
     0078:        f.close()
File: &apos;/usr/lib/python3.9/subprocess.py&apos;, lineno: 373, function: check_call
     0369:    if retcode:
     0370:        cmd = kwargs.get(&quot;args&quot;)
     0371:        if cmd is None:
     0372:            cmd = popenargs[0]
 *** 0373:        raise CalledProcessError(retcode, cmd)
     0374:    return 0
     0375:
     0376:
     0377:def check_output(*popenargs, timeout=None, **kwargs):
Exception: subprocess.CalledProcessError: Command &apos;x86_64-poky-linux-objcopy -j .modinfo -O binary /home/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-1192384/tmp/work/qemux86_64-poky-linux/linux-yocto/5.19.9+git999-r0/package/lib/modules/5.19.9-yocto-standard/kernel/sound/pci/oxygen/snd-oxygen-lib.ko /home/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-1192384/tmp/work/qemux86_64-poky-linux/linux-yocto/5.19.9+git999-r0/tmptdmd5vqh&apos; returned non-zero exit status 1.
ERROR: Logfile of failure stored in: /home/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-1192384/tmp/work/qemux86_64-poky-linux/linux-yocto/5.19.9+git999-r0/temp/log.do_package.2737236
NOTE: recipe linux-yocto-5.19.9+git999-r0: task do_package: Failed
ERROR: Task (/tmp/devtoolqa7pq7w2jz/core-copy/meta/recipes-kernel/linux/linux-yocto_5.19.bb:do_package) failed with exit code &apos;1&apos;



When I noticed this bug, the log was already gone from the worker.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95050</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2023-03-02 16:08:46 +0000</bug_when>
    <thetext>We need to ensure devtool is using the subprocess error wrapping to get a better error next time this happens</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99142</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-06-06 14:59:02 +0000</bug_when>
    <thetext>We believe the mtime caching issues in bitbake have resolved this problem.
Re-open if seen again.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>