<?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>10448</bug_id>
          
          <creation_ts>2016-10-18 07:27:59 +0000</creation_ts>
          <short_desc>Package files already existed at Publishing Artifacts step</short_desc>
          <delta_ts>2017-03-30 15:11:46 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>5</classification_id>
          <classification>Infrastructure</classification>
          <product>AutoBuilder</product>
          <component>autobuilder</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>x86_64</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>2.3 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Paul Eggleton">bluelightning</reporter>
          <assigned_to name="Joshua Lock">joshuagloe</assigned_to>
          <cc>infras.ab.watcher</cc>
    
    <cc>Infras.watcher</cc>
    
    <cc>pidge</cc>
    
    <cc>richard.purdie</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>67320</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-10-18 07:27:59 +0000</bug_when>
    <thetext>During the &quot;Publishing Artifacts&quot; step of the 2.2 rc4 build in nightly-arm64 a bunch of nativesdk deb packages apparently already existed at the destination which shouldn&apos;t be possible:

--------- snip ---------
cp: cannot create regular file &apos;/srv/www/vhosts/autobuilder.yoctoproject.org/pub/releases/yocto-2.2.rc4/deb/x86_64-nativesdk/nativesdk-xz-locale-it_5.2.2-r0.0_amd64.deb&apos;: File exists
cp: cannot create regular file &apos;/srv/www/vhosts/autobuilder.yoctoproject.org/pub/releases/yocto-2.2.rc4/deb/x86_64-nativesdk/nativesdk-xz-locale-de_5.2.2-r0.0_amd64.deb&apos;: File exists
cp: cannot create regular file &apos;/srv/www/vhosts/autobuilder.yoctoproject.org/pub/releases/yocto-2.2.rc4/deb/x86_64-nativesdk/nativesdk-xz-locale-vi_5.2.2-r0.0_amd64.deb&apos;: File exists
cp: cannot create regular file &apos;/srv/www/vhosts/autobuilder.yoctoproject.org/pub/releases/yocto-2.2.rc4/deb/x86_64-nativesdk/nativesdk-xz-doc_5.2.2-r0.0_amd64.deb&apos;: File exists
cp: cannot create regular file &apos;/srv/www/vhosts/autobuilder.yoctoproject.org/pub/releases/yocto-2.2.rc4/deb/x86_64-nativesdk/nativesdk-liblzma5_5.2.2-r0.0_amd64.deb&apos;: File exists
cp: cannot create regular file &apos;/srv/www/vhosts/autobuilder.yoctoproject.org/pub/releases/yocto-2.2.rc4/deb/x86_64-nativesdk/nativesdk-xz-dbg_5.2.2-r0.0_amd64.deb&apos;: File exists
cp: cannot create regular file &apos;/srv/www/vhosts/autobuilder.yoctoproject.org/pub/releases/yocto-2.2.rc4/deb/x86_64-nativesdk/nativesdk-xz-locale-pl_5.2.2-r0.0_amd64.deb&apos;: File exists
cp: cannot create regular file &apos;/srv/www/vhosts/autobuilder.yoctoproject.org/pub/releases/yocto-2.2.rc4/deb/x86_64-nativesdk/nativesdk-xz-locale-cs_5.2.2-r0.0_amd64.deb&apos;: File exists
cp: cannot create regular file &apos;/srv/www/vhosts/autobuilder.yoctoproject.org/pub/releases/yocto-2.2.rc4/deb/x86_64-nativesdk/nativesdk-xz_5.2.2-r0.0_amd64.deb&apos;: File exists
cp: cannot create regular file &apos;/srv/www/vhosts/autobuilder.yoctoproject.org/pub/releases/yocto-2.2.rc4/deb/x86_64-nativesdk/nativesdk-xz-dev_5.2.2-r0.0_amd64.deb&apos;: File exists
cp: cannot create regular file &apos;/srv/www/vhosts/autobuilder.yoctoproject.org/pub/releases/yocto-2.2.rc4/deb/x86_64-nativesdk/nativesdk-xz-locale-fr_5.2.2-r0.0_amd64.deb&apos;: File exists
--------- snip ---------

Link to the log:

https://autobuilder.yoctoproject.org/main/builders/nightly-arm64/builds/586/steps/Publishing%20Artifacts/logs/stdio

The previous build was interrupted which may have something to do with it, but still that shouldn&apos;t have caused this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67440</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2016-10-21 07:07:42 +0000</bug_when>
    <thetext>I have a suspicion that multiple builds write this same set of artefacts. If one writes them, then another, one will simply overwrite the other. If two write them at the same time, I suspect one set of cp commmands will error as the file didn&apos;t exist when it started the operation but does exist part way through.

Some simple tests with some cp commands running in parallel will likely confirm how cp behaves in these cases.

A -n option to the cp commands on the autobuilder will likely expose the full extent of the problem (but will make it fail badly).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68965</commentid>
    <comment_count>2</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-12-08 22:44:24 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; I have a suspicion that multiple builds write this same set of artefacts. If
&gt; one writes them, then another, one will simply overwrite the other. If two
&gt; write them at the same time, I suspect one set of cp commmands will error as
&gt; the file didn&apos;t exist when it started the operation but does exist part way
&gt; through.

I suspect you&apos;re right. All of the architecture builders (nightly-arm, nightly-arm64, nightly-mips, nightly-mips64, nightly-ppc, nightly-x86-64, nightly-x86) and nightly-world publish the package artefacts for each package-manager backend, if two of those happen to be scheduled to PublishArtifacts at the same time we could easily run into this issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71206</commentid>
    <comment_count>3</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2017-03-13 14:38:38 +0000</bug_when>
    <thetext>We haven&apos;t seen this for a while, but let&apos;s push to M4. We understand what&apos;s occurring but I don&apos;t have a clean solution yet.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71912</commentid>
    <comment_count>4</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2017-03-30 15:11:46 +0000</bug_when>
    <thetext>We haven&apos;t seen this for a while. As we know what the issue is we&apos;ll aim to resolve it as part of bug #10437.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>