Http2Stream::do_io_write sets up the write VIO, then returns nullptr when the stream is not writeable
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 62/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- cpp
- 領域
- backend, networking
調査の方向性
Read Http2Stream::do_io_write in src/proxy/http2/Http2Stream.cc around lines 551–573, then inspect main_event around lines 231–237 to understand how write events use write_vio. Check existing HTTP/2 stream tests for coverage of writes on non-writeable streams. Done when that path cannot leave a caller-bound VIO or reader behind after returning nullptr, and the relevant tests pass.
索引モデルが issue の本文から書いたものです。
説明
Http2Stream::do_io_write assigns the reader, mutex, cont, nbytes, ndone, vc_server and op = VIO::WRITE to write_vio, and stores the reader in _send_reader. Only after that does it check is_state_writeable() and return nullptr for a stream that can't be written (Http2Stream.cc#L551-L573).
The caller sees a failed write and holds no VIO. The stream, however, now has an active write VIO bound to the caller's continuation and an alias of the caller's reader. Nothing prevents later write events from going out: main_event forwards VC_EVENT_WRITE_READY/WRITE_COMPLETE for &write_vio to write_vio.cont (Http2Stream.cc#L231-L237). So the caller can get callbacks for a VIO it was never given. And if the caller frees its buffer because the write "failed", _send_reader dangles.
I have not traced a specific in-tree sequence that leads to a callback or a dereference after the nullptr return. The inconsistency is in the function itself.
Suggested fix: check is_state_writeable() before modifying write_vio and _send_reader, or reset them before returning nullptr.
generated with Claude Opus 5.5 by Josiah VanderZee
- 主要言語
- C++
- スター
- 2k
- フォーク
- 903
- 平均マージ
- 4日 4時間
- マージ済み PR(30日)
- 135
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/trafficserver のほかの issue
-
UnixNetVConnection::do_io_write with a null reader leaves the previous reader in the write VIO対応中かも @NginxL が今日担当しました。 オープンBug Good First Issue IOBuffer Network
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/trafficserver#14220 ·
メンテナーはふだん 2 日以内に返信
-
MallocAllocator does not check for allocation failure対応中かも @umrndem が今日担当しました。 オープンBug Core Good First Issue
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/trafficserver#14218 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
-
Bug Event System Threads
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/trafficserver#14217 ·
メンテナーはふだん 2 日以内に返信
-
TSContScheduleEveryOnPool and TSContScheduleEveryOnThread accept a zero or negative period対応中かも @rajeetvk が 1 日前に担当しました。 オープンBug Event System Good First Issue TS API
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
apache/trafficserver#14214 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
HostDBContinuation::init memsets a polymorphic Action対応中かも @ANMOLSCRIPT が今日担当しました。 オープンBug Good First Issue HostDB
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
apache/trafficserver#14204 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
apache/trafficserver の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 2 日以内に返信
-
bug data-types
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
ClickHouse/clickhouse-cpp#645 ·
メンテナーはふだん 1 日以内に返信
-
bug compatibility difficulty:easy prio:normal
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
NatronGitHub/openfx-misc#524 ·
メンテナーはふだん 1 日以内に返信
-
documentation enhancement help wanted P0
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Awesome-Embedded-Learning-Studio/Tutorial_AwesomeModernCPP#359 ·
メンテナーはふだん 1 日以内に返信
-
Type: Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
openscad/openscad#7360 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信