cannot execute binary file

Open
#11 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
aws, docker, elixir
Domain
cloud

Research direction

Start with the reported invocation of Elixir.Playground:playground_handler and reproduce it using lambda.zip in the SAM emulation container. Read bootstrap, bin/playground, and the referenced erts-13.0.4/bin/erl and erlexec paths. Done means the provided example starts without the “cannot execute binary file” error and can be run in the reported runtime.

Written by the indexing model from the issue text.

Description

Does anyone has a running example?

Invoking Elixir.Playground:playground_handler (provided)
Decompressing /Users/ben/development/github.com/benkeil/elixir_lambda/lambda.zip
Skip pulling image and use local one: public.ecr.aws/sam/emulation-provided:rapid-1.55.0-x86_64.

Mounting /private/var/folders/mv/ntn0l4dx77d5hhqtwgmcrg0h0000gn/T/tmpskuus7j6 as /var/task:ro,delegated inside runtime container
START RequestId: 9216089f-f446-4509-a326-07f73253b4be Version: $LATEST
++ dirname /var/task/bootstrap
+ BASE=/var/task
+ EXE=/var/task/bin/playground
+ HOME=/tmp
+ export HOME
+ export RELEASE_READ_ONLY=true
+ RELEASE_READ_ONLY=true
+ export LD_LIBRARY_PATH=/var/lang/lib:/lib64:/usr/lib64:/var/runtime:/var/runtime/lib:/var/task:/var/task/lib:/opt/lib:/var/task/lib/elixir_runtime-0.1.0/priv
+ LD_LIBRARY_PATH=/var/lang/lib:/lib64:/usr/lib64:/var/runtime:/var/runtime/lib:/var/task:/var/task/lib:/opt/lib:/var/task/lib/elixir_runtime-0.1.0/priv
+ /var/task/bin/playground start
/var/task/releases/0.1.0/../../erts-13.0.4/bin/erl: line 12: /var/task/erts-13.0.4/bin/erlexec: cannot execute binary file
/var/task/releases/0.1.0/../../erts-13.0.4/bin/erl: line 12: /var/task/erts-13.0.4/bin/erlexec: Success
10 Sep 2022 22:00:38,419 [ERROR] (rapid) Init failed error=Runtime exited with error: exit status 126 InvokeID=
++ dirname /var/task/bootstrap
+ BASE=/var/task
+ EXE=/var/task/bin/playground
+ HOME=/tmp
+ export HOME
+ export RELEASE_READ_ONLY=true
+ RELEASE_READ_ONLY=true
+ export LD_LIBRARY_PATH=/var/lang/lib:/lib64:/usr/lib64:/var/runtime:/var/runtime/lib:/var/task:/var/task/lib:/opt/lib:/var/task/lib/elixir_runtime-0.1.0/priv
+ LD_LIBRARY_PATH=/var/lang/lib:/lib64:/usr/lib64:/var/runtime:/var/runtime/lib:/var/task:/var/task/lib:/opt/lib:/var/task/lib/elixir_runtime-0.1.0/priv
+ /var/task/bin/playground start
/var/task/releases/0.1.0/../../erts-13.0.4/bin/erl: line 12: /var/task/erts-13.0.4/bin/erlexec: cannot execute binary file
/var/task/releases/0.1.0/../../erts-13.0.4/bin/erl: line 12: /var/task/erts-13.0.4/bin/erlexec: Success
END RequestId: 094fd9fe-e205-4ad9-9751-fb087d2098f5
REPORT RequestId: 094fd9fe-e205-4ad9-9751-fb087d2098f5	Init Duration: 1.05 ms	Duration: 1271.60 ms	Billed Duration: 1272 ms	Memory Size: 256 MB	Max Memory Used: 256 MB
Dominant language
Elixir
Stars
129
Forks
31
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aws-samples/aws-lambda-elixir-runtime

All issues in aws-samples/aws-lambda-elixir-runtime

Similar issues

More Elixir issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.