SIGTERM is unhandled, so every managed restart is a hard kill
- Dominant language
- Rust
- Stars
- 3
- Forks
- 0
- Avg merge
- 1d 42m
- Merged PRs (30d)
- 11
Description
The server does not handle SIGTERM, so every managed restart is a hard kill with connections in flight.
`serve`'s own doc comment in `rs/cyphr-server/src/lib.rs` says it "blocks until SIGTERM/SIGINT". `shutdown_signal()` awaits `tokio::signal::ctrl_c()` only, which is SIGINT. SIGTERM — what systemd, Docker, Kubernetes and a bare `kill` all send by default — is unhandled, so the process dies on the default disposition without draining.
## Reproduction
Send SIGINT:
```
shutdown signal received, draining connections
server stopped
```
Send SIGTERM: neither line appears. The last entry in the log is `server started`.
## Impact
The store survives — restarting after a SIGTERM kill opens cleanly with no stale lock — so the damage is bounded to requests in flight. But that is every `systemctl restart`, every container stop, and every rolling deployment.
The doc comment claiming both signals makes it worse: an operator reading the source concludes draining is handled.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in rs/cyphr-server/src/lib.rs, reading the serve doc comment and the shutdown_signal() implementation. Reproduce the difference between SIGINT and SIGTERM, then verify that SIGTERM produces the draining and stopped log messages and no longer hard-kills the server with connections in flight.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100