Skip to content

Runtime terminating during boot with I/O termination error in Elixir 1.19.0-rc.0 on OTP 28 #14671

@mikkihugo

Description

@mikkihugo

Runtime terminating during boot with I/O termination error in Elixir 1.19.0-rc.0 on OTP 28

Environment

  • Elixir: 1.19.0-rc.0 (compiled with Erlang/OTP 28)
  • OTP: 28.0.1 (ERTS 16.0.1)
  • Platform: Linux (Nix package manager)
  • Architecture: x86_64

Problem Description

Elixir 1.19.0-rc.0 consistently crashes during boot with I/O termination errors when running on OTP 28.0.1. This makes Elixir completely unusable in normal terminal environments.

Error Message

Runtime terminating during boot ({terminated,[{io,put_chars,[standard_io,[<<"Elixir 1.19.0-rc.0 (compiled with Erlang/OTP 28)">>,10]],[{file,"io.erl"},{line,202},{error_info,#{cause=>{io,terminated},module=>erl_stdlib_errors}}]},{'Elixir.Kernel.CLI',parse_argv,2,[{file,"lib/kernel/cli.ex"},{line,251}]},{'Elixir.Kernel.CLI',main,1,[{file,"lib/kernel/cli.ex"},{line,30}]},{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]})

Crash dump is being written to: erl_crash.dump...done

Reproduction Steps

  1. Install Elixir 1.19.0-rc.0 with OTP 28.0.1
  2. Run any Elixir command: elixir --version, iex, mix --version
  3. Observe immediate crash with I/O termination error

Expected vs Actual Behavior

Expected: Elixir commands should execute normally and display version/help information

Actual: Runtime terminates immediately during boot when trying to output version information to stdout

Root Cause Analysis

The crash occurs at io.erl:202 when Elixir attempts to write its version string to standard_io during boot. The error happens specifically when outputting: <<"Elixir 1.19.0-rc.0 (compiled with Erlang/OTP 28)">>

Evidence

1. Direct Erlang Works Fine

$ erl -noshell -eval "io:format(\"OTP Test: ~s~n\", [erlang:system_info(otp_release)]), halt()."
OTP Test: 28
# ✅ Success - no crash

2. Elixir Commands All Fail

$ elixir --version
Runtime terminating during boot...

$ iex
Runtime terminating during boot...

$ mix --version  
Runtime terminating during boot...

3. Reproducible with Any Elixir Invocation

The error occurs 100% of the time with any Elixir command, indicating it's in the core boot sequence.

Workaround

I/O redirection allows Elixir to run successfully:

$ elixir --version > /tmp/out.log 2>&1
# ✅ Works - no crash, output redirected to file

This suggests the issue is specifically with stdout/stderr handling during boot.

System Information

$ erl -noshell -eval "io:format(\"System: ~s~n\", [erlang:system_info(system_version)]), halt()."
System: Erlang/OTP 28 [erts-16.0.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit:ns]

Impact

This is a critical issue that makes Elixir 1.19.0-rc.0 completely unusable with OTP 28.0.1 in standard development environments. Since this affects the release candidate, it's important to address before the stable 1.19.0 release.

Additional Context

  • Issue discovered during storage service development in a microservices architecture
  • Affects both direct elixir commands and mix operations
  • I/O redirection workaround allows applications to run successfully once started
  • No similar issues observed with previous Elixir versions on OTP 28

Would be happy to provide additional debugging information or test patches if needed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions