Completion markers assume command lists run in recording order
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 15/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- cpp
調査の方向性
Start from clean/rr_f/runtime/src/rr_runtime.cpp around marker_done (:496), pump (:505) and the slot wait (:2570), then look at the transient and arena release paths at :3448 and :3544. The fix is a design choice between a per-recording marker ring and documenting the submit-order contract. Done means the WARP test that records lists A (serial 1) and B (serial 2), runs only B, and asserts serial 1 is not done passes.
索引モデルが issue の本文から書いたものです。
説明
What happens
Both runtimes use one scalar completion marker and treat "marker observed >= s" as "every recording up to s is done". The marker is written by the recorded list, so this only holds if lists execute in the order they were recorded.
- RR:
clean/rr_f/runtime/src/rr_runtime.cpp:496(marker_done),pump(:505), slot wait (:2570), frame marker (:3408), transient marker (:3525). - Model M:
clean/runtime/device_d3d12.cpp:400(end_external),:421(external_done),:996(wait_external).
Model M: the marker belongs to one device, so to one context. If one context's frames ran out of order, its temporal history would already be wrong, so this is not a case that matters in practice.
RR: the marker is runtime-wide (rt.marker, rt.serial) and shared by every instance and by transient copies. If instance B's list runs before instance A's earlier list, B's serial covers A's outstanding work, and defer_release of A's old arena (:3448) or of a transient (:3544) can release early. Out-of-order execution can also move the marker backwards, because the lower serial is written last. That causes slot-wait timeouts (:2572) and failed frames rather than a use-after-free.
When it can happen
Rarely. A use-after-free needs several RR instances (for example two viewports) with lists submitted out of order or on different queues, and an arena regrow, resize or transient release inside that window. Transient copies recorded on a list that is submitted after the evaluate list already break the data dependency.
Found by reading the code. It has not been reproduced.
To do
This is a design discussion. Options:
- Replace the single maximum with a per-recording marker ring. The readback buffer is 256 bytes, so 64 dwords. Each recording writes its serial into dword
s % N, and recordingsis done when that dword equalss(low 32 bits) or a later serial that maps to the same dword. Bound the recordings in flight to N; the slot waits already bound this. Wrap handling needs care. - Or document the contract: one RR instance at a time, or submit in recording order.
Test
WARP. Record list A (serial 1), then list B (serial 2), using only WriteBufferImmediate. Execute B alone and wait for the queue. Assert that "serial 1 done" is false. This fails today and would pass with the ring.
Related: #63, #62, #65.
- 主要言語
- C++
- スター
- 12
- フォーク
- 2
- 平均マージ
- 3時間 10分
- マージ済み PR(30日)
- 171
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
phantoslayer21/wronggpu のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
phantoslayer21/wronggpu#275 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
phantoslayer21/wronggpu#274 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
phantoslayer21/wronggpu#241 ·
メンテナーはふだん 1 日以内に返信
-
bug build
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
phantoslayer21/wronggpu#234 ·
メンテナーはふだん 1 日以内に返信
-
bug build
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
phantoslayer21/wronggpu#233 ·
メンテナーはふだん 1 日以内に返信
phantoslayer21/wronggpu の issue をすべて見る
似ている issue
-
ai_p2
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
ClickHouse/ClickHouse#132519 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: VST3 getMidiControllerAssignment reads past midiControllerToParameter for program changeオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
juce-framework/JUCE#1810 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
petercorke/robotics-toolbox-python#952 ·
メンテナーはふだん 1 日以内に返信
-
NatronRenderer: a Python error in the script (-t / project script) doesn't change the exit statusオープンfunc:engine type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
NatronGitHub/Natron#1276 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信