Repository navigation
fix(ci): stop dcutr test leaking a channel; run full daily CI on label - #2808
Conversation
a1c0636 to
d7d04cb
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2808 +/- ##
=========================================
Coverage ? 81.07%
=========================================
Files ? 171
Lines ? 31138
Branches ? 12
=========================================
Hits ? 25245
Misses ? 5893
Partials ? 0 🚀 New features to boost your workflow:
|
| - name: Compile nimbus using nim-libp2p | ||
| run: | | ||
| git clone --branch unstable --single-branch https://github.com/status-im/nimbus-eth2.git | ||
| cd nimbus-eth2 | ||
| git submodule set-branch --branch ${{ github.sha }} vendor/nim-libp2p | ||
|
|
||
| make -j"$(nproc)" | ||
| make -j"$(nproc)" nimbus_beacon_node |
There was a problem hiding this comment.
So, i just realized that this daily job wasnt really testing the github.sha because the make in line 30 will reset the submodules and use those that are pinned by nimbus, and building the nimbus_beacon_node twice, since it already does it with make, lol 🤦
we should do something like this instead (and also just build the nimbus_beacon_node which is what uses libp2p)
- name: Compile nimbus using nim-libp2p
env:
GITHUB_SHA: ${{ github.sha }}
run: |
git clone --branch unstable --single-branch https://github.com/status-im/nimbus-eth2.git
cd nimbus-eth2
git submodule update --init --recursive
cd vendor/nim-libp2p
git fetch https://github.com/vacp2p/nim-libp2p.git "$GITHUB_SHA"
git checkout FETCH_HEAD
cd ../..
make -j"$(nproc)" nimbus_beacon_nodeThere was a problem hiding this comment.
Unrelated to this pr tho, correct? or do you want me to add these changes here?
There was a problem hiding this comment.
nvm claude figured out a fix, seems simple enough to add here
b576491 to
1312130
Compare
Summary
Three related changes:
LPChannelleak in the daily-CIDcutrsuite that spills into every subsequent test.run-daily-cilabel trigger the full daily set, so this fix can actually be validated on the runner that catches it.Daily Nimbusjob so it actually compiles against the PR's commit instead of nimbus's pinnednim-libp2p.1. The Dcutr channel leak
Dcutr::All client connect attempts failfailscheckTrackers()with one leaked mplexLPChannel(Opened 3242 / Closed 3241). Because the chronos trackers are process-global and the orphaned channel never closes, every test that runs after it also fails itsteardown: checkTrackers()— the observedDcutr .....FFFFcascade off a single leak.The leak is a teardown race in the inbound-upgrade path (
switch.nimupgrader):The client tests waited with
checkUntilTimeout: connCount == 2, which returns the instantstoreMuxerbumps the count — beforepeerStore.identifyhas opened/closed its stream. The tests then stop both switches immediately, so on a slow runner (the macOS daily job)switch.stop()races the in-flight identifyLPChanneland orphans it. On fast Linux the identify finishes first, so it does not reproduce there.Fix: wait for the direct connection to be identified (
PeerEventKind.Identified, fired only after the identify stream is opened and closed), not merely connected, before teardown — the same event-based approach already used for the QUIC test in #2762. Applied to the two client paths ("DCUtR establishes a new connection" and theductrClientTesttemplate covering "Client connect timeout" and "All client connect attempts fail").The server tests (
connCount == 1) and the QUIC test are left unchanged: the server tests'dir = Indial never completes a mux handshake against a plain accept (so it opens noLPChannel), and QUIC doesn't use mplexLPChannel— neither is a leak source, they only inherited the spill.2.
run-daily-cilabel triggers the full daily setThe leak only surfaces on the macOS
Daily without feature flagsjob, but therun-daily-cilabel previously only triggeredDaily test all (latest dependencies)(linux amd64/i386, windows) andDaily runnable examples. The two remaining daily workflows monitored bydaily_ci_report.yml—Daily without feature flags(macos-15) andDaily Nimbus— ran on schedule only, so labeling a PR could not reproduce the failing job.Added the existing
pull_request: [labeled, synchronize]+run-daily-ciguard + concurrency block to those two workflows (daily_test_all_no_flags.yml,daily_nimbus.yml), so the label now runs exactly the set that constitutes daily CI. Scheduled/dispatch behavior is unchanged.Daily i386needs no separate workflow — the i386 matrix entry already lives inDaily test all (latest dependencies), which is label-triggered.3.
Daily Nimbuscompiles the PR's commitThe
Daily Nimbusjob wasn't testinggithub.sha:git submodule set-branch --branch <sha>had no effect because the subsequentmakere-checked out thenim-libp2ppinned by nimbus, and it built the full nimbus target twice. It now clones nimbus-eth2, checks outgithub.shainvendor/nim-libp2pviagit fetch/git checkout FETCH_HEAD, and builds onlynimbus_beacon_node(the target that uses libp2p). The redundantactions/checkoutstep is dropped, since the source comes from the nimbus submodule.Affected Areas
Impact on Library Users
No impact — test- and CI-only changes. No library/API/behavior changes.