Commit 01c25f8
authored
Fix flaky Android NDK download in QNN CI setup (#20678)
Summary:
QNN CI jobs intermittently fail during environment setup while
downloading the Android NDK, with the signature `curl: (92) HTTP/2
stream 0 was not closed cleanly: INTERNAL_ERROR (err 2)`. Because this
happens in the shared `setup_android_ndk` step (used by
`build-qnn-sdk.sh`, `build-qnn-direct-sdk.sh`, and `setup-qnn-deps.sh`),
the failure surfaces on a different test each run but always with the
same signature.
The failure is an intermittent HTTP/2 stream reset from `dl.google.com`
mid-transfer. Two gaps made it fatal rather than self-healing: the
existing `curl --retry 3` never retried it, because curl's default retry
set does not include transport error 92 (and `--retry-connrefused` does
not cover it either); and `set -ex` then aborted the whole script on the
first occurrence.
This mirrors the download-robustness pattern already used by
`install_qnn` and `install_hexagon_sdk` in the same file, and applies it
to `setup_android_ndk`:
- `--http1.1` sidesteps the HTTP/2 stream-reset behavior entirely (the
standard workaround for this Google CDN error).
- `--retry-all-errors` makes the retry count apply to transport failures
such as error 92.
- `--fail` treats HTTP errors as failures instead of writing an error
body into the zip.
- The download is wrapped in a 5-attempt loop that removes any partial
file and validates the archive with `unzip -tq` before extracting, so a
truncated or corrupt download cannot slip through to a confusing `unzip`
error. The risky `--continue-at -` resume is dropped.
Differential Revision: D1103735811 parent 71a80d7 commit 01c25f8
1 file changed
Lines changed: 19 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
31 | 49 | | |
32 | 50 | | |
33 | 51 | | |
| |||
0 commit comments