Skip to content
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

erlangR18: apply upstream patches to fix nondeterministic build failures #47202

Merged
merged 1 commit into from Sep 23, 2018

Conversation

andrew-d
Copy link
Contributor

@andrew-d andrew-d commented Sep 23, 2018

Motivation for this change

As per the following bug report, sometimes erts/start_scripts will fail to compile because of a Makefile ordering issue. Apply the upstream patches to fix this.
https://bugs.erlang.org/browse/ERL-241

This also fixes, at the very least, yaws.

/cc ZHF #45960

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

cc @the-kenny @sjmackenzie @couchemar @gleber

@xeji
Copy link
Contributor

xeji commented Sep 23, 2018

@GrahamcOfBorg build erlangR18

@GrahamcOfBorg
Copy link

Unexpected error: command failed with exit code 1 on aarch64-linux (full log)

Attempted: erlangR18

Partial log (click to expand)

                                 Dload  Upload   Total   Spent    Left  Speed
fixed-output derivation produced path '/nix/store/jf7z3w3d94xgvbp2n0rklglj9md4wf74-2f1a37f1011ff9d129bc35a6efa0ab937a2aa0e9.patch' with sha256 hash '0xfa6hzxh9d7qllkyidcgh57xrrx11w65y7s1hyg52alm06l6b9n' instead of the expected hash '19n9xskid4hgdswkf5g371fli0rf8ljkr3s6vdhhrpj9vyzb49nh'
100  1046    0  1046    0     0   6792      0 --:--:-- --:--:-- --:--:--  6792
fixed-output derivation produced path '/nix/store/pipyc4i96d9czd27c2zx50kmizpk5qvk-de8fe86f67591dd992bae33f7451523dab36e5bd.patch' with sha256 hash '1cj9fjhdng6yllajjm3gkk04ag9bwyb3n70hrb5nk6c292v8a45c' instead of the expected hash '0s3bmip9w3lp8rwhgx5m6b24lmny79l8qghscg0xkla5xkv6wl8f'
copying path '/nix/store/dj5fyl63nrzks40zy2601i772lxqjr4n-mesa-noglu-18.1.7-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/58x57p558inkagc41j7ray21pha1wnjn-libGL-1.0.0-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/pk2q8p61bc3s59cn1bz99warizq0qw1l-glu-9.0.0-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/r8yw54krcjfqar7g6ss2cm9gix8sd5n8-libGLU-combined' from 'https://cache.nixos.org'...
cannot build derivation '/nix/store/6yv0xh07sm9llwyg8ddmy3skdqb5hfds-erlang-18.3.4.8.drv': 2 dependencies couldn't be built
error: build of '/nix/store/6yv0xh07sm9llwyg8ddmy3skdqb5hfds-erlang-18.3.4.8.drv' failed

@GrahamcOfBorg
Copy link

Unexpected error: command failed with exit code 1 on x86_64-darwin (full log)

Attempted: erlangR18

Partial log (click to expand)

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   895    0   895    0     0   1609      0 --:--:-- --:--:-- --:--:--  1606
100  1046    0  1046    0     0   1874      0 --:--:-- --:--:-- --:--:--  1871
fixed-output derivation produced path '/nix/store/jf7z3w3d94xgvbp2n0rklglj9md4wf74-2f1a37f1011ff9d129bc35a6efa0ab937a2aa0e9.patch' with sha256 hash '0xfa6hzxh9d7qllkyidcgh57xrrx11w65y7s1hyg52alm06l6b9n' instead of the expected hash '19n9xskid4hgdswkf5g371fli0rf8ljkr3s6vdhhrpj9vyzb49nh'
fixed-output derivation produced path '/nix/store/pipyc4i96d9czd27c2zx50kmizpk5qvk-de8fe86f67591dd992bae33f7451523dab36e5bd.patch' with sha256 hash '1cj9fjhdng6yllajjm3gkk04ag9bwyb3n70hrb5nk6c292v8a45c' instead of the expected hash '0s3bmip9w3lp8rwhgx5m6b24lmny79l8qghscg0xkla5xkv6wl8f'
cannot build derivation '/nix/store/09j6gka2pbcx3zay3l32n9dc5f5g3hhc-erlang-18.3.4.8.drv': 2 dependencies couldn't be built
error: build of '/nix/store/09j6gka2pbcx3zay3l32n9dc5f5g3hhc-erlang-18.3.4.8.drv' failed

