Bug 12067 - Random basehash value changes during build
Summary: Random basehash value changes during build
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.4 M4
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-09-08 09:11 UTC by Johannes Schrimpf
Modified: 2017-09-25 14:58 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
Diff file between hashed data during the build process. (783 bytes, text/plain)
2017-09-08 09:11 UTC, Johannes Schrimpf
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Schrimpf 2017-09-08 09:11:38 UTC
Created attachment 3996 [details]
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.
Comment 2 Richard Purdie 2017-09-25 14:58:52 UTC
I'm going to assume the above change fixes this, please reopen if not.