IOSimPOR fails to find a race under specific circumstances
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- haskell
調査の方向性
まず、報告されている GHC 9.6.6、io-sim 1.6.0.0、io-classes 1.7.0.0 のバージョンを使って、atomically $ writeTQueue tq () の行がある場合とない場合の prop_race ケースを再現します。exploreSimTrace と exploreRaces の動作を読み、提供された fail.txt のトレースと比較します。両方のバリアントで IOSimPOR がデッドロックの race を検出すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
This test case:
prop_race :: Property
prop_race = exploreSimTrace id action $ \_ trace ->
case traceResult False trace of
Left (FailureDeadlock err) -> counterexample (ppTrace trace) $ property False
_ -> property True
where
action :: IOSim s ()
action = do
exploreRaces
ref <- newMVar 0
tq <- atomically newTQueue
let f = do
atomically $ writeTQueue tq ()
bracketOnError
(takeMVar ref)
(tryPutMVar ref)
(putMVar ref . (+1))
t1 <- async f
t2 <- async f
async (cancel t1) >>= wait
wait t2
wait t1
will succeed. However removing the atomically $ writeTQueue tq () will make it fail because of a Deadlock. The deadlock is indeed present in the implementation: t1 takes, t1 puts, t1 receives exception, t2 takes, t1 tryPut succesfully, t2 blocks on put.
Writing to that tqueue before running the bracketOnError results in the race not being found by IOSimPOR. This looks like a direct bug.
Desktop (please complete the following information):
GHCversion: 9.6.6io-simversion: 1.6.0.0io-classesversion: 1.7.0.0
Additional context
Add any other context about the problem here. Attach io-sim or io-sim-por trace if possible.
A trace with the deadlock if removing the mentioned line:
fail.txt
- 主要言語
- Haskell
- スター
- 57
- フォーク
- 25
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
IntersectMBO/io-sim のほかの issue
-
`timeout` under `mask_`: a cancelled assassin's exception is delivered after the frame対応中かも @coot が 1 日前に担当しました。 オープンbug
IntersectMBO/io-sim#269 · 担当者 1 名 ·
-
Implement a workaround for "Overwhelming the TimerManager"対応中かも @coot が 21 日前に担当しました。 オープンenhancement
IntersectMBO/io-sim#268 · コメント 1 件 · 担当者 1 名 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
IntersectMBO/io-sim#258 ·
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 55/100
IntersectMBO/io-sim#248 · コメント 1 件 ·
-
SimEvent redesignオープン
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
IntersectMBO/io-sim#244 · コメント 1 件 ·
IntersectMBO/io-sim の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
Vim-mode indent crashes: monaco-vim's browser build inlines monaco-editor 0.33対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
compiler-explorer/compiler-explorer#9402 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
objectionary/phino#2137 ·
メンテナーはふだん 1 日以内に返信