xous-core
xous-core copied to clipboard
Intermittent panic in thread local storage implementation
A panic was observed in the net server on a CI run today:
PANIC in PID 11:
<unnamed>' panicked at 'can't destroy keys on Xous', library/std/src/sys/xous/thread_local_key.rs:98:5
Apparently this is linked to a rarely triggered condition in the newly refactored thread local storage (TLS) implementation.
This bug has been opened to track any further occurrences of this panic in an attempt to create a reliable test case to chase it down.
Based on the context of this panic, it happened in the net server sometime during the DHCP negotiation. This fits with some issue in thread local storage since the net server is heavily multi-threaded internally.
With https://github.com/betrusted-io/rust/commit/c9a00020835b613ad4eff578662282b80b30b7a2 we now have the ability to destroy keys on Xous. This code comes from a libstd rework, and has been backported to the patchset that we've been carrying since Rust 1.50