crosvm/cros_async
Noah Gold 7a5226e6e9 cros_async: avoid unblock in Tube until readable.
Because unblock tasks cannot be canceled, and the ones started for
AsyncTube hold locks, this can cause code trying to convert the
AsyncTube back to a Tube to stall because the lock is held on the
unblock thread and won't ever be released until the global pool is
shutdown.

The right solution is to abandon unblock or make it cancellable.
Those are significant undertakings, so in the interim, we can
avoid starting unblock until the read notifier is triggered.
This way, we won't actually be in unblock, and the lock will
not be held.

BUG=b:294134741
TEST=snapshot no longer stalls on Windows.

Change-Id: I36bfd0ca5546c43f766c431a2fb97d2b87a679ae
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4749226
Reviewed-by: Frederick Mayle <fmayle@google.com>
Commit-Queue: Noah Gold <nkgold@google.com>
Reviewed-by: Richard Zhang <rizhang@google.com>
2023-08-04 22:30:42 +00:00
..
src cros_async: avoid unblock in Tube until readable. 2023-08-04 22:30:42 +00:00
tests
Cargo.toml