<?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>13946</bug_id>
          
          <creation_ts>2020-06-15 08:13:55 +0000</creation_ts>
          <short_desc>Intermittent FileNotFoundError during perl do_package_write_ipk on autobuilder</short_desc>
          <delta_ts>2020-08-13 14:49:46 +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>devtools / tool chain</component>
          <version>3.1</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>backport 3.1 AB-INT</status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>3.2 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Steve Sakoman">steve</reporter>
          <assigned_to name="Joshua Watt">JPEWhacker</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>ross.burton</cc>
    
    <cc>tim.orling</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>87482</commentid>
    <comment_count>0</comment_count>
    <who name="Steve Sakoman">steve</who>
    <bug_when>2020-06-15 08:13:55 +0000</bug_when>
    <thetext>Typically seen in oe-selftest, two recent examples:

https://errors.yoctoproject.org/Errors/Details/416411/
https://errors.yoctoproject.org/Errors/Details/416412/

ERROR: perl-5.30.1-r0 do_package_write_ipk: Fatal errors occurred in subprocesses:
[Errno 2] No such file or directory: &apos;/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/build-st-48585/tmp/work/core2-64-poky-linux/perl/5.30.1-r0/packages-split/perl-module-x86-64-linux-storable&apos;: Traceback (most recent call last):
  File &quot;/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/meta/lib/oe/utils.py&quot;, line 280, in run
    ret = self._target(*self._args, **self._kwargs)
  File &quot;/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/meta/classes/package_ipk.bbclass&quot;, line 103, in ipk_write_pkg
    os.chdir(root)
FileNotFoundError: [Errno 2] No such file or directory: &apos;/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/build-st-48585/tmp/work/core2-64-poky-linux/perl/5.30.1-r0/packages-split/perl-module-x86-64-linux-storable&apos;


ERROR: Logfile of failure stored in: /home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/build-st-48585/tmp/work/core2-64-poky-linux/perl/5.30.1-r0/temp/log.do_package_write_ipk.4708
NOTE: recipe perl-5.30.1-r0: task do_package_write_ipk: Failed</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87493</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2020-06-16 13:08:26 +0000</bug_when>
    <thetext>The perl-module-x86-64-linux-* modules should never be created in the first place. I have a patch out for review which fixes that:

