[roll] Roll fuchsia [cqhci] Fix stuck tasks

The CQHCI driver had a bug which sometimes led to tasks becoming stuck.

When a new I/O request comes on, it needs to acquire a slot and it needs
to ensure the command queue is ready to receive submissions. If the
queue is blocked, or no slots are available, the request thread will
block until an Event is notified.

This Event was not being signalled in all cases. In particular, if all
slots were occupied, but the request which occupied the last slot was
never submitted (e.g., due to invalid arguments), then the Event would
never be signaled.

To address this (and other such bugs), refactor the CQHCI driver in a
few ways:

- Use a fasync::Condition instead of Mutex for Inner, which handles
  keeping track of wakers for us rather than requiring a separate Event.
- Move the TransferSlot/DcmdSlot RAII wrappers into command_queue.rs so
  they can retain a reference to the CommandQueue itself, rather than
  the inner TransferManager object.  This way they can wake up wakers
  when they drop (resolving the aforementioned bug).
- As an optimization, wake up wakers *after* we release the lock on
  Inner (since most wakers will immediately attempt to acquire that
  lock).

Added a unit test which reproduces the original issue.

Add a test for the above issue as well.

Original-Original-Bug: 516924886
Multiply: cqhci-tests
Depends-On: Ib479ab9bbc92b8791a875ac2b601e1366100e975
Original-Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1634818
Dependencies-Satisfied: cl-deps-checker@fuchsia-internal-service-accts.iam.gserviceaccount.com <cl-deps-checker@fuchsia-internal-service-accts.iam.gserviceaccount.com>
Original-Original-Revision: 1ff5373fa0f03c3451e1652ecb496ada016d3b19
GitOrigin-RevId: 47904b05fb61bda31b594d7c4a587fbf2a41e229
Change-Id: I00970b9d78404a01f8dd5f24ba1caec41c73a025
Reviewed-on: https://fuchsia-review.googlesource.com/c/integration/+/1661241
Cr-Commit-Position: refs/heads/main@{#194934}
1 file changed
tree: 4928dfea68454b27abc3eba73f3b3c968aeb5b1b
  1. ctf/
  2. git-hooks/
  3. infra/
  4. third_party/
  5. cobalt
  6. flower
  7. jiri.lock
  8. MILESTONE
  9. minimal
  10. prebuilts
  11. README.md
  12. stem
  13. test_durations
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance in one of the communication channels documented at get involved.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.