Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1453: Add uninterruptibleMask wrapper to a takeMVar in ImmDB and VolDB r=nfrisby a=nfrisby Fixes #1452. This PR prevents wraps the `takeMVar` calls mentioned in the Issue in the sledgehammer `uninterruptibleMask_`. I've scanned for other uses of the `STM` variables to ensure that they're never empty for very long (`uninterruptibleMask_` should not be used on calls that may block for "long" durations) and also added another couple `mask` calls to ensure that every `take` is always paired with a subsequent `put`. I'm opening this as a Draft PR (edit: we're proceeding, see Issue 1464) because: * I want another developer to confirm that `uninterruptibleMask_` is the desired solution here. Maybe we can re-architect instead? A note: the immediately surrounding `bracket` starts with `takeMVar`, so the `uninterruptibleMask_` isn't really necessary for that one. But in the repros (currently only on my local PR 1419, sadly) there are more outer layers of `mask` (actually `bracket`, I think) that do other things before reaching this `takeMVar`. * The timing involved on this problem seems delicate enough that it's not obvious to me how to add a repro to the test suite. (Beyond being delicate, I'm unsure I can disentangle my current repros from PR 1419.) Maybe there's a promising way to add this to `test-storage` (with which I am not yet familiar). @mrBliss @edsko, can you advise? Co-authored-by: Nicolas Frisby <nick.frisby@iohk.io>
- Loading branch information