You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "Sarthak-Pandey (via GitHub)" <gi...@apache.org> on 2026/10/17 05:53:11 UTC
[PR] ci/workflow: resolve network timeouts in CI Docker workflows [nuttx]
Sarthak-Pandey opened a new pull request, #20707:
URL: https://github.com/apache/nuttx/pull/20707
## Summary
This PR resolves intermittent network connection timeouts (`curl: (28) Failed to connect to github.com port 443 after 134xxx ms: Connection timed out`) observed during CI Docker builds on GitHub Actions (fixes #14682).
### Root Causes Addressed:
1. **Burst Concurrency & Missing Retries:** When parallel matrix jobs run simultaneously, multiple concurrent HTTPS connections to external dependencies (`libcxx`, `NimBLE`, `LVGL`, etc.) trigger throttling or dropped packets on GitHub edge firewall. Without explicit retry and connect timeouts, `curl` stalled for >130s and aborted the build.
2. **Matrix Fail-Fast Behavior:** Default `fail-fast: true` caused GitHub Actions to cancel all 12 parallel jobs whenever a single job suffered a transient download timeout, wasting hours of runner minutes.
3. **PMTU / MTU Mismatches in Docker:** The default Docker bridge MTU (1500) can exceed cloud runner network MTUs (often 1400–1450 due to overlay encapsulation), resulting in PMTU blackhole drops during TLS certificate exchange.
### Key Changes:
- **`tools/Config.mk`**:
- Enhanced `DOWNLOAD` macro with `--connect-timeout $(DOWNLOAD_TIMEOUT)`, `--retry $(DOWNLOAD_RETRY)`, and `--retry-delay $(DOWNLOAD_DELAY)` (configurable with defaults: timeout 30s, retry 5, delay 5s).
- Added a 5-attempt retry loop to the `CLONE` macro for git repositories (e.g., ESP/Xtensa HALs).
- **`tools/ci/cibuild.sh` & `.github/workflows/build.yml`**:
- Injected default `~/.curlrc` (`connect-timeout = 30`, `retry = 5`, `retry-delay = 5`) into container and host environments so standalone scripts calling `curl` directly are protected from network flakiness.
- **`.github/workflows/build.yml`**:
- Set `fail-fast: false` on `Linux` and `macOS` build strategies to prevent a single transient job failure from terminating other running jobs.
- Added a `Configure Docker MTU` step setting Docker MTU to `1400` in `/etc/docker/daemon.json` to prevent PMTU blackholes.
Fixes #14682
## Impact
- **Build Process:** Significantly improves CI resilience against transient GitHub network spikes and timeout failures.
- **CI Resource Efficiency:** Saves GitHub runner minutes by preventing cascading cancellations of matrix builds (`fail-fast: false`).
- **Compatibility:** No breaking changes. Existing build commands and local builds remain fully compatible; timeout and retry parameters can be overridden via `DOWNLOAD_TIMEOUT`, `DOWNLOAD_RETRY`, and `DOWNLOAD_DELAY`.
## Testing
1. Verified `curl` timeout and retry behavior:
- Confirmed curl exits early after 30s instead of hanging for 134+ seconds and automatically retries with backoff upon connection timeout.
2. Git diff and whitespace verification:
- Passed `git diff --check` with 0 whitespace issues.
3. YAML syntax verification:
- Validated `.github/workflows/build.yml` structure and matrix strategy keys (`fail-fast: false`).
4. Makefile macro expansion:
- Verified `DOWNLOAD` and `CLONE` expansions in `tools/Config.mk`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ci/workflow: resolve network timeouts in CI Docker workflows [nuttx]
Posted by "casaroli (via GitHub)" <gi...@apache.org>.
casaroli commented on code in PR #20707:
URL: https://github.com/apache/nuttx/pull/20707#discussion_r4398251357
##########
tools/ci/cibuild.sh:
##########
@@ -38,6 +38,15 @@ else
osname=${os}
fi
+# Configure curl defaults to handle CI network timeouts & flakiness
+if [ -n "${HOME:-}" ] && [ ! -f "${HOME}/.curlrc" ]; then
Review Comment:
cibuild.sh also runs on developer hosts (`-i` installs the tools there). This block creates `~/.curlrc` and leaves it, so it changes every later curl call of that user. The DOWNLOAD macro already sets these options.
Fix: remove this block.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ci/workflow: resolve network timeouts in CI Docker workflows [nuttx]
Posted by "Sarthak-Pandey (via GitHub)" <gi...@apache.org>.
Sarthak-Pandey commented on code in PR #20707:
URL: https://github.com/apache/nuttx/pull/20707#discussion_r4397408723
##########
boards/xtensa/esp32s3/esp32s3-devkit/configs/mbedtls/defconfig:
##########
@@ -6,6 +6,7 @@
# modifications.
#
# CONFIG_ARCH_LEDS is not set
+# CONFIG_MBEDTLS_DES_C is not set
Review Comment:
Done, dropped.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ci/workflow: resolve network timeouts in CI Docker workflows [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #20707:
URL: https://github.com/apache/nuttx/pull/20707#discussion_r4396290310
##########
boards/xtensa/esp32s3/esp32s3-devkit/configs/mbedtls/defconfig:
##########
@@ -6,6 +6,7 @@
# modifications.
#
# CONFIG_ARCH_LEDS is not set
+# CONFIG_MBEDTLS_DES_C is not set
Review Comment:
please drop this patch since https://github.com/apache/nuttx-apps/pull/3857
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ci/workflow: resolve network timeouts in CI Docker workflows [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #20707:
URL: https://github.com/apache/nuttx/pull/20707#issuecomment-6420941433
> @xiaoxiang781216 , yes sir but can i ask why is their any wrong thing i have done
ok, I got confused with another patch. please https://github.com/apache/nuttx/pull/20707/changes#diff-29642ff7f4479e22096c02c2684d06689d9f8f67def1a1ec0e8780b4b10cecbbR9 and rebase to the latest master.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ci/workflow: resolve network timeouts in CI Docker workflows [nuttx]
Posted by "Sarthak-Pandey (via GitHub)" <gi...@apache.org>.
Sarthak-Pandey commented on PR #20707:
URL: https://github.com/apache/nuttx/pull/20707#issuecomment-6420637972
@xiaoxiang781216 ,
yes sir but can i ask why is their any wrong thing i have done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] tools: Add retries to the DOWNLOAD and CLONE macros [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #20707:
URL: https://github.com/apache/nuttx/pull/20707
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ci/workflow: resolve network timeouts in CI Docker workflows [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #20707:
URL: https://github.com/apache/nuttx/pull/20707#issuecomment-6420216731
@Sarthak-Pandey should we close this pr directly?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ci/workflow: resolve network timeouts in CI Docker workflows [nuttx]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20707:
URL: https://github.com/apache/nuttx/pull/20707#issuecomment-6230451350
<!-- membrowse-pr-comment -->
## <img src="https://membrowse.com/membrowse-logo.svg" height="24" align="top"> MemBrowse Memory Report
*No memory changes detected for:*
- [arduino-mega2560](https://membrowse.com/public/apache/nuttx/target/arduino-mega2560/compare?head=291d42b92b4cc2ece625c70b7cdbe1b22ddcb25e&base=1f261d5991dfff69a2fd1db0a2121a222a27fcfb)
- [esp32-devkitc](https://membrowse.com/public/apache/nuttx/target/esp32-devkitc/compare?head=291d42b92b4cc2ece625c70b7cdbe1b22ddcb25e&base=1f261d5991dfff69a2fd1db0a2121a222a27fcfb)
- [hifive1-revb](https://membrowse.com/public/apache/nuttx/target/hifive1-revb/compare?head=291d42b92b4cc2ece625c70b7cdbe1b22ddcb25e&base=1f261d5991dfff69a2fd1db0a2121a222a27fcfb)
- [mirtoo](https://membrowse.com/public/apache/nuttx/target/mirtoo/compare?head=291d42b92b4cc2ece625c70b7cdbe1b22ddcb25e&base=1f261d5991dfff69a2fd1db0a2121a222a27fcfb)
- [qemu-armv8a](https://membrowse.com/public/apache/nuttx/target/qemu-armv8a/compare?head=291d42b92b4cc2ece625c70b7cdbe1b22ddcb25e&base=1f261d5991dfff69a2fd1db0a2121a222a27fcfb)
- [qemu-intel64](https://membrowse.com/public/apache/nuttx/target/qemu-intel64/compare?head=291d42b92b4cc2ece625c70b7cdbe1b22ddcb25e&base=1f261d5991dfff69a2fd1db0a2121a222a27fcfb)
- [rx65n-rsk2mb](https://membrowse.com/public/apache/nuttx/target/rx65n-rsk2mb/compare?head=291d42b92b4cc2ece625c70b7cdbe1b22ddcb25e&base=1f261d5991dfff69a2fd1db0a2121a222a27fcfb)
- [s698pm-dkit](https://membrowse.com/public/apache/nuttx/target/s698pm-dkit/compare?head=291d42b92b4cc2ece625c70b7cdbe1b22ddcb25e&base=1f261d5991dfff69a2fd1db0a2121a222a27fcfb)
- [stm32-nucleo-f103rb](https://membrowse.com/public/apache/nuttx/target/stm32-nucleo-f103rb/compare?head=291d42b92b4cc2ece625c70b7cdbe1b22ddcb25e&base=1f261d5991dfff69a2fd1db0a2121a222a27fcfb)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ci/workflow: resolve network timeouts in CI Docker workflows [nuttx]
Posted by "Sarthak-Pandey (via GitHub)" <gi...@apache.org>.
Sarthak-Pandey commented on code in PR #20707:
URL: https://github.com/apache/nuttx/pull/20707#discussion_r4397553637
##########
.github/workflows/build.yml:
##########
@@ -611,7 +611,7 @@ jobs:
shell: msys2 {0}
steps:
- uses: actions/checkout@v7
- - uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2.32.0
+ - uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2.32.0
Review Comment:
Done, reverted.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ci/workflow: resolve network timeouts in CI Docker workflows [nuttx]
Posted by "Sarthak-Pandey (via GitHub)" <gi...@apache.org>.
Sarthak-Pandey commented on PR #20707:
URL: https://github.com/apache/nuttx/pull/20707#issuecomment-6468691953
Hi @jerpelea, thank you for pointing this out. Yes, I did use AI assistance while working on this PR, and I apologize for not marking it accordingly. I’ll make sure to update the disclosure to be transparent. Thank you for bringing this to my attention.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ci/workflow: resolve network timeouts in CI Docker workflows [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #20707:
URL: https://github.com/apache/nuttx/pull/20707#discussion_r4397449490
##########
.github/workflows/build.yml:
##########
@@ -611,7 +611,7 @@ jobs:
shell: msys2 {0}
steps:
- uses: actions/checkout@v7
- - uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2.32.0
+ - uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2.32.0
Review Comment:
revert
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org