@GrahamcOfBorg
Copy link

Unexpected error: command failed with exit code 1 on x86_64-linux (full log)

Attempted: erlangR18

Partial log (click to expand)

building '/nix/store/g6f3kxrcn5s7p4pnmvfn0xsk4r9lc3zs-de8fe86f67591dd992bae33f7451523dab36e5bd.patch.drv'...

trying https://github.com/erlang/otp/commit/de8fe86f67591dd992bae33f7451523dab36e5bd.patch
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1046    0  1046    0     0   2759      0 --:--:-- --:--:-- --:--:--  2752
fixed-output derivation produced path '/nix/store/pipyc4i96d9czd27c2zx50kmizpk5qvk-de8fe86f67591dd992bae33f7451523dab36e5bd.patch' with sha256 hash '1cj9fjhdng6yllajjm3gkk04ag9bwyb3n70hrb5nk6c292v8a45c' instead of the expected hash '0s3bmip9w3lp8rwhgx5m6b24lmny79l8qghscg0xkla5xkv6wl8f'
copying path '/nix/store/jzm6jz0ba30igbd31bf5yjmn36y938c9-systemd-239-dev' from 'https://cache.nixos.org'...
cannot build derivation '/nix/store/jgdrgz49xwngvqclw7x289qw66vbimci-erlang-18.3.4.8.drv': 2 dependencies couldn't be built
error: build of '/nix/store/jgdrgz49xwngvqclw7x289qw66vbimci-erlang-18.3.4.8.drv' failed

@xeji
Copy link
Contributor

xeji commented Sep 23, 2018

hash mismatch.

As per the following bug report, sometimes erts/start_scripts will fail
to compile because of a Makefile ordering issue. Apply the upstream
patches to fix this.
  https://bugs.erlang.org/browse/ERL-241
@andrew-d andrew-d force-pushed the andrew/erlang-R18-build-failures branch from c164901 to a25def5 Compare September 23, 2018 08:08
@andrew-d
Copy link
Contributor Author

Ugh, ran into #41401 - forgot you couldn't nix-prefetch-url a patch.

@xeji - Mind trying that again? 😃

@xeji
Copy link
Contributor

xeji commented Sep 23, 2018

@GrahamcOfBorg build erlangR18

@xeji
Copy link
Contributor

xeji commented Sep 23, 2018

I don't use nix-prefetch-url at all but run the build with dummy hashes first and copy the correct hash from the error message.

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: erlangR18

Partial log (click to expand)

