binder: A Channel might check its SecurityPolicy even after declaring termination
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 42/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 静か
- 技術スタック
- java
調査の方向性
まず BinderClientTransport の AsyncSecurityPolicy パスを読み、特に checkServerAuthorizationAsync()、checkAuthorization()、shutdownNow()、および transportTerminated() コールバックを確認します。offloadExecutor への送信と状態遷移を追跡し、終了後に認可が実行される可能性があるかを判断します。ライフサイクルの保証が確立され、回帰テストまたは明確に文書化された根拠によって裏付けられれば完了です。
索引モデルが issue の本文から書いたものです。
説明
What version of gRPC-Java are you using?
master/HEAD on any version of Android
What did you expect to see?
Some reasoning/guarantee that a Channel will no longer call into its SecurityPolicy after it declares termination.
Steps to reproduce the bug
One of many ways is to call ManagedChannel.shutdownNow() while it's establishing a new connection.
Analysis
When using AsyncSecurityPolicy, BinderClientTransport calls checkServerAuthorizationAsync() while holding its this lock and only after carefully checking that it's not in state SHUTDOWN or SHUTDOWN_TERMINATED. This is safe because clientTransportListener.transportTerminated() is only called after transitioning into those states while holding the same lock. (We do this on the assumption that AsyncSecurityPolicy checks don't block)
However, when using an ordinary blocking SecurityPolicy, checkServerAuthorizationAsync() is implemented by submit()ing this presumably blocking work to offloadExecutor. We first do the same state checks, but because we release the this lock, the transport could shutdown and declare termination after this submission but before the offload executor actually calls checkAuthorization().
- 主要言語
- Java
- スター
- 12.1k
- フォーク
- 4k
- 平均マージ
- 2日 3時間
- マージ済み PR(30日)
- 30
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
grpc/grpc-java のほかの issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
grpc/grpc-java#13063 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
grpc/grpc-java#13052 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
docs enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
grpc/grpc-java#10824 · コメント 8 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
link-check link-check:manual
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
open-telemetry/opentelemetry-java#8870 ·
メンテナーはふだん 1 日以内に返信
-
P2 testing
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
enhancement javascript
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
area/core kind/bug status/triage team/core-shared
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信