rebar3 icon indicating copy to clipboard operation
rebar3 copied to clipboard

rebar3 shell randomly fails on Windows in OTP 27

Open nixxquality opened this issue 1 month ago • 4 comments

Environment

Rebar3 report
 version 3.23.0
 generated at 2024-05-22T09:02:55+00:00
=================
Please submit this along with your issue at https://github.com/erlang/rebar3/issues (and feel free to edit out private information, if any)
-----------------
Task: shell
Entered as:
  shell
-----------------
Operating System: win32
ERTS: Erlang/OTP 27 [erts-15.0] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit:ns]
Root Directory: c:/Program Files/Erlang OTP
Library directory: c:/Program Files/Erlang OTP/lib
-----------------
Loaded Applications:
bbmustache: 1.12.2
certifi: 2.11.0
cf: 0.3.1
common_test: 1.27
compiler: 8.5
crypto: 5.5
cth_readable: 1.5.1
dialyzer: 5.2
edoc: 1.3
erlware_commons: 1.7.0
eunit: 2.9.1
eunit_formatters: 0.5.0
getopt: 1.0.2
inets: 9.2
kernel: 10.0
providers: 1.9.0
public_key: 1.16
relx: 4.9.0
sasl: 4.2.2
snmp: 5.16
ssl_verify_fun: 1.1.6
stdlib: 6.0
syntax_tools: 3.2
tools: 4.0

-----------------
Escript path: d:/Programs/bin/rebar3
Providers:
  alias app_discovery as clean compile compile completion cover ct cut deps dialyzer do docs edoc escriptize eunit get-deps help install install_deps key list lock manifest new owner path pkgs publish release relup repo report repos retire revert search shell state tar tree unlock update upgrade upgrade upgrade user vendor version xref

After I upgraded to OTP 27 I immediately had a crash when running rebar3 shell. I tried updating but I think I already had close to the latest version and the crash happened again. A few minutes later, it didn't, so I thought I fixed it somehow, but it seems to just be completely random. It happens both in my long-standing rebar3 project and in folders completely missing rebar3 project files.

Current behaviour

About 1/5 of the time, running rebar3 shell will catastrophically fail and be stuck in a frozen state, requiring interrupts to get the prompt back. Though the error is from Erlang's OTP, this does not happen while running the plain erl shell.

> rebar3 shell
===> Load global config file c:/Users/Linus/.config/rebar3/rebar.config
===> 27.0 satisfies the requirement for minimum OTP version 18
===> Evaluating config script "c:/Users/Linus/.cache/rebar3/plugins/hex_core/rebar.config.script"
===> Compile (apps)
===> Expanded command sequence to be run: [app_discovery,install_deps,lock,compile,shell]
===> Running provider: app_discovery
===> Found top-level apps: []
        using config: [{src_dirs,["src"]},{lib_dirs,["apps/*","lib/*","."]}]
===> Running provider: install_deps
===> Verifying dependencies...
===> Running provider: lock
===> Running provider: compile
===> Compile (apps)
===> Running hooks for compile with configuration:
===>    {pre_hooks, []}.
===> Compile (project_apps)
===> Running hooks for compile with configuration:
===>    {post_hooks, []}.
===> Running provider: shell
Erlang/OTP 27 [erts-15.0] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit:ns]

===> No script_file specified.
Failed to write log message to stdout, trying stderr
=CRASH REPORT==== 22-May-2024::11:05:37.575000 ===
  crasher:
    initial call: prim_tty:reader/1
    pid: <0.68.0>
    registered_name: user_drv_reader
    exception error: no case clause matching {error,
                                              {'GetOverlappedResult',
                                               'The I/O operation has been aborted because of either a thread exit or an application request.\r\n'}}
      in function  prim_tty:reader_loop/6 (prim_tty.erl, line 522)
    ancestors: [user_drv,<0.64.0>,kernel_sup,<0.47.0>]
    message_queue_len: 0
    messages: []
    links: [<0.65.0>]
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 233
    stack_size: 29
    reductions: 52
  neighbours:

Failed to write log message to stdout, trying stderr
=ERROR REPORT==== 22-May-2024::11:05:37.581000 ===
Reader crashed ({{case_clause,
                     {error,
                         {'GetOverlappedResult',
                             'The I/O operation has been aborted because of either a thread exit or an application request.\r\n'}}},
                 [{prim_tty,reader_loop,6,[{file,"prim_tty.erl"},{line,522}]},
                  {proc_lib,init_p_do_apply,3,
                      [{file,"proc_lib.erl"},{line,329}]}]})
Failed to write log message to stdout, trying stderr
=ERROR REPORT==== 22-May-2024::11:05:37.587000 ===
Error in process <0.153.0> with exit value:
{terminated,[{io,fwrite,
                 ["Warning! The slogan \"~p\" could not be printed.\n",
                  [[69,115,104,101,108,108,32,86,"15.0"]]],
                 [{file,"io.erl"},
                  {line,198},
                  {error_info,#{cause => {io,terminated},
                                module => erl_stdlib_errors}}]},
             {shell,server,1,[{file,"shell.erl"},{line,289}]}]}


BREAK: (a)bort (A)bort with dump (c)ontinue (p)roc info (i)nfo
       (l)oaded (v)ersion (k)ill (D)b-tables (d)istribution
^CTerminate batch job (Y/N)? ^C
^C

nixxquality avatar May 22 '24 09:05 nixxquality