kernel panic when running an evmone docker container inside SGX using mystikos
greg7mdp opened this issue · comments
Gregory Popovitch commented
I got the latest version of Mystikos last week from github, and built and installed it.
This is on ubuntu 20.04, intel Xeon E-2288G
It might be something I do wrong. When running the docker container by itself, it runs fine:
sgx_node:~$ cd test/hello/
sgx_node:~/test/hello$ myst exec-sgx rootfs /hello
Hello world from Mystikos!
sgx_node:~/test/hello$ sudo docker run --entrypoint evmone-bench ethereum/evmone /src/test/benchmarks
Benchmarking evmone
2022-01-03 15:16:10
Running evmone-bench
Run on (1 X 3696.01 MHz CPU )
CPU Caches:
L1 Data 32K (x1)
L1 Instruction 32K (x1)
L2 Unified 256K (x1)
L3 Unified 16384K (x1)
-----------------------------------------------------------------------------------------------
Benchmark Time CPU Iterations UserCounters...
-----------------------------------------------------------------------------------------------
blake2b_huff/analysis 25 us 25 us 27575 rate=577.921M/s size=14.363k
blake2b_huff/empty 37 us 37 us 19120 gas_rate=374.214M/s gas_used=13.984k
blake2b_huff/2805nulls 267 us 262 us 2646 gas_rate=1.17239G/s gas_used=307.068k
blake2b_huff/5610nulls 493 us 491 us 1401 gas_rate=1.22355G/s gas_used=600.152k
...
but when I try running the same image with myst I get errors:
sgx_node:~$ sudo /opt/mystikos/bin/myst-appbuilder -i ethereum/evmone
Using default tag: latest
latest: Pulling from ethereum/evmone
Digest: sha256:d4f40089306f9a5eefffb1059dc9d0a0a53c879d8f13f61a56bea58f479435a4
Status: Image is up to date for ethereum/evmone:latest
docker.io/ethereum/evmone:latest
Success! Application built at appdir.
sgx_node:~$ ls
appdir github snap test tmp
sgx_node:~$ sudo /opt/mystikos/bin/myst mkcpio appdir rootfs
sgx_node:~$ sudo /opt/mystikos/bin/myst exec-sgx rootfs /evmone-bench /src/test/benchmarks
*** kernel panic: enter.c(860): myst_enter_kernel(): myst_exec() failed, ret=-2
0x1005e60de: __myst_panic()
0x1005be2ea: myst_enter_kernel()
sgx_node:~$ sudo /opt/mystikos/bin/myst exec-linux rootfs /evmone-bench /src/test/benchmarks
*** kernel panic: enter.c(860): myst_enter_kernel(): myst_exec() failed, ret=-2
I did try creating a new evmone docker image, but I had the same error when trying to run it with myst
.
Gregory Popovitch commented
Never mind, I was using the wrong path for the command to run, it does work great!