diff --git a/meta/recipes-devtools/perl/perl_5.30.2.bb b/meta/recipes-devtools/perl/perl_5.30.2.bb
index 26138ea9e5..804520d885 100644
--- a/meta/recipes-devtools/perl/perl_5.30.2.bb
+++ b/meta/recipes-devtools/perl/perl_5.30.2.bb
@@ -306,7 +306,7 @@ python split_perl_packages () {
     do_split_packages(d, libdir, r&apos;Module/([^\/]*)\.pm&apos;, &apos;${PN}-module-%s&apos;, &apos;perl module %s&apos;, recursive=True, allow_dirs=False, match_path=True, prepend=False)
     do_split_packages(d, libdir, r&apos;Module/([^\/]*)/.*&apos;, &apos;${PN}-module-%s&apos;, &apos;perl module %s&apos;, recursive=True, allow_dirs=False, match_path=True, prepend=False)
     do_split_packages(d, libdir, r&apos;.*linux/([^\/].*)\.(pm|pl|e2x)&apos;, &apos;${PN}-module-%s&apos;, &apos;perl module %s&apos;, recursive=True, allow_dirs=False, match_path=True, prepend=False)
-    do_split_packages(d, libdir, r&apos;(^(?!(CPAN\/|CPANPLUS\/|Module\/|unicore\/)[^\/]).*)\.(pm|pl|e2x)&apos;, &apos;${PN}-module-%s&apos;, &apos;perl module %s&apos;, recursive=True, allow_dirs=False, match_path=True, prepend=False)
+    do_split_packages(d, libdir, r&apos;(^(?!(CPAN\/|CPANPLUS\/|Module\/|unicore\/|.*linux\/)[^\/]).*)\.(pm|pl|e2x)&apos;, &apos;${PN}-module-%s&apos;, &apos;perl module %s&apos;, recursive=True, allow_dirs=False, match_path=True, prepend=False)
 
     # perl-modules should recommend every perl module, and only the
     # modules. Don&apos;t attempt to use the result of do_split_packages() as some


however, this does not explain why the storable module is present in some builds and not others. The only way that can be explained is if

/usr/lib64/perl5/5.30.2/Storable.pm

somehow sometimes is installed as:

/usr/lib64/perl5/5.30.2/x86_64-linux/Storable.pm

but I cannot see how that is happening at a look through the perl build system. It could be some kind of host system &quot;contamination&quot; but I can&apos;t see what/where.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87517</commentid>
    <comment_count>2</comment_count>
    <who name="Joshua Watt">JPEWhacker</who>
    <bug_when>2020-06-18 08:21:53 +0000</bug_when>
    <thetext>It&apos;s probably worth adding a check in the recipe to specifically look for cases where this file gets created and fail the build instead of producing bad sstate</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87888</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2020-08-06 08:14:10 +0000</bug_when>
    <thetext>Did a build of perl on my arm64 box for an arm64 target:

perl-module-storable:
        /usr/lib/perl5/5.32.0/aarch64-linux/Storable.pm</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87889</commentid>
    <comment_count>4</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2020-08-06 08:19:43 +0000</bug_when>
    <thetext>Is the cause that sometimes there is a companion .so and sometimes not?

For me:

perl-module-storable:
        /usr/lib/perl5/5.32.0/aarch64-linux/Storable.pm
        /usr/lib/perl5/5.32.0/aarch64-linux/auto/Storable/Storable.so

So the aarch64-linux bit is appropriate if there&apos;s also a .so.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87893</commentid>
    <comment_count>5</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2020-08-06 14:58:36 +0000</bug_when>
    <thetext>I think I may have the comment backwards and I meant:

&quot;&quot;&quot;
/usr/lib64/perl5/5.30.2/x86_64-linux/Storable.pm

somehow sometimes is installed as:

/usr/lib64/perl5/5.30.2/Storable.pm
&quot;&quot;&quot;

since my local build has &quot;/5.30.2/x86_64-linux/Storable.pm&quot; as does everyone elses.

The test we should perhaps add is to detect if /usr/lib64/perl5/5.30.2/Storable.pm ever is installed and error if so as that is the build we need to find if it happens.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87909</commentid>
    <comment_count>6</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2020-08-11 09:54:20 +0000</bug_when>
    <thetext>Has this happened recently?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87918</commentid>
    <comment_count>7</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2020-08-12 13:56:18 +0000</bug_when>
    <thetext>If it did, it would no longer show up due to my other fix. This is why I&apos;d like to add the sanity test before we close this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87920</commentid>
    <comment_count>8</comment_count>
    <who name="Joshua Watt">JPEWhacker</who>
    <bug_when>2020-08-12 17:39:09 +0000</bug_when>
    <thetext>https://lists.openembedded.org/g/openembedded-core/message/141421 should add a check for the invalid state at do_install()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87928</commentid>
    <comment_count>9</comment_count>
    <who name="Joshua Watt">JPEWhacker</who>
    <bug_when>2020-08-13 08:04:33 +0000</bug_when>
    <thetext>The patch will prevent this issue from occurring silently, so we can close this. If the issue occurs again, a new bug should be opened.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87943</commentid>
    <comment_count>10</comment_count>
    <who name="Steve Sakoman">steve</who>
    <bug_when>2020-08-13 14:49:46 +0000</bug_when>
    <thetext>I added Joshua&apos;s patch to my dunfell test builds and got this error twice: on oe-selftest-centos and oe-selftest-fedora.  Both oe-selftest-ubuntu and oe-selftest-debian were successful.

https://autobuilder.yoctoproject.org/typhoon/#/builders/79/builds/1245

https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/1229

I&apos;ll open a new bug too</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>