-
-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
runtime build may not be reproducible on Mac #609
Comments
If anyone has a Mac machine, please try to reproduce via |
I think my guess is right. With
Note how we obfuscated the declaration of |
If the syscall revert doesn't do the trick, then I think the macos-latest switch from 11 to 12 could be the culprit: https://github.blog/changelog/2022-10-03-github-actions-jobs-running-on-macos-latest-are-now-running-on-macos-12/ That changed the versions of a lot of versions in the native toolchain, so it could have introduced problems. It looks like it was rolled out for us in mid October, which lines up with the first failure - assuming we got lucky for a few times until we got the first failure. |
Running the test above on a Catalina (10.15.7) install with go1.19.3 does not fail, but on Monterey (12.6.1) does. I don't have an 11 installation to test on. |
@kortschak thanks, that's interesting. Can you reproduce repeatedly? I wonder if it only happens once on a clean install of Go, given that the standard library comes pre-built. Perhaps it becomes different once re-built for the first time. |
In the hopes that it fixes the sporadic gogarble.txtar failures on Mac, where rebuilding runtime sometimes leads to a different binary. For #609.
In the hopes that it fixes the sporadic gogarble.txtar failures on Mac, where rebuilding runtime sometimes leads to a different binary. For #609.
In the hopes that it fixes the sporadic gogarble.txtar failures on Mac, where rebuilding runtime sometimes leads to a different binary. For #609.
In the hopes that it fixes the sporadic gogarble.txtar failures on Mac, where rebuilding runtime sometimes leads to a different binary. For #609.
In the hopes that it fixes the sporadic gogarble.txtar failures on Mac, where rebuilding runtime sometimes leads to a different binary. For #609.
Nope, obfuscating the syscall package is not the problem. I reverted that piece in 7879624, and fired off five CI runs by force-pushing to ci-test (which you can see above), and one already failed in the same way. |
I was able to get the failure consistently on the Monterey (just rechecked this twice) and never on the Catalina. Will the bincmp outputs be useful for you? |
Yes, if anything to check that they are the same as the original post.
Huh, on CI it just fails about a third of the time. |
If you could spare the time - could you check whether v0.7.2 has the same test failure? If not, could you bisect to find which commit introduces the problem? Hopefully the bisection shouldn't be too costly if you can reproduce via |
Aha! I just pushed v0.7.2 (with reduced CI to save time) to ci-test, and it failed: https://github.com/burrowers/garble/actions/runs/3492436397/jobs/5846215678 So it seems like the breakage was indeed the MacOS bump to version 12, and not anything that we changed recently in garble. So, either MacOS 12 somehow broke Go (e.g. its build system), or garble does something that only happens to break on MacOS 12 and later - and so we never noticed before. |
Since it's not yet clear whether it's a bug on garble's end, and the regression was the MacOS version bump and not any recent change we did. For burrowers#609.
Since it's not yet clear whether it's a bug on garble's end, and the regression was the MacOS version bump and not any recent change we did. For #609.
I've re-enabled macos-latest and I haven't seen any errors on the 20 or so builds CI has done on Mac since. Fingers crossed that whatever it was got fixed. There's a small chance that it was related to the |
Whatever it was, it appears to be fixed :) |
Womp womp, not fixed at all. Happened again with Go 1.21.1 on MacOS 12.6.9: https://github.com/burrowers/garble/actions/runs/6284752892/job/17066435869
|
CI ran into the failure again; reopened burrowers#609 for now.
CI ran into the failure again; reopened burrowers#609 for now.
CI ran into the failure again; reopened #609 for now.
We've been seeing
gogarble.txt
failures in CI on Mac for a couple of weeks now. They happen with Go 1.19.xI was finally able to grab the two binaries which should be equal but are not, attached below. Here is the start of their diffoscope with LLVM installed:
It looks like, for some reason, the original build dynamically links against libc, but the rebuild does not. I'm not sure if msgSend (presumably from
//go:cgo_import_dynamic libc_sendmsg sendmsg "libc.so"
in Go's standard library) is relevant here, but it appears to be the only string difference as well.Here is the last build log plus the diffed files:
Some observations:
GOOS != "darwin"
line, and it seems fairly innocent.My current best guess is that we broke reproducibility on Darwin with 7c28663. The syscall package is quite special as it does a log of linker directive magic, like the
//go:cgo_import_dynamic
I showed above. We might be obfuscating those names, but we're definitely not touching those directives - we only update the ones we explicitly support, like//go:linkname
.The text was updated successfully, but these errors were encountered: