Error when calling System.stop(0)

Hi,

I run a small elixir script that terminates by calling System.stop(0), Sometimes I have this error after the call:

** (EXIT from #PID<0.94.0>) an exception was raised:
    ** (ArgumentError) argument error
        (stdlib 3.14) :ets.lookup(:elixir_config, :no_warn_undefined)
        (elixir 1.11.1) src/elixir_config.erl:8: :elixir_config.get/1
        (elixir 1.11.1) lib/module/parallel_checker.ex:141: Module.ParallelChecker.merge_compiler_no_warn_undefined/1
        (elixir 1.11.1) lib/module/parallel_checker.ex:117: Module.ParallelChecker.extract_definitions/1
        (elixir 1.11.1) lib/module/parallel_checker.ex:102: Module.ParallelChecker.check_module/2
        (elixir 1.11.1) lib/module/parallel_checker.ex:300: anonymous fn/5 in Module.ParallelChecker.spawn_checkers/1

And sometimes I have not.

This is not really a problem because it happens at the end of the script, but I can’t uderstand what it is.

It seems to me that parallel_checker is a compilation tool, but the scripts can take up to one minute to terminate, and generate no warnings. After one minute I would believe that there are no more code checks to be made, right?

It is a single standalone .exs file with no dependencies.

The full script is here, it’s a silly thing that just make the CPU run at 100% until the fan of the computer starts. It works only on MacOS (I don’t know if powermetrics is available on Linux or other platforms) and requires sudo. I would say that the code doesn’t matter but I cannot reproduce with a simpler script.

2 Likes