Skip to content

elixir:1.14-alpine crashes silently when running in certain situations #76

@srevenant

Description

@srevenant

I just moved from elixir:1.13-alpine to 1.14.
Mostly it works fine, except when run one specific way.

My container set is built two ways, and only one variant causes this problem:

  1. One container is built with the application as a release. This container works fine when running the service.
  2. Another container is built (for debug purposes) with just the application as a mix project pre-release.
  3. Running the debug container standalone with 'mix start' (what starts our service) and it runs fine
  4. Running the debug container as a docker swarm service with the entrypoint being 'sleep 50000000' (to get an idle background container); THEN, running 'docker exec -it {id} /bin/bash' to get into the container, and running any erlang/elixir/iex/mix command will cause the entire container to exit, with NO COMMAND OUTPUT, which is extremely curious. This happens running 'iex' and 'erlang' as well.

I can run other alpine commands (ps, ls, etc) with no problem.
I can install python and have it grab tons of memory (I killed it after 8G) and it isn't OOMkilled.

Enabling debug in docker didn't show any valuable info. The container is just exiting of its own choice:

May 24 15:39:15 devops dockerd[9801]: time="2023-05-24T15:39:15.286999909Z" level=debug msg=event module=libcontainerd namespace=moby topic=/tasks/exit
May 24 15:39:15 devops dockerd[9801]: time="2023-05-24T15:39:15.287297582Z" level=debug msg="attach: stdout: end"
May 24 15:39:15 devops dockerd[9801]: time="2023-05-24T15:39:15.287320222Z" level=debug msg="attach: stdin: end"
May 24 15:39:15 devops dockerd[9801]: time="2023-05-24T15:39:15.287337073Z" level=debug msg="attach done"

Running Docker version 24.0.1, build 6802122

For now I've switched the base container for the debug image to be elixir 1.13, as this is a head-scratcher to me. It's clearly something w/erlang in the container, but I don't know how it'd be killing itself. Highly unusual.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions