[roll] Roll fuchsia ffx: introduce timeouts in fastboot usb discovery
Prevent slow-responding or hung USB devices from blocking ffx
fastboot discovery by introducing a lazy-evaluation mechanism
for serial numbers and parallelizing device scans with a timeout.
Previously, walking the USB bus was sequential and synchronous:
- usb_rs::enumerate_devices eagerly read serial descriptors from
sysfs, blocking the executor if a device was unresponsive.
- usb_fastboot_discovery sequentialized scans on the main async
thread, compounding the delays.
This change:
1. Converts usb_rs serial retrieval to lazy evaluation using OnceLock.
`enumerate_devices` now completes near-instantly.
2. Parallelizes target checks in usb_fastboot_discovery by spawning
them concurrently.
3. Dispatches the blocking USB descriptor read operations to a helper
thread via `fuchsia_async::unblock`.
4. Limits each device check to a 1-second timeout via `.on_timeout()`.
This ensures a single bad machine spirit does not stall the entire ffx
target enumeration pipeline.
note it is skipped.
Test: Ran `ffx target list` with an inentionally slow usb device and
Original-Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1623116
Original-Original-Revision: 7fb9e18b1d9f030b418fc919a9280a701c0f9f67
GitOrigin-RevId: fa109fe16c04252eead76957e71f55af9ab591a9
Change-Id: Ia39605d0548bf1ca12b4a09cbc6a4cbb65b7a1cc
Reviewed-on: https://fuchsia-review.googlesource.com/c/integration/+/1622396
Cr-Commit-Position: refs/heads/main@{#193465}
This repository contains Fuchsia's Global Integration manifest files.
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.
First install Jiri.
Next run:
$ jiri init $ jiri import minimal https://fuchsia.googlesource.com/integration $ jiri update
Third party projects should have their own subdirectory in ./third_party.