<?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>10929</bug_id>
          
          <creation_ts>2017-01-16 14:11:42 +0000</creation_ts>
          <short_desc>oe-selftest corrupts sstate cache</short_desc>
          <delta_ts>2017-06-14 21:23:40 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>QA/Testing</classification>
          <product>Build Testing</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>High</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>2.3 M3</target_milestone>
          
          <blocked>10035</blocked>
    
    <blocked>10874</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Richard Purdie">richard.purdie</reporter>
          <assigned_to name="Mariano Lopez">mariano.lopez</assigned_to>
          <cc>benjamin.esquivel</cc>
    
    <cc>joshuagloe</cc>
    
    <cc>juan.fernandox.ramos.frayle</cc>
    
    <cc>leonardo.sandoval.gonzalez</cc>
    
    <cc>mariano.lopez</cc>
          
          <qa_contact name="Jose Perez C">jose.perez.carranza</qa_contact>
          <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>69825</commentid>
    <comment_count>0</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2017-01-16 14:11:42 +0000</bug_when>
    <thetext>If you run oe-selftest, then try to &quot;bitbake core-image-sato -c populate_sdk_ext&quot;, it fails with unexpected setscene execution errors. This is because things get cleaned from the sstate cache by oe-selftest but the stamp files are left meaning the eSDK can&apos;t find the sstate files, leading to obtuse build failures.

The appoximate list of broken (removed) sstate is:
groff-native openssl cross-localedef-native db glibc-locale cryptodev-linux ptest-runner base-files libffi sqlite3 ncurses expat opkg-utils bzip2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69826</commentid>
    <comment_count>1</comment_count>
    <who name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</who>
    <bug_when>2017-01-16 16:14:58 +0000</bug_when>
    <thetext>this is a more general bug 10035. However, lets not mark this as duplicated because the latter needs to be divided into several ones, like this one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69918</commentid>
    <comment_count>2</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2017-01-18 23:57:27 +0000</bug_when>
    <thetext>I am re-routing this issue to the main triage.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69975</commentid>
    <comment_count>3</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2017-01-20 19:58:25 +0000</bug_when>
    <thetext>I can&apos;t seem to reproduce this issue, I will post my procedure here:

1. clone poky
2. init build environment (non memres)
3. execute a selftest --run-all-tests
4. execute a bitbake core-image-sato -c populate_sdk_ext
5. expect failure

I assume that the sstates that will get corrupted thus 5 would fail are the ones located at the build/sstate-cache but this is the point where my procedure might be wrong to reproduce the issue. RP, what am I missing?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70005</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2017-01-23 14:44:42 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; I can&apos;t seem to reproduce this issue, I will post my procedure here:
&gt; 
&gt; 1. clone poky
&gt; 2. init build environment (non memres)
&gt; 3. execute a selftest --run-all-tests
&gt; 4. execute a bitbake core-image-sato -c populate_sdk_ext
&gt; 5. expect failure
&gt; 
&gt; I assume that the sstates that will get corrupted thus 5 would fail are the
&gt; ones located at the build/sstate-cache but this is the point where my
&gt; procedure might be wrong to reproduce the issue. RP, what am I missing?

