input-output-hk / input-output-hk/fs-sim

Potential deadlock in `simHasFS`

Open
#82 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Haskell
Stars
2
Forks
6
Avg merge
3d 22h
Merged PRs (30d)
1

Description

https://github.com/input-output-hk/fs-sim/blob/2d85d65814f4573270bb0c30a0d0bde6e9209a9b/fs-sim/src/System/FS/Sim/STM.hs#L77-L86

If an exception happens between `takeTMVar` and `putTMVar`, then the `TMVar` will be left empty. This is a potential deadlock situation

Contributor guide

Open the contributing guide

Research direction

Read fs-sim/src/System/FS/Sim/STM.hs at lines 77-86 and trace how simHasFS handles the TMVar. Investigate the exception path between takeTMVar and putTMVar, then verify that the TMVar cannot remain empty and that the potential deadlock scenario is covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.