For the Tor Browser 7.5a2 release, as we don't have time to fix this bug for this release, we will be using the 1ee0dd2a0b228988e22c663d62b696b23a6ac48dc742a57dfa8f854aa3992bc3 version of snowflake-client (which was also the version used in the previous alpha releases).
The difference is different ordering of some symbols/path in the snowflake-client binary. Notice how (except for cgo-gcc-prolog), it's different orderings of three blocks, color coded below.
Notice also that each block contains a /tmp/go-buildXXXXXXXXX string. These come from the snowflake build descriptor: the XXXXXXXXX overwrites a random number. What I suspect is happening is, the go compiler is generating three distinct random /tmp/go-buildXXXXXXXXX paths and sorting the blocks on them; then the build descriptor overwrites them all. Therefore each build randomly gets one of the six possible permutations.
The overwriting is a workaround for the upstream Go bug #9206, which is now marked closed. The first thing I would try is upgrading to a newer Go and seeing if it just gets fixed.
Trac: Owner: N/Ato tbb-team Priority: High to Very High Status: new to assigned Cc: tbb-team, dcf, arthuredelstein, arlolra to dcf, arthuredelstein, arlolra
I did several builds with [comment:7 boklm's go1.11 patch] and analyzed the differences.
Now, there are no /tmp/go-build000000000 paths anymore (where 000000000 stands for random digits), but there is a single /tmp/go-link-000000000/go.o. This shouldn't be a problem, because the sed substitution rewrites it to /tmp/go-link-XXXXXXXXX/go.o and there is only one so there is no problem with ordering.
But there's another difference in the binaries, the Go build ID. Here are sample values that are baked into the binary:
Go build ID: "kTjwWGrY9n3mGwOUpwVM/N2WdKU5WHR85aFCEJdn9/aRTcrk1SBq_sas7IMHGu/naljN2FzcmFC20pFl5NO"Go build ID: "kTjwWGrY9n3mGwOUpwVM/N2WdKU5WHR85aFCEJdn9/aRTcrk1SBq_sas7IMHGu/XQTshh9tsXMqYLXM55kx"Go build ID: "kTjwWGrY9n3mGwOUpwVM/N2WdKU5WHR85aFCEJdn9/aRTcrk1SBq_sas7IMHGu/Etnddau3jLCah3D-CG_-"
I found some documentation that says the build ID is, in part, a hash of all the input filenames. So I suspect it's including the random /tmp/go-link-000000000/go.o in the hash, because the build ID was different in all 9 builds I did.
One option is just to do another sed substitution on the build ID. But before that, I'm going to try building with go1.10 to see if this is a new bug introduced in go1.11.
It updates to go1.11.1. This update removed all the /tmp/go-build000000000 paths that we previously had to overwrite. However it left a single /tmp/go-link-000000000/go.o path. This path was also affecting the Go build ID (a hash of the build inputs), so it couldn't be fixed just by overwriting. However, I found a -tmpdir flag that lets us replace the random path with a static path, and that fixed it.
There is still a reproducibility problem, which is the gzip timestamp (bytes 4, 5, 6, 7) in the tar.gz output file differ across builds. I.e., the complete diffoscope output is
--- bug_27827/tmpdir/snowflake.tar.gz.1+++ bug_27827/tmpdir/snowflake.tar.gz.2├── metadata│ @@ -1 +1 @@│ -gzip compressed data, last modified: Wed Oct 17 16:30:51 2018, from Unix│ +gzip compressed data, last modified: Wed Oct 17 16:34:52 2018, from Unix
I'm guessing that this is some other problem unrelated to go or snowflake.
Sorry for not checking the linux build. I'll have a little time to look at this on Tuesday, but if I can't figure it out then, it'll be another week before I can look at it.
Please see bug_27827_v2. The difference is that now we set -D_GLIBCXX_USE_CXX11_ABI=1 in snowflake/build, just like in go-webrtc/config. (The error message in comment:12 was caused by incompatible ABIs; i.e. std::string versus std::__cxx11::basic_string.) I don't know why we need to set it in snowflake/build now (or alternatively, why we didn't have to set it with go1.9).
Trac: Status: reopened to needs_review Keywords: TorBrowserTeam201810 deleted, TorBrowserTeam201810R added
Thanks. Works now on my build machines. Merged to master (commit 1ca5a195c785f70cac791117a4e12d49482a206f and 28abf57bd5bd307262741ac679a80e98aa389d20).
Trac: Status: needs_review to closed Resolution: N/Ato fixed