FlagdProvider default keep_alive_time=0 causes GOAWAY crash with flagd server
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- python
- 領域
- backend, networking
調査の方向性
config.py の DEFAULT_KEEP_ALIVE と grpc.py の _generate_channel() から始め、次にリゾルバータイプ IN_PROCESS と RPC の両方がどのようにチャネルを構築するかを確認します。デフォルト値を増やすか、値がゼロの場合に keepalive オプションを省略するかを決めます。デフォルト値によって即時の ping、GOAWAY、または報告されている ARM クラッシュが発生しなくなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Description
The FlagdProvider defaults keep_alive_time to 0 (DEFAULT_KEEP_ALIVE = 0 in config.py), which is passed directly to grpc.keepalive_time_ms as a channel option.
In the Python gRPC C-core implementation, keepalive_time_ms=0 is interpreted as "send pings immediately / every ~1ms" rather than "disabled". This causes flagd's Go gRPC server to reject the connection with:
GOAWAY [ENHANCE_YOUR_CALM] "too_many_pings"
flagd's Go gRPC server uses the default grpc-go enforcement policy with MinPingInterval=5min. Any keepalive interval below 5 minutes triggers the GOAWAY.
Impact
- On aarch64/ARM (e.g., Raspberry Pi), the GOAWAY triggers a fatal gRPC C-core assertion failure in
ev_epoll1_linux.cc:Check failed: next_worker->state == KICKED— crashing the entire Python process - On x86_64, the client typically reconnects but logs repeated GOAWAY warnings, degrading performance and reliability
This affects both the IN_PROCESS and RPC resolver types since both create gRPC channels with the same keepalive options.
Reproduction
from openfeature.contrib.provider.flagd import FlagdProvider
from openfeature.contrib.provider.flagd.config import ResolverType
# Default keep_alive_time=0 → immediate crash/GOAWAY with flagd server
provider = FlagdProvider(
host="flagd",
port=8015,
resolver_type=ResolverType.IN_PROCESS,
)
flagd server logs:
Received a GOAWAY with error code ENHANCE_YOUR_CALM and debug data equal to "too_many_pings"
Client crash (ARM only):
F0000 00:00:1773608949.106482 38 ev_epoll1_linux.cc:1125] Check failed: next_worker->state == KICKED
Suggested Fix
Change the default from 0 to a value that respects flagd's server-side MinPingInterval of 5 minutes:
# config.py
DEFAULT_KEEP_ALIVE = 600000 # 10 minutes (ms) — above flagd's 5min MinPingInterval
Or alternatively, don't set grpc.keepalive_time_ms at all when keep_alive_time=0, letting the gRPC library use its own default (which is "infinite" / disabled in the C-core):
# grpc.py - _generate_channel()
options = []
if config.keep_alive_time > 0:
options.append(("grpc.keepalive_time_ms", config.keep_alive_time))
Workaround
Set keep_alive_time explicitly when creating the provider:
provider = FlagdProvider(
host="flagd",
port=8015,
resolver_type=ResolverType.IN_PROCESS,
keep_alive_time=600000, # 10 minutes
)
Or via environment variable:
FLAGD_KEEP_ALIVE_TIME_MS=600000
Environment
openfeature-provider-flagdversion: 0.2.7- flagd version: v0.13.2
- Python: 3.11 (aarch64-linux-gnu)
- grpcio: compiled with C-core (not pure-Python)
- Platform: Raspberry Pi 5 (ARM64)
- 主要言語
- Python
- スター
- 27
- フォーク
- 33
- 平均マージ
- 1日 17時間
- マージ済み PR(30日)
- 15
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
open-feature/python-sdk-contrib のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
open-feature/python-sdk-contrib#439 ·
メンテナーはふだん 1 日以内に返信
-
UnleashProvider.track has the wrong signature: client.track raises TypeError instead of no-op対応中かも @aepfli が 26 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
open-feature/python-sdk-contrib#433 ·
メンテナーはふだん 1 日以内に返信
-
Restore the .gitmodules branch pins so Renovate tracks flagd submodule versions again対応中かも @aepfli が 30 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
open-feature/python-sdk-contrib#421 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
open-feature/python-sdk-contrib#417 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
fix(flagd): use custom channel credentials in RPC resolver対応中かも @tuhinkanti が 9 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
open-feature/python-sdk-contrib#454 ·
メンテナーはふだん 1 日以内に返信
open-feature/python-sdk-contrib の issue をすべて見る
似ている issue
-
Agentic
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Imbad0202/academic-research-skills#979 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
reflex-dev/reflex#7561 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
prometheus-community/ansible#906 · コメント 2 件 ·