Skip to content

Commit 835f106

Browse files
committed
Harden native runtime shutdown evidence
1 parent 6773f9b commit 835f106

7 files changed

Lines changed: 38 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ behavior when the change improves security or project direction.
2828
bounds on decoded header-list bytes.
2929
- Keep HTTP/2 body, URI, trailer, response lifetime, flow-control, reset, and
3030
handler-timeout parity covered by the native server test suite.
31+
- Join aborted native stream and UDP listener tasks during shutdown so listener
32+
sockets are released before the background task returns.
33+
- Make the native runtime cutover evidence script assert that the
34+
representative config has zero blockers instead of relying on an empty
35+
expected-blocker set.
3136
- Keep the Pingora dependency policy active and enforce all remaining Pingora
3237
crates against the next deletion target.
3338

crates/fluxheim-runtime/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,10 @@ impl NativeBackgroundSupervisor {
277277
/// The returned handle represents the watchdog task itself. Do not register
278278
/// that handle with another watchdog: its exit only means all watched tasks
279279
/// have exited, not that an independent service failed.
280+
///
281+
/// Aborting or dropping the returned handle cancels only the collector that
282+
/// joins per-critical-task watchers. The individual watcher tasks continue
283+
/// running and still request supervisor shutdown if a critical task exits.
280284
pub fn spawn_critical_watchdog<I>(&self, handles: I) -> NativeBackgroundJoinHandle
281285
where
282286
I: IntoIterator<Item = NativeBackgroundJoinHandle>,

packaging/rpm/fluxheim.spec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ fi
157157
* Sat Jun 20 2026 Fluxheim Maintainers <1921261+eldryoth@users.noreply.github.com> - 1.6.24-1
158158
- Promote native HTTP/2 downstream parity to cutover-ready after completing
159159
the safety-hook proof.
160+
- Join aborted native stream and UDP listener tasks during shutdown.
161+
- Assert zero representative native-runtime blockers in release evidence.
160162
- Keep remaining Pingora runtime dependency removal targeted at 1.6.25 for a
161163
focused final deletion release.
162164
- Update release metadata for 1.6.24.

release-notes/RELEASE_NOTES_1.6.24.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ targeted for a focused `1.6.25` deletion release.
2222

2323
- Keep decoded HTTP/2 header-count enforcement before routing and document the
2424
paired decoded header-list byte bound from `h2` `max_header_list_size`.
25+
- Join aborted native stream and UDP listener tasks during shutdown, closing
26+
the short file-descriptor release window after an operator-triggered stop.
27+
- Add an explicit zero-blocker assertion to the native runtime cutover evidence
28+
script for the representative config.
2529
- Preserve native HTTP/2 tests for oversized URI rejection, oversized request
2630
bodies, decoded header count, request trailers, response trailers, prohibited
2731
HTTP/2 response headers, request flow-control release, response flow-control

scripts/validate-native-runtime-cutover.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,5 +164,26 @@ awk -F '\t' '
164164
' "$expected_blockers" "$out_dir/representative-runtime-cutover.tsv" \
165165
>"$out_dir/representative-runtime-cutover-expected-check.txt"
166166

167+
awk -F '\t' '
168+
/^native-runtime-adapter:/ { next }
169+
/^config tester: ok$/ { next }
170+
$1 == "blocker" { next }
171+
NF == 0 { next }
172+
NF != 3 {
173+
print "native runtime cutover evidence: malformed report row: " $0 > "/dev/stderr"
174+
exit 2
175+
}
176+
{
177+
unexpected_blocker_count++
178+
}
179+
END {
180+
if (unexpected_blocker_count > 0) {
181+
print "native runtime cutover evidence: expected zero representative blockers but found " unexpected_blocker_count > "/dev/stderr"
182+
exit 1
183+
}
184+
}
185+
' "$out_dir/representative-runtime-cutover.tsv" \
186+
>"$out_dir/representative-runtime-cutover-zero-blockers-check.txt"
187+
167188
echo "native runtime cutover evidence: wrote $out_dir"
168189
echo "native runtime cutover evidence: ok"

src/stream_proxy.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ impl FluxBackgroundTask for StreamProxyTask {
170170
let _ = shutdown.wait_for_shutdown().await;
171171
for task in tasks {
172172
task.abort();
173+
let _ = task.await;
173174
}
174175
}
175176
}

src/udp_proxy.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ impl FluxBackgroundTask for UdpProxyTask {
182182
let _ = shutdown.wait_for_shutdown().await;
183183
for task in tasks {
184184
task.abort();
185+
let _ = task.await;
185186
}
186187
}
187188
}

0 commit comments

Comments
 (0)