fix: make nvattest builds reproducible#813
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Root cause
Two independent clean dstack OS builds produced different
/usr/bin/nvattestand/usr/lib/libnvat.so.1.2.2. Their executable code, read-only data, relocations and writable data were identical; only dynamic-string ordering, debug links and GNU build IDs differed.regorus/bindings/ffidoes not commit aCargo.lock, so clean builds performed time-dependent dependency resolution. The observed builds selectedsyn3.0.2 and 3.0.3 respectively. That changed proc-macro build inputs and ultimately ELF string-table ordering/build IDs.Verification
Two independent
mc:prod:nvattestcleansstate rebuilds after this fix produced byte-identical files:nvattest:32c954ab703d37b3ab6594f54997083ac5f2db4b3f82b372c01eef1abb3d98a1libnvat.so.1.2.2:2c8c1104fa0ab4f68dd96319d2040d6a303f00055cd9026c9637948ac3982ffdRebuilding both production rootfs images then produced byte-identical outputs:
55e0121dfa0f44a3a5dfba69dd7d49fa0c101dcff8156eb2826d1a1d237fc99153616e21428f956f1782597ced25bdbe3233e37a0575ad41f566b69f90f8608f8ea8229ec9fd8fb105ebb4e327a5d71c83c1571ea28ecf1346a4d31bdbb51921