[bug] Compiling lib/poison/parser.ex v5.0.0 freezes system #521

Closed
opened 2023-04-11 01:07:26 +00:00 by HLC · 3 comments

Your setup

Docker

Extra details

Docker CLI

Version

Latest stable

PostgreSQL version

Not sure, can't check anymore

What were you trying to do?

I was following the docker install guide
https://docs.akkoma.dev/stable/installation/docker_en/

What did you expect to happen?

To run 'mix compile' and have the packages compile

What actually happened?

The compilation process would hit the 'Poison' package, specifically
"Compiling lib/poison/parser.ex"
Then the beam.smp process would slowly start eating up all available memory until the system froze entirely.

Logs

No logs to show because the process never got around to crashing, the high CPU/Mem usage would just freeze everything. The freeze wasn't temporary, at one point I left it over night (~8hrs) and it was still frozen. I was able to fix the problem myself though.

I saw that Poison was version 5.0.0 and I checked the dependencies in mix.exs and saw that any version of Poison was acceptable:
{:poison, ">= 0.0.0"},

On a hunch that it was a new version causing the problem I changed that line to:
{:poison, "< 5.0.0"},

deps.get then acquired version 4.0.1 and mix compile was able to compile the package without any issues. I take that to mean the issue only affects the newest version.

I didn't actually end up completing the install for other reasons but I figured I should report this bug and the fix because it might trip up other people in the future. An easy solution would be to make the change to mix.exs and the hard way would be to find out what specifically was wrong with parser.ex and fix that.

Severity

I cannot use the software

Have you searched for this issue?

  • I have double-checked and have not found this issue mentioned anywhere.
### Your setup Docker ### Extra details Docker CLI ### Version Latest stable ### PostgreSQL version Not sure, can't check anymore ### What were you trying to do? I was following the docker install guide https://docs.akkoma.dev/stable/installation/docker_en/ ### What did you expect to happen? To run 'mix compile' and have the packages compile ### What actually happened? The compilation process would hit the 'Poison' package, specifically "Compiling lib/poison/parser.ex" Then the beam.smp process would slowly start eating up all available memory until the system froze entirely. ### Logs ```shell No logs to show because the process never got around to crashing, the high CPU/Mem usage would just freeze everything. The freeze wasn't temporary, at one point I left it over night (~8hrs) and it was still frozen. I was able to fix the problem myself though. I saw that Poison was version 5.0.0 and I checked the dependencies in mix.exs and saw that any version of Poison was acceptable: {:poison, ">= 0.0.0"}, On a hunch that it was a new version causing the problem I changed that line to: {:poison, "< 5.0.0"}, deps.get then acquired version 4.0.1 and mix compile was able to compile the package without any issues. I take that to mean the issue only affects the newest version. I didn't actually end up completing the install for other reasons but I figured I should report this bug and the fix because it might trip up other people in the future. An easy solution would be to make the change to mix.exs and the hard way would be to find out what specifically was wrong with parser.ex and fix that. ``` ### Severity I cannot use the software ### Have you searched for this issue? - [x] I have double-checked and have not found this issue mentioned anywhere.
HLC added the
bug
label 2023-04-11 01:07:26 +00:00

not a bug, and nothing to do with akkoma

this is you running out of memory

not a bug, and nothing to do with akkoma this is you running out of memory
Author

Hundreds of files to compile and only one specific version of one file causes any memory issues. Doesn't really fit as an explanation but whatever. If you don't care I guess I shouldn't either.

Hundreds of files to compile and only one specific version of one file causes any memory issues. Doesn't really fit as an explanation but whatever. If you don't care I guess I shouldn't either.

Never encountered that issue myself including on a Raspberry Pi 4 (including with Docker), what system are you running this on?

Never encountered that issue myself including on a Raspberry Pi 4 (including with Docker), what system are you running this on?
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: AkkomaGang/akkoma#521
No description provided.