Repository navigation
-
The default task stack is now 2 MiB, the stack of a thread from
std::thread::spawnand of tokio's worker threads. It was 60 KiB, so a task that built a large value on its stack died with SIGSEGV and no panic message. The stack is reserved address space, and a task uses only the pages it touches. The shuttle-tokio test macro no longer sets its own 960 KiB. (#461) -
A task's wake is now consumed when its poll starts, as in tokio. Before, a wake that came before the poll still counted when the poll returned
Pending, so the task got one more poll. That extra poll hid lost wakeups where a future is woken, polled, and then becomes ready with no further wake: tokio never polls it again, and such a test now fails with a deadlock. Schedules that were recorded with an earlier version can fail to replay. (#478) -
Fix four bugs at the end of
thread::scope. The last scoped thread woke the scope's owner wherever it was blocked, so ajoinof another thread or the end of an inner scope could return too early (#449). A scope ended before a thread dropped a result that nobody joined, and that result can borrow from the scope (#448). The end of a scope now joins the vector clocks of its threads, as ajoindoes. When the scope's function panics,scopenow waits for its threads before it resumes the panic, as std does. A scope with a forgotten handle, or with a thread that waits for the panicking owner, now waits forever, which Shuttle reports as a deadlock, as std's scope would hang. (#451) -
Take a scheduling point before the drop of a std mpsc
Receiver, or of the lastSenderorSyncSender, disconnects the channel while the other side still exists. Before, the drop ran in the same step as the thread's previous operation, so a receiver never sawEmptybetween a sender's lastsendand its drop. (#420) -
shuttle-std's
RwLock::try_readno longer loses a permit when it fails because the task already holds a read guard. Before, no writer could take the lock after that, and Shuttle reported a false deadlock. (#466) -
shuttle-std's
RwLock<T>is nowSynconly whenT: Send + Sync, as std's is. It wasSyncfor anyT: Send, so astatic RwLock<Cell<u64>>compiled and let two tests that run at the same time share a&Cell<u64>across OS threads. Code that relied on the old bound doesn't compile with std'sRwLockeither. (#465) -
Add
is_poisonedto shuttle-std'sMutexandRwLock, as in std. (#426) -
shuttle-tokio:- The timeouts that
trigger_timeoutsexpires now last only until the end of the execution. They were kept in a thread-local, so a trigger that an execution didn't clear also expired timeouts in every later execution, and a failing schedule could pass when replayed on its own. (#421) watchtakes one scheduling point per wait inchanged,wait_forandSender::closed, instead of up to four, and none to wake the waiters. The drop of the lastSenderorReceiveroutside an execution no longer panics. (#414)- Fix undefined behavior from safe code in
OwnedRwLockWriteGuard::downgrade: atracingsubscriber that panicked on its trace event caused a use after free and a double drop of the lock'sArc. (#468) - Fix undefined behavior from safe code in
OnceCell::get_or_initandget_or_try_init: after a cancelled initializer closed the semaphore outside an execution, they returned a reference into the empty cell. They now panic instead. (#469) - Add
rwlock()toOwnedRwLockReadGuardandOwnedRwLockWriteGuard, as in tokio. (#417)
- The timeouts that
-
deterministic_collections: deserializing aHashMaporHashSetnow uses the deterministic hasher, so the same input gives the same iteration order. (#416) -
Add the
shuttle-enablercrate. Itsshuttlefeature turns on theshuttlefeature of every wrapper crate, and thedeterministicfeature ofdeterminizable_collections, so a crate that uses several wrappers names one feature instead of listing each wrapper. (#325) -
Publish
shuttle0.9.11,shuttle-engine0.1.9,shuttle-std0.1.6,shuttle-tokio-impl-inner0.1.8,deterministic_collections0.1.1 andshuttle-enabler0.1.0.shuttle-stdrequiresshuttle-engine0.1.9 for the wake change.shuttle-tokio-impl-innerrequires it for the 2 MiB default, because its test macro no longer sets a stack size.shuttle-schedulers0.1.1 and the other wrappers are unchanged.shuttle-tokio-impl0.1.2 andshuttle-tokio1.0.0 take inner as^0.1.5, anddashmapanddeterminizable_collectionstakedeterministic_collectionsas^0.1.0, so they get the fixes without a new release.