Skip to content

Better synchronization poisoning #53

@nick-mobilecoin

Description

@nick-mobilecoin

Currently the poisoning logic in rust std::sync relies on unwinding.
MutexGuard::drop() will call the drop() on the Mutexes poison flag.

The current panicking in SGX does not unwind which means the poisoning will never happen.
If we chose to utilize a global panic count for poisoning then all other [Mutex']es, not just the one held in the panicked thread, will report poisoned. This may be ok since the abort()` function used in the panic handler sets the enclave crashed flag, which means any threads still working will finish, but no new ones will start. This results in requiring an enclave reload.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions