dfinity / motoko

Simple high-level language for writing Internet Computer canisters
Apache License 2.0
510 stars 97 forks source link

Follow up on why the release action failed on macOS (`0.6.13`) #2912

Closed ggreif closed 2 years ago

ggreif commented 2 years ago

We had a hiccup with the macOS-sided release action on GitHub. It failed with

copying path '/nix/store/0x2lxbjgbfddmgq4wpwbxza90jdmvmhp-nixpkgs-mozilla-src' from 'https://ic-hs-test.cachix.org'...
/Users/runner/work/_temp/fd74e0ed-0437-4954-91c1-4a4641c4fb61.sh: line 2:  2796 Segmentation fault: 11  nix-build --max-jobs 1 --argstr releaseVersion 0.6.13 -A moc -A mo-ide -A mo-doc -A js.moc -A js.moc_interpreter
Error: Process completed with exit code 139.

See https://github.com/dfinity/motoko/runs/4264083664.

So a quick-fix was installed: #2911.

We have to find out where the problem lies and how to fix it for good.

We could also run the building part of the release action (without the upload) on each master branch build to get an early warning next time.

ggreif commented 2 years ago

2913 was created to debug things a bit more. The build reliably fails on macOS with nix-2.4, GC_DONT_GC: 1 is needed. (It just has to be present, the value seems to not matter.)

ggreif commented 2 years ago

I have locally just upgraded to nix-2.4 on this Mac. I get:

[nix-shell:~/motoko]$ nix-build -A moc -A mo-ide -A mo-doc -A js.moc -A js.moc_interpreter
Segmentation fault: 11

So we have a repro. Prefixing the command with env GC_DONT_GC=1 makes the problem go away.

It also goes away if I reduce the 5 attributes to any 4 :-)

Running nix-instantiate -A moc -A mo-ide -A mo-doc -A js.moc -A js.moc_interpreter also works.

ggreif commented 2 years ago
$ nix --version
nix (Nix) 2.4
ggreif commented 2 years ago
$ nix --version
nix (Nix) 2.8.1

The repro recipe seems to work okay.

GC_DONT_GC is eliminated.

Closing.