A deploy during a long download kills the service with SIGABRT #3
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
systemctl restartduring an in-flight blob transfer hangs the drain untilTimeoutStopSecexpires, at which point systemd escalates toSIGABRTandthe process core-dumps.
Observed on bob during deploy run 28, while a 500MiB read was in progress:
The unit sets
TimeoutStopSec=120.Cause
shutdown()incrates/rustingface/src/cmd/serve.rshands off toaxum::serve(...).with_graceful_shutdown(...), which waits for in-flightrequests to finish. A blob response is an in-flight request, and it lasts
size / bandwidth— 420s for a 3.3GB shard at 8MB/s, well past the120-second stop timeout.
The docstring on
shutdown()reasons about detached transfers not beingwaited on, which is correct, but says nothing about client-facing streams,
which are what actually hold the drain open.
Why it matters more now
Before #1 was fixed, a proxied blob could not stream for longer than ~180
seconds — the ceiling was doing the job of a stop timeout by accident. With
that ceiling gone, transfers legitimately run for many minutes, so every
deploy that lands during one now risks this.
Nothing is lost from the bucket when it happens: the upload is a detached
task and a manifest entry is only written after the blob is durable, so the
worst case is an orphan blob that
gcreclaims. The cost is that everyclient mid-download is cut, and the service dies dirtily enough to write a
core dump.
Suggested direction
Either of, or both:
restart cuts downloads deliberately and promptly rather than by timeout
escalation. Clients retry; that is a normal, recoverable event.
TimeoutStopSecto something that reflects a real transfer, andaccept slower restarts.
The first is better: a bounded, intentional cut beats a two-minute stall
followed by
SIGABRTeither way, and it keeps deploys quick.