Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#4,170 コメント 4 件 リアクション 0 件 担当者 1 名 GitHub で見る

@seanmonstar がすでに取り組んでいます。

2026年8月27日 から。

評価

この issue はまだ評価されていません。

説明

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

主要言語
Rust
スター
16.3k
フォーク
1.8k
平均マージ
1日 23時間
マージ済み PR(30日)
13

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

hyperium/hyper のほかの issue

hyperium/hyper の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。