aws / aws/aws-nitro-enclaves-cli

Nitro-cli console reports error after successful enclave exit

Open
#405 1 comment 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
Rust
Stars
156
Forks
99
PR merge metrics
No merged PRs in 30d

Description

I am trying to run an enclave in debug mode with attached console using `nitro-cli console` or `nitro-cli run-enclave --attach-console`. Every time my enclave exits I get this at the end:
```
[ 60.505028] Unregister pv shared memory for cpu 1
[ 60.506120] Unregister pv shared memory for cpu 0
[ 60.507034] reboot: Restarting system
[ 60.507642] reboot: machine restart
[ E45 ] Enclave console read error. Such error appears when reading from a running enclave's console fails.

For more details, please visit https://docs.aws.amazon.com/enclaves/latest/user/cli-errors.html#E45

If you open a support ticket, please provide the error log found at "/var/log/nitro_enclaves/err2022-08-25T13:18:36.623632872+00:00.log".
```

My enclave is a simple bash script that runs on Ubuntu and only does `sleep` before exiting, so I am pretty sure that enclave exits successfully. The error itself doesn't interfere with the application, but adds confusion for the user. Is this a proper behavior for the console or it could be fixed?

My Dockerfile and script look like this:
```
FROM ubuntu
COPY start.sh /
CMD ./start.sh
```

`sleep 60s`

Contributor guide

Open the contributing guide

Research direction

Reproduce the behavior with nitro-cli console or nitro-cli run-enclave --attach-console using the provided Ubuntu Dockerfile and start.sh, which sleeps for 60 seconds before exiting. Read the E45 console error documentation and the generated error log to determine whether normal enclave shutdown is being misclassified. Done means a successful enclave exit does not produce a misleading E45 error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.