Elixir build has an undeterministic build error

  • Done
  • quality assurance status badge
Details
3 participants
  • nee
  • Pjotr Prins
  • zimoun
Owner
unassigned
Submitted by
nee
Severity
normal
N
(address . bug-guix@gnu.org)
5347a11e-de40-486f-c24d-2ff4efb10424@cock.li
Hello, this has already mentioned in another bug report

The built of Elixir sometimes fails while compiling
'lib/elixir/lib/system.ex' with the error message:

Toggle quote (2 lines)
> ** (exit) :epipe

See appended build log. I found the only other mention of the error on
the guix mailing list when elixir was first added:


It was suspected to be related to high memory usage / getting into swap.
I ran the build on two computers with 6GB and 16GB ram and still got it
on both, so I don't think it's ram related.

* What it might be:
One single time I got a different error message for the same file which
mentioned git (see detailed error attachment).
The file lib/elixir/lib/system.ex has a macro that calls git. Also this
bug seems to appear nowhere outside of guix, so it might be related.
starting phase `build'
==> elixir (compile)
Compiled src/elixir_parser.yrl
Compiled src/elixir_sup.erl
Compiled src/elixir_def.erl
Compiled src/elixir_quote.erl
Compiled src/elixir_erl_clauses.erl
Compiled src/elixir_utils.erl
Compiled src/elixir_env.erl
Compiled src/elixir_overridable.erl
Compiled src/elixir_erl_pass.erl
Compiled src/elixir_interpolation.erl
Compiled src/elixir_aliases.erl
Compiled src/elixir_erl_compiler.erl
Compiled src/elixir_code_server.erl
Compiled src/elixir_lexical.erl
Compiled src/elixir_clauses.erl
Compiled src/elixir.erl
Compiled src/elixir_rewrite.erl
Compiled src/elixir_dispatch.erl
Compiled src/elixir_compiler.erl
Compiled src/elixir_erl_for.erl
Compiled src/elixir_bitstring.erl
Compiled src/elixir_bootstrap.erl
Compiled src/elixir_expand.erl
Compiled src/elixir_erl_try.erl
Compiled src/elixir_import.erl
Compiled src/elixir_map.erl
Compiled src/elixir_tokenizer.erl
Compiled src/elixir_erl_var.erl
Compiled src/elixir_erl.erl
Compiled src/elixir_errors.erl
Compiled src/elixir_module.erl
Compiled src/elixir_fn.erl
Compiled src/elixir_config.erl
Compiled src/elixir_locals.erl
Compiled src/elixir_parser.erl
==> bootstrap (compile)
Compiled lib/elixir/lib/kernel.ex
Compiled lib/elixir/lib/macro/env.ex
Compiled lib/elixir/lib/keyword.ex
Compiled lib/elixir/lib/module.ex
Compiled lib/elixir/lib/list.ex
Compiled lib/elixir/lib/macro.ex
Compiled lib/elixir/lib/code.ex
Compiled lib/elixir/lib/module/locals_tracker.ex
Compiled lib/elixir/lib/kernel/typespec.ex
Compiled lib/elixir/lib/kernel/utils.ex
Compiled lib/elixir/lib/behaviour.ex
warning: erlang:get_stacktrace/0 used in the wrong part of 'try' expression. (Use it in the block between 'catch' and 'end'.)
/tmp/guix-build-elixir-1.5.2.drv-0/elixir-1.5.2/lib/elixir/lib/exception.ex:1150

Compiled lib/elixir/lib/exception.ex
Compiled lib/elixir/lib/protocol.ex
Compiled lib/elixir/lib/stream/reducers.ex
Compiled lib/elixir/lib/enum.ex
Compiled lib/elixir/lib/inspect/algebra.ex
Compiled lib/elixir/lib/inspect.ex
Compiled lib/elixir/lib/range.ex
Compiled lib/elixir/lib/regex.ex
Compiled lib/elixir/lib/string.ex
Compiled lib/elixir/lib/string/chars.ex
Compiled lib/elixir/lib/io.ex
Compiled lib/elixir/lib/path.ex
Compiled lib/elixir/lib/file.ex
Compiled lib/elixir/lib/system.ex
Compiled lib/elixir/lib/kernel/cli.ex
Compiled lib/elixir/lib/kernel/error_handler.ex
Compiled lib/elixir/lib/kernel/parallel_compiler.ex
Compiled lib/elixir/lib/kernel/lexical_tracker.ex
==> elixir (compile)
warning: behaviour Enumerable is undefined
lib/calendar/date_range.ex:21

warning: behaviour Inspect is undefined
lib/calendar/date_range.ex:81

warning: behaviour String.Chars is undefined
lib/calendar/date.ex:582

warning: behaviour Inspect is undefined
lib/calendar/date.ex:588

warning: behaviour String.Chars is undefined
lib/calendar/time.ex:476

warning: behaviour Inspect is undefined
lib/calendar/time.ex:482

warning: behaviour String.Chars is undefined
lib/calendar/datetime.ex:473

warning: behaviour Inspect is undefined
lib/calendar/datetime.ex:482

warning: behaviour String.Chars is undefined
lib/calendar/naive_datetime.ex:677

warning: behaviour Inspect is undefined
lib/calendar/naive_datetime.ex:684

warning: erlang:get_stacktrace/0 used in the wrong part of 'try' expression. (Use it in the block between 'catch' and 'end'.)
lib/exception.ex:1150

warning: use Dict is deprecated, use the Map module for working with maps or the Keyword module for working with keyword lists
lib/hash_dict.ex:11


== Compilation error in file lib/system.ex ==
** (exit) :epipe

make: *** [Makefile:81: lib/elixir/ebin/Elixir.Kernel.beam] Error 1
phase `build' failed after 67.5 seconds
builder for `/gnu/store/s9d2icsm6aniyhpscgfphb1z879b4wbc-elixir-1.5.2.drv' failed with exit code 1
@ build-failed /gnu/store/s9d2icsm6aniyhpscgfphb1z879b4wbc-elixir-1.5.2.drv - 1 builder for `/gnu/store/s9d2icsm6aniyhpscgfphb1z879b4wbc-elixir-1.5.2.drv' failed with exit code 1
guix build: error: build failed: build of `/gnu/store/s9d2icsm6aniyhpscgfphb1z879b4wbc-elixir-1.5.2.drv' failed
starting phase `build'
==> elixir (compile)
Compiled src/elixir_parser.yrl
Compiled src/elixir_rewrite.erl
Compiled src/elixir_erl_var.erl
Compiled src/elixir_code_server.erl
Compiled src/elixir_erl_compiler.erl
Compiled src/elixir_compiler.erl
Compiled src/elixir_bitstring.erl
Compiled src/elixir_erl.erl
Compiled src/elixir_lexical.erl
Compiled src/elixir_fn.erl
Compiled src/elixir_overridable.erl
Compiled src/elixir_erl_for.erl
Compiled src/elixir_utils.erl
Compiled src/elixir_module.erl
Compiled src/elixir_dispatch.erl
Compiled src/elixir_erl_try.erl
Compiled src/elixir_erl_clauses.erl
Compiled src/elixir_import.erl
Compiled src/elixir_sup.erl
Compiled src/elixir_bootstrap.erl
Compiled src/elixir_tokenizer.erl
Compiled src/elixir_locals.erl
Compiled src/elixir.erl
Compiled src/elixir_def.erl
Compiled src/elixir_config.erl
Compiled src/elixir_env.erl
Compiled src/elixir_interpolation.erl
Compiled src/elixir_map.erl
Compiled src/elixir_quote.erl
Compiled src/elixir_expand.erl
Compiled src/elixir_aliases.erl
Compiled src/elixir_errors.erl
Compiled src/elixir_clauses.erl
Compiled src/elixir_erl_pass.erl
Compiled src/elixir_parser.erl
==> bootstrap (compile)
Compiled lib/elixir/lib/kernel.ex
Compiled lib/elixir/lib/macro/env.ex
Compiled lib/elixir/lib/keyword.ex
Compiled lib/elixir/lib/module.ex
Compiled lib/elixir/lib/list.ex
Compiled lib/elixir/lib/macro.ex
Compiled lib/elixir/lib/code.ex
Compiled lib/elixir/lib/module/locals_tracker.ex
Compiled lib/elixir/lib/kernel/typespec.ex
Compiled lib/elixir/lib/kernel/utils.ex
Compiled lib/elixir/lib/behaviour.ex
warning: erlang:get_stacktrace/0 used in the wrong part of 'try' expression. (Use it in the block between 'catch' and 'end'.)
/tmp/guix-build-elixir-1.5.2.drv-0/elixir-1.5.2/lib/elixir/lib/exception.ex:1150

