-
Notifications
You must be signed in to change notification settings - Fork 100
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
Enable enclave exit when a TCS is blocked on I/O #223
Conversation
Open questions:
|
enclave-runner/src/usercalls/mod.rs
Outdated
@@ -1083,6 +1092,23 @@ impl<T: UsercallExtension> From<T> for Box<dyn UsercallExtension> { | |||
struct UsercallExtensionDefault; | |||
impl UsercallExtension for UsercallExtensionDefault {} | |||
|
|||
macro_rules! with_exit_handler { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems complicated, I'd much rather have something where we make use of tokio's task cancellation mechanisms such as https://docs.rs/tokio/0.2.13/tokio/runtime/struct.Runtime.html#method.shutdown_timeout
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, if this is wrapping all usercalls, couldn't it be done one level down in the stack (in usercall dispatch)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use of tokio's task cancellation mechanisms such as https://docs.rs/tokio/0.2.13/tokio/runtime/struct.Runtime.html#method.shutdown_timeout
That would require upgrading to tokio 0.2, I'll explore that option using PR #210
couldn't it be done one level down in the stack (in usercall dispatch)?
Good idea, I'll give that a shot
Can we add some tests? Maybe they could be part of the rust-lang/rust test suite. |
20383f3
to
8dd1f3a
Compare
Just found out that the parallel future approach implemented here is not necessary. The blocking issue appears to be due to the following line in tokio::runtime::current_thread::block_on_all(select_fut.unit_error().compat()).unwrap() The documentation for
The problematic part is the I'll update this PR accordingly. |
8dd1f3a
to
a9e3c75
Compare
This fixes issue #109
a9e3c75
to
dcfd632
Compare
bors r+ |
Build succeeded
|
This fixes issue #109