Open allvphx opened 1 year ago
Hi @allvphx , thanks for using Occlum and try some demos. According to your error log, it seems the Occlum failed to initialize the rootfs at a very early stage.
In fact, we haven't tested occlum gdb
on MySQL yet, not to mention sgx_emmt
.
I don't know your specific requirement, but enable sgx_emmt
would inform you enclave memory usage mixed by MySQL-the app and Occlum-the os, this can be confused.
If you'd like to track memory consumption, you can build a BusyBox along with MySQL showed here, then enter the instance directory after Occlum&MySQL started, run occlum exec /bin/busybox free
or occlum exec /bin/busybox cat /proc/meminfo
to see memory usage of MySQL.
Thank you for your prompt reply. To clarify, I'm interested in determining the total enclave memory usage of both MySQL and Occlum.
May I ask if the busybox method includes the enclave memory used by Occlum? Also, I'd like to know usually how much extra enclave memory is required to run an application with Occlum.
What type of memory concerns you? Are you talking about EPC or untrusted memory usage? Are you talking about the physical memory in use or the virtual memory?
If you want to know the extra memory used by Occlum, you can configure the value of kernel_heap_size
and kernel_stack_size
to get the minimum value to run Occlum. And these values are the memory amount that can be regarded as the EPC memory used by Occlum.
Describe the bug
I got
[ERROR] occlum-pal: occlum_ecall_init returns EFAULT
when running MySQL demo with occlum gdb.To reproduce
Steps to reproduce the behavior:
run_mysql_server.sh
with the command:occlum gdb /bin/${MYSQLD}
, and run it.run --user=root
inside gdb.Expected behavior
Logs
Environment
Additional context
The configuration file:
Possible solution/Implementation