Compiled lib/elixir/lib/exception.ex
Compiled lib/elixir/lib/protocol.ex
Compiled lib/elixir/lib/stream/reducers.ex
Compiled lib/elixir/lib/enum.ex
Compiled lib/elixir/lib/inspect/algebra.ex
Compiled lib/elixir/lib/inspect.ex
Compiled lib/elixir/lib/range.ex
Compiled lib/elixir/lib/regex.ex
Compiled lib/elixir/lib/string.ex
Compiled lib/elixir/lib/string/chars.ex
Compiled lib/elixir/lib/io.ex
Compiled lib/elixir/lib/path.ex
Compiled lib/elixir/lib/file.ex
Compiled lib/elixir/lib/system.ex
Compiled lib/elixir/lib/kernel/cli.ex
Compiled lib/elixir/lib/kernel/error_handler.ex
Compiled lib/elixir/lib/kernel/parallel_compiler.ex
Compiled lib/elixir/lib/kernel/lexical_tracker.ex
==> elixir (compile)
warning: behaviour String.Chars is undefined
lib/calendar/date.ex:582

warning: behaviour Inspect is undefined
lib/calendar/date.ex:588

warning: behaviour Enumerable is undefined
lib/calendar/date_range.ex:21

warning: behaviour Inspect is undefined
lib/calendar/date_range.ex:81

