<?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>12067</bug_id>
          
          <creation_ts>2017-09-08 09:11:38 +0000</creation_ts>
          <short_desc>Random basehash value changes during build</short_desc>
          <delta_ts>2017-09-25 14:58:52 +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>BitBake</product>
          <component>bitbake</component>
          <version>unspecified</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></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.4 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Johannes Schrimpf">johannes.schrimpf</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</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>76681</commentid>
    <comment_count>0</comment_count>
      <attachid>3996</attachid>
    <who name="Johannes Schrimpf">johannes.schrimpf</who>
    <bug_when>2017-09-08 09:11:38 +0000</bug_when>
    <thetext>Created attachment 3996
Diff file between hashed data during the build process.

While building my image, randomly basehash mismatch errors occur like:

ERROR: When reparsing /data/autobuilder/yocto-autobuilder/yocto-worker/var-installation/build/meta-be-swupdate/recipes-be/images/be-installation-image.bb.do_image_ext3, the basehash value changed from 9d50fc4aae9053b633624406ddd8590b to 14138e804a3545c0cea08518d59d4a03. The metadata is not deterministic and this needs to be fixed.

I wrote debug information in siggen.py that prints the hashed data in the beginning of the build and when the error occurs, and indeed the data changes. However these changes are only changes in order of some lines/variables, see attached diff file.

I went further into debugging the change in the the first part of the diff, which is only change of the line order, and I could track this down to d.getVar(task), which returns the part containing this line.

One explanation is that the variable really changes during the build process, but due to the randomly occurrence, my guess is that there may be some part in the code that does not return data in an deterministic way, for example an unordered dict or list.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77008</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2017-09-21 08:30:35 +0000</bug_when>
    <thetext>Does http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=69e97240b372c6aaf0a9eab82bc1361a23db996d fix this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77103</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2017-09-25 14:58:52 +0000</bug_when>
    <thetext>I&apos;m going to assume the above change fixes this, please reopen if not.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>3996</attachid>
            <date>2017-09-08 09:11:38 +0000</date>
            <delta_ts>2017-09-08 09:11:38 +0000</delta_ts>
            <desc>Diff file between hashed data during the build process.</desc>
            <filename>taskhash.txt</filename>
            <type>text/plain</type>
            <size>783</size>
            <attacher name="Johannes Schrimpf">johannes.schrimpf</attacher>
            
              <data encoding="base64">MmEzCj4gCWd6aXAgLWYgLTkgLWMgYmUtc3d1cGRhdGUtaW1hZ2UtdmFyLXNvbS1teDYtJHtEQVRF
VElNRX0ucm9vdGZzLmV4dDMgPiBiZS1zd3VwZGF0ZS1pbWFnZS12YXItc29tLW14Ni0ke0RBVEVU
SU1FfS5yb290ZnMuZ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