/nix/store/8ylms00abpc3r0i35azwz0ad92bdd30r-erlang-18.3.4.8/lib/erlang/erts-7.3.1.4/bin/start_erl.src: interpreter directive changed from "/bin/sh" to "/nix/store/z2pc6bbx9d1mwwahnds31a7nlvjbi9zr-bash-4.4-p23/bin/sh"
/nix/store/8ylms00abpc3r0i35azwz0ad92bdd30r-erlang-18.3.4.8/lib/erlang/erts-7.3.1.4/bin/erl: interpreter directive changed from "/bin/sh" to "/nix/store/z2pc6bbx9d1mwwahnds31a7nlvjbi9zr-bash-4.4-p23/bin/sh"
/nix/store/8ylms00abpc3r0i35azwz0ad92bdd30r-erlang-18.3.4.8/lib/erlang/lib/mnesia-4.13.4/examples/bench/bench.sh: interpreter directive changed from "/bin/sh" to "/nix/store/z2pc6bbx9d1mwwahnds31a7nlvjbi9zr-bash-4.4-p23/bin/sh"
/nix/store/8ylms00abpc3r0i35azwz0ad92bdd30r-erlang-18.3.4.8/lib/erlang/lib/inets-6.2.4.1/priv/bin/runcgi.sh: interpreter directive changed from "/bin/sh" to "/nix/store/z2pc6bbx9d1mwwahnds31a7nlvjbi9zr-bash-4.4-p23/bin/sh"
/nix/store/8ylms00abpc3r0i35azwz0ad92bdd30r-erlang-18.3.4.8/lib/erlang/lib/inets-6.2.4.1/examples/server_root/cgi-bin/printenv.sh: interpreter directive changed from "/bin/sh" to "/nix/store/z2pc6bbx9d1mwwahnds31a7nlvjbi9zr-bash-4.4-p23/bin/sh"
/nix/store/8ylms00abpc3r0i35azwz0ad92bdd30r-erlang-18.3.4.8/lib/erlang/lib/edoc-0.7.18/priv/edoc_generate: interpreter directive changed from "/bin/sh" to "/nix/store/z2pc6bbx9d1mwwahnds31a7nlvjbi9zr-bash-4.4-p23/bin/sh"
/nix/store/8ylms00abpc3r0i35azwz0ad92bdd30r-erlang-18.3.4.8/lib/erlang/lib/observer-2.1.2/priv/bin/cdv: interpreter directive changed from "/bin/sh " to "/nix/store/z2pc6bbx9d1mwwahnds31a7nlvjbi9zr-bash-4.4-p23/bin/sh"
/nix/store/8ylms00abpc3r0i35azwz0ad92bdd30r-erlang-18.3.4.8/lib/erlang/lib/observer-2.1.2/priv/bin/etop: interpreter directive changed from "/bin/sh " to "/nix/store/z2pc6bbx9d1mwwahnds31a7nlvjbi9zr-bash-4.4-p23/bin/sh"
/nix/store/8ylms00abpc3r0i35azwz0ad92bdd30r-erlang-18.3.4.8/lib/erlang/lib/webtool-0.9.1/priv/bin/start_webtool: interpreter directive changed from "/bin/sh " to "/nix/store/z2pc6bbx9d1mwwahnds31a7nlvjbi9zr-bash-4.4-p23/bin/sh"
/nix/store/8ylms00abpc3r0i35azwz0ad92bdd30r-erlang-18.3.4.8

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: erlangR18

Partial log (click to expand)

/nix/store/cs1wrlrmyfifgzj7flggnm6m0r25c4cl-erlang-18.3.4.8/lib/erlang/erts-7.3.1.4/bin/start: interpreter directive changed from "/bin/sh" to "/nix/store/fqm2x6kiay1q4vg7pqp4wp17bdijlyc3-bash-4.4-p23/bin/sh"
/nix/store/cs1wrlrmyfifgzj7flggnm6m0r25c4cl-erlang-18.3.4.8/lib/erlang/erts-7.3.1.4/bin/erl: interpreter directive changed from "/bin/sh" to "/nix/store/fqm2x6kiay1q4vg7pqp4wp17bdijlyc3-bash-4.4-p23/bin/sh"
/nix/store/cs1wrlrmyfifgzj7flggnm6m0r25c4cl-erlang-18.3.4.8/lib/erlang/erts-7.3.1.4/bin/start_erl.src: interpreter directive changed from "/bin/sh" to "/nix/store/fqm2x6kiay1q4vg7pqp4wp17bdijlyc3-bash-4.4-p23/bin/sh"
/nix/store/cs1wrlrmyfifgzj7flggnm6m0r25c4cl-erlang-18.3.4.8/lib/erlang/erts-7.3.1.4/bin/start.src: interpreter directive changed from "/bin/sh" to "/nix/store/fqm2x6kiay1q4vg7pqp4wp17bdijlyc3-bash-4.4-p23/bin/sh"
/nix/store/cs1wrlrmyfifgzj7flggnm6m0r25c4cl-erlang-18.3.4.8/lib/erlang/erts-7.3.1.4/bin/erl.src: interpreter directive changed from "/bin/sh" to "/nix/store/fqm2x6kiay1q4vg7pqp4wp17bdijlyc3-bash-4.4-p23/bin/sh"
checking for references to /build in /nix/store/cs1wrlrmyfifgzj7flggnm6m0r25c4cl-erlang-18.3.4.8...
wrong ELF type
wrong ELF type
wrong ELF type
/nix/store/cs1wrlrmyfifgzj7flggnm6m0r25c4cl-erlang-18.3.4.8

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: erlangR18