warning: behaviour String.Chars is undefined
lib/calendar/time.ex:476

warning: behaviour String.Chars is undefined
lib/calendar/datetime.ex:473

warning: behaviour Inspect is undefined
lib/calendar/time.ex:482

warning: behaviour Inspect is undefined
lib/calendar/datetime.ex:482

warning: behaviour String.Chars is undefined
lib/calendar/naive_datetime.ex:677

warning: behaviour Inspect is undefined
lib/calendar/naive_datetime.ex:684

warning: use Dict is deprecated, use the Map module for working with maps or the Keyword module for working with keyword lists
lib/hash_dict.ex:11

warning: erlang:get_stacktrace/0 used in the wrong part of 'try' expression. (Use it in the block between 'catch' and 'end'.)
lib/exception.ex:1150


== Compilation error in file lib/system.ex ==
** (ArgumentError) argument error
:erlang.port_command(#Port<0.4339>, ['(', "git rev-parse --short HEAD 2> /dev/null", [10, 41, 32, 60, 47, 100, 101, 118, 47, 110, 117, 108, 108, 59, 32, 101, 99, 104, 111, 32, 34, 4, 34, 10]])
(kernel) os.erl:242: :os.cmd/1
(stdlib) erl_eval.erl:670: :erl_eval.do_apply/6
(stdlib) erl_eval.erl:878: :erl_eval.expr_list/6
(stdlib) erl_eval.erl:552: :erl_eval.local_func/6
expanding macro: System.get_revision/0
lib/system.ex:132: System.revision/0
make: *** [Makefile:81: lib/elixir/ebin/Elixir.Kernel.beam] Error 1
phase `build' failed after 54.4 seconds
builder for `/gnu/store/iwiic5ma374k0l4409qdz5dfknfg7qh3-elixir-1.5.2.drv' failed with exit code 1
@ build-failed /gnu/store/iwiic5ma374k0l4409qdz5dfknfg7qh3-elixir-1.5.2.drv - 1 builder for `/gnu/store/iwiic5ma374k0l4409qdz5dfknfg7qh3-elixir-1.5.2.drv' failed with exit code 1
guix build: error: build failed: build of `/gnu/store/iwiic5ma374k0l4409qdz5dfknfg7qh3-elixir-1.5.2.drv' failed
P
P
Pjotr Prins wrote on 17 Dec 2017 08:54
(name . nee)(address . nee@cock.li)(address . 29655@debbugs.gnu.org)
20171217075427.GA21986@thebird.nl
The epipe error suggests a new external process is invoked (git)
which does not terminate properly and does not close the pipe. Maybe
it tries to access the network layer. The calling program throws an
epipe error. I see something similar happening
Z
Z
zimoun wrote on 5 Jul 2021 13:58
(name . Pjotr Prins)(address . pjotr.public12@thebird.nl)
871r8d2cry.fsf@gmail.com
Hi,

This old bug [1] is about a failure of elixir.


On Sun, 17 Dec 2017 at 08:54, Pjotr Prins <pjotr.public12@thebird.nl> wrote:
Toggle quote (6 lines)
> The epipe error suggests a new external process is invoked (git)
> which does not terminate properly and does not close the pipe. Maybe
> it tries to access the network layer. The calling program throws an
> epipe error. I see something similar happening
> here: https://gist.github.com/knewter/533d22eb69ef1036c22a

Using Guix 3694c0d, the package 'elixir' builds for x86_64. Even, it
builds reproductibly; the option '--check' passes.

Closing?

All the best,
simon
Z
Z
zimoun wrote on 17 Aug 2021 23:15
(name . Pjotr Prins)(address . pjotr.public12@thebird.nl)
86czqbn57q.fsf@gmail.com
Hi,

On Mon, 05 Jul 2021 at 13:58, zimoun <zimon.toutoune@gmail.com> wrote:

Toggle quote (16 lines)
> This old bug [1] is about a failure of elixir.
>
> 1: <http://issues.guix.gnu.org/issue/29655>
>
> On Sun, 17 Dec 2017 at 08:54, Pjotr Prins <pjotr.public12@thebird.nl> wrote:
>> The epipe error suggests a new external process is invoked (git)
>> which does not terminate properly and does not close the pipe. Maybe
>> it tries to access the network layer. The calling program throws an
>> epipe error. I see something similar happening
>> here: https://gist.github.com/knewter/533d22eb69ef1036c22a
>
> Using Guix 3694c0d, the package 'elixir' builds for x86_64. Even, it
> builds reproductibly; the option '--check' passes.
>
> Closing?

I am closing. Feel free to reopen if something is missed.

All the best,
simon
Closed
?