mattmower

mattmower

Error: corrupt atom table using 1.19.3/OTP28 vs 27

I’ve just updated an escript based application of mine from Elixir 1.17 to 1.19.

At the same time I attempted to update from OTP 27.2.2 to 28.1.1

After switching to 1.19.3-otp28, nuking the _build folder, and recompiling, the escript binary gives the following error:

=ERROR REPORT==== 20-Nov-2025::14:32:27.189484 ===
beam/beam_load.c(150): Error loading module rez_escript:
  corrupt atom table


escript: exception error: undefined function rez_escript:main/1
  in function  escript:run/2 (escript.erl, line 904)
  in call from escript:start/1 (escript.erl, line 418)
  in call from init:start_it/1
  in call from init:start_em/1
  in call from init:do_boot/3

Going back to 1.19.3-otp27 with 27.3.4.6 and the escript binary works fine.

I couldn’t find anything much sensible via Google and errors in beam_load.c is a bit above my pay grade so I thought I would report it here.

Most Liked

josevalim

josevalim

Creator of Elixir

This will happen if you compile a escript for Erlang/OTP 28 and then attempt to run it on Erlang/OTP 27 and earlier.

jerdew

jerdew

Did you nuke deps too? Bc I’ve been switching between 1.18 and 1.19, I recently found a succinct way to delete it all from orbit: mix clean --deps

Edit: Right, _build contains the compiled deps, sorry. I got wires crossed because I had been using ‘mix clean’ and had run into issues with deps on the wrong Elixir version.

fizfaz

fizfaz

searching for the error message I found this commit-message:

This commit changes the atom table in BEAM files to use a variable
length encoding for the length of each atom. For atoms up to 15 bytes,
the length is encoded in one byte. The header for the atom table is
also changed to indicate that new encoding of lengths are used.
Attempting to load a BEAM file compiled with Erlang/OTP 28 in
Erlang/OTP 27 or earlier will result in the following error message:

    1> l(t).
    =ERROR REPORT==== 8-Oct-2024::08:49:01.750424 ===
    beam/beam_load.c(150): Error loading module t:
      corrupt atom table

    {error,badfile}

so maybe an old runtime (27) is used for running the escript? :thinking:

LostKobrakai

LostKobrakai

escripts do not include otp. They expect the system running the escript to have an the otp installation.

Where Next?

Popular in Questions Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
kostonstyle
Hi all I want to have a unix time, from the current time plus 1 hour. DateTime.now + 1 hour How to get it in elixir? Thanks
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New

Other popular topics Top

malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set? Thanks.
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
vac
Hi, I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
273 38985 115
New
AstonJ
by Lance Halvorsen Elixir and Phoenix are generating tremendous excitement as an unbeatable platform for building modern web application...
460 27162 124
New

We're in Beta

About us Mission Statement