Partial log (click to expand)

/nix/store/2z503v8mq99x2l3i1zff41cmfs2bv5aw-erlang-18.3.4.8/lib/erlang/erts-7.3.1.4/bin/erl: interpreter directive changed from "/bin/sh" to "/nix/store/czx8vkrb9jdgjyz8qfksh10vrnqa723l-bash-4.4-p23/bin/sh"
/nix/store/2z503v8mq99x2l3i1zff41cmfs2bv5aw-erlang-18.3.4.8/lib/erlang/erts-7.3.1.4/bin/start: interpreter directive changed from "/bin/sh" to "/nix/store/czx8vkrb9jdgjyz8qfksh10vrnqa723l-bash-4.4-p23/bin/sh"
/nix/store/2z503v8mq99x2l3i1zff41cmfs2bv5aw-erlang-18.3.4.8/lib/erlang/bin/start_erl: interpreter directive changed from "/bin/sh" to "/nix/store/czx8vkrb9jdgjyz8qfksh10vrnqa723l-bash-4.4-p23/bin/sh"
/nix/store/2z503v8mq99x2l3i1zff41cmfs2bv5aw-erlang-18.3.4.8/lib/erlang/bin/erl: interpreter directive changed from "/bin/sh" to "/nix/store/czx8vkrb9jdgjyz8qfksh10vrnqa723l-bash-4.4-p23/bin/sh"
/nix/store/2z503v8mq99x2l3i1zff41cmfs2bv5aw-erlang-18.3.4.8/lib/erlang/bin/start: interpreter directive changed from "/bin/sh" to "/nix/store/czx8vkrb9jdgjyz8qfksh10vrnqa723l-bash-4.4-p23/bin/sh"
checking for references to /build in /nix/store/2z503v8mq99x2l3i1zff41cmfs2bv5aw-erlang-18.3.4.8...
wrong ELF type
wrong ELF type
wrong ELF type
/nix/store/2z503v8mq99x2l3i1zff41cmfs2bv5aw-erlang-18.3.4.8

@xeji xeji merged commit c987ed0 into NixOS:master Sep 23, 2018
@andrew-d andrew-d deleted the andrew/erlang-R18-build-failures branch September 23, 2018 09:02
xeji pushed a commit that referenced this pull request Sep 23, 2018
…res (#47202)

As per the following bug report, sometimes erts/start_scripts will fail
to compile because of a Makefile ordering issue. Apply the upstream
patches to fix this.
  https://bugs.erlang.org/browse/ERL-241

(cherry picked from commit c987ed0)
@andrew-d
Copy link
Contributor Author

@xeji - Thanks!

@xeji
Copy link
Contributor

xeji commented Sep 23, 2018

backported: 4862590

@xeji
Copy link
Contributor

xeji commented Sep 23, 2018

@andrew-d unfortunately it still fails in the latest Hydra evaluation: https://hydra.nixos.org/build/81833440 . This build os based on master d9f7d27 , which contains your fix. Please have a look.

@xeji
Copy link
Contributor

xeji commented Sep 23, 2018

The build succeeded with this patch on 18.09: https://hydra.nixos.org/build/81921310

So I guess it's still non-deterministic.

@andrew-d
Copy link
Contributor Author

andrew-d commented Sep 23, 2018

@andrew-d unfortunately it still fails in the latest Hydra evaluation: https://hydra.nixos.org/build/81833440 . This build os based on master d9f7d27 , which contains your fix. Please have a look.

I think that's a build timeout or something similar - I don't see any particular error message in the log - output just ends without any messages.

@xeji
Copy link
Contributor

xeji commented Sep 23, 2018

Right, the log looks like the build process suddenly died for whatever reason. Could be a transient problem on the specific build machine. Let's observe some more builds on Hydra and see what happens...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants