Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

`Change graceful_shutdown function behavior` PR can cause tonic servers to hang `serve_with_incoming_shutdown` in two different cases

Aperta
#4,170 4 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@seanmonstar ci sta già lavorando.

Dal 27/8/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

A-http2 C-bug
Version

Foudn in hyper 1.5.1 and later

Platform

25.5.0 (macOS), though it is also applying on our linux bots

Summary

At OneSignal we have a number of tonic gRPC services we maintain. After a recent update of dependencies on one of them, we noticed that it "randomly" would hang during shutdown for an hour or more.

After a week of chasing the wild goose, we have isolated it to a single PR introduced in hyper 1.5.1:

https://github.com/hyperium/hyper/pull/3729

In these cases a tonic server:

            Server::builder()
                .add_service(GreeterServer::new(MyGreeter::default()))
                .serve_with_incoming_shutdown(incoming, async move {
                    shutdown_grpc_token.cancelled().await
                })
                .await
                .unwrap();

would never return and block for an hour or more after the shutdown_grpc_token CancellationToken was canceled.

We have a primary example non_upgrade_connections_can_block_shutdown and a secondary one we found along the way client_not_responding_example in this self contained example:

https://github.com/chamons/hyper_hung_client_example

With a patch.crates-io line, we can resolve this branch with the PR reverted and both of these example begin acting as expected.

Expected Behavior

It is not expected that passive tonic gRPC connections to a server that are unused would block shutdown. Before 1.5.1 they did not.

Actual Behavior

We block until the upstream instance restarts or otherwise drops all of its connections.

Additional Context

No response

Lingua principale
Rust
Stelle
16.3k
Fork
1.8k
Merge medio
1g 23h
PR unite (30g)
13

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di hyperium/hyper

Tutte le issue di hyperium/hyper

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.