Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EnclaveLost error occurred when running DB in multi-threading mode #60

Closed
hiroki-chen opened this issue May 15, 2023 · 2 comments
Closed

Comments

@hiroki-chen
Copy link
Collaborator

hiroki-chen commented May 15, 2023

How did you build it?

First, build the enclave under platform_sgx using make:

SGX_MODE=HW TASK=task_db NATIVE_ENCLAVE=0 make -j

Then clone this repo:

git clone https://github.com/hiroki-chen/ycsb-pocf.git

Run the enclave:

$ ./app 127.0.0.1 1234
[2023-05-15T14:18:52Z INFO  app] [+] Listening to 127.0.0.1:1234
[2023-05-15T14:18:52Z INFO  app] [+] Initializing the enclave. May take a while...

How did you run it?

Start the YCSB benchmark client using workload A and make sure workloada.toml contains the following fields:

operationcount = 1000000
recordcount = 1000000

and then spawn 8 concurrent clients:

$ cd ycsb-pocf
$ TEE_TYPE=SGX cargo run -r --features=sgx,sgx_no_verify -- load -t 8 -w workloads/workloada.toml
[2023-05-15T14:18:53Z INFO  ycsb_pocf] Arguments are
    Args {
        run_type: Load,
        address: "127.0.0.1",
        port: 1234,
        workload: "./workloads/workloada.toml",
        thread_number: 8,
    }

Then the error will occur:

[2023-05-15T14:19:58Z ERROR app] [-] ECALL Enclave Failed, reason: EnclaveLost!

This also makes consequent request fails with EnclaveCrashed due to a missing enclave. Interestingly, however, using fewer threads makes the error disappear. The TCS number in the configuration file is set to 16 and the thread pool's TCS contant is 10.

Other stuffs

You cannot run the quote verification enclave on the same machine if you want to run the YCSB client in multi-threading mode because the dcap verification library launches an enclave too, which causes a conflict with our PoBF enclave.

Any insights? @ya0guang

@hiroki-chen
Copy link
Collaborator Author

@hiroki-chen
Copy link
Collaborator Author

Supplementary facts: this error is likely to be triggered if the system is currently undergoing a heavy workload.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant