Bug 12067

Summary: Random basehash value changes during build
Product: [Build System, Metadata & Runtime] BitBake Reporter: Johannes Schrimpf <johannes.schrimpf>
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: poky.bs.watcher, poky.watcher, randy.macleod
Version: unspecified   
Target Milestone: 2.4 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
Diff file between hashed data during the build process. none

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.