You&apos;re missing a &quot;bitbake core-image-sato -c populate_sdk_ext&quot; before running selftest.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70008</commentid>
    <comment_count>5</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2017-01-23 14:52:32 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; (In reply to comment #3)
&gt; &gt; I can&apos;t seem to reproduce this issue, I will post my procedure here:
&gt; &gt; 
&gt; &gt; 1. clone poky
&gt; &gt; 2. init build environment (non memres)
&gt; &gt; 3. execute a selftest --run-all-tests
&gt; &gt; 4. execute a bitbake core-image-sato -c populate_sdk_ext
&gt; &gt; 5. expect failure
&gt; &gt; 
&gt; &gt; I assume that the sstates that will get corrupted thus 5 would fail are the
&gt; &gt; ones located at the build/sstate-cache but this is the point where my
&gt; &gt; procedure might be wrong to reproduce the issue. RP, what am I missing?
&gt; 
&gt; You&apos;re missing a &quot;bitbake core-image-sato -c populate_sdk_ext&quot; before
&gt; running selftest.

thanks, retrying.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70055</commentid>
    <comment_count>6</comment_count>
      <attachid>3601</attachid>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2017-01-23 21:50:55 +0000</bug_when>
    <thetext>Created attachment 3601
find-10929.sh

I wrote this script and ran it on an opensuse system and did not show failures at the populate_sdk_ext task. I am running it on a fedora system but I suspect this can be seen at the autobuilder with more clarity so I&apos;ll try to run the test there as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70085</commentid>
    <comment_count>7</comment_count>
    <who name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</who>
    <bug_when>2017-01-24 16:25:20 +0000</bug_when>
    <thetext>*** Bug 10035 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70336</commentid>
    <comment_count>8</comment_count>
    <who name="Mariano Lopez">mariano.lopez</who>
    <bug_when>2017-02-01 15:51:14 +0000</bug_when>
    <thetext>After a conversation with Benjamin and Richard, the problem is as follows:

1. Start simultaneous builds along with selftest.
2. One of the builds will check for share states for X recipe.
3. Build found share states for X recipe.
4. selftest runs cleansstate task on recipe X.
5. Build tries to fetch share states for X recipe and fails.

So, the only way to do this is to avoid using cleansstate in selftest, it is needed to check for this task in selftest&apos;s tests and change all of them for something that perform the required test without deleting sstate.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70595</commentid>
    <comment_count>9</comment_count>
    <who name="Mariano Lopez">mariano.lopez</who>
    <bug_when>2017-02-09 16:32:15 +0000</bug_when>
    <thetext>Sent patch to the mailing list:

https://patchwork.openembedded.org/series/5239/#</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71045</commentid>
    <comment_count>10</comment_count>
    <who name="Mariano Lopez">mariano.lopez</who>
    <bug_when>2017-03-02 16:12:47 +0000</bug_when>
    <thetext>This has been solved in commit:

http://cgit.openembedded.org/openembedded-core/commit/?id=62c61087a10cc3b26fbff32c9e2efd1704a39724</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74172</commentid>
    <comment_count>11</comment_count>
    <who name="Juan Ramos">juan.fernandox.ramos.frayle</who>
    <bug_when>2017-06-14 21:23:40 +0000</bug_when>
    <thetext>Verified, tested with commit b6a1004c73820cff833f2b6f09d2432706f5447a, no SSTATES were corrupted after selftest</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>3601</attachid>
            <date>2017-01-23 21:50:55 +0000</date>
            <delta_ts>2017-01-23 21:50:55 +0000</delta_ts>
            <desc>find-10929.sh</desc>
            <filename>file_10929.txt</filename>
            <type>text/plain</type>
            <size>409</size>
            <attacher name="Benjamin Esquivel">benjamin.esquivel</attacher>
            
              <data encoding="base64">IyEvYmluL2Jhc2gNCg0KdGltZXN0YW1wPWBkYXRlICslWSVtJWQtJUglTWANCnRtcGRpcj1idWcx
MDkyOS0kdGltZXN0YW1wDQoNCmdpdCBjbG9uZSBnaXQ6Ly9naXQueW9jdG9wcm9qZWN0Lm9yZy9w
b2t5ICR0bXBkaXINCg0KcHVzaGQgJHRtcGRpcg0KLiAuL29lLWluaXQtYnVpbGQtZW52DQpiaXRi
YWtlLWxheWVycyBhZGQtbGF5ZXJzIC4uL21ldGEtc2VsZnRlc3QNCmJpdGJha2UgY29yZS1pbWFn
ZS1zYXRvIC1jIHBvcHVsYXRlX3Nka19leHQNCm9lLXNlbGZ0ZXN0IC0tcnVuLWFsbC10ZXN0cw0K
Yml0YmFrZSBjb3JlLWltYWdlLXNhdG8gLWMgcG9wdWxhdGVfc2RrX2V4dA0KIyB0aGlzIGlzIHdo
ZXJlIHRoZSBmYWlsdXJlIHNob3VsZCBvY2N1ciBtZW50aW9uaW5nIHRoZSBjb3JydXB0ZWQgc3N0
YXRlcw0KcG9wZA==
</data>

          </attachment>
      

    </bug>

</bugzilla>