Conversation
| -> Seed | ||
| -> Property | ||
| -> m (Report Result) | ||
| checkRegion region color name size seed prop = |
There was a problem hiding this comment.
You forgot to remove it from hedgehog/src/Hedgehog/Internal/Runner.hs
There was a problem hiding this comment.
I cannot remove those because they are needed by other functions in the Runner module.
moodmosaic
left a comment
There was a problem hiding this comment.
Thanks, @newhoggy. Good catch with setRegion vs openRegion. If the fix is in how checkNamed and checkRegion handle region output, was the new module strictly needed?
I cannot spot any difference with regards to |
|
@Bodigrim, the fix is the |
|
It looks like this was caused by a GHC bug causing threads to get stuck when multiple threads would enter a CAF closure in quick succession. You can try my proposed fix here: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/14734 If this is indeed the correct fix for the problem, we'll likely backport it to 9.10 and 9.12 |
|
Wow! Thank you @luite for this incredible insight and for tracking this down to a potential GHC bug! It seems I was mistaken earlier. Based on your analysis, the key change is the module split itself, which serves as a structural workaround for the GHC bug related to CAF contention, rather than any specific logic change in Given that the permanent solution lies upstream in GHC, I propose the following plan:
Many thanks to @newhoggy for discovering a workaround that not only unblocked users but also helped lead to the discovery of this underlying GHC issue. |
This is more of a work-around, but moving the
checkto a newHedgehog.Internal.Checkmodule, then copyingcheckNamedandcheckRegionfunctions to the same module solves a mysterious hanging issue when usingtastyandhedgehogtogether.The hang is verified to no longer happen with these changes by running the test in this branch:
https://github.com/newhoggy/tasty-hang/tree/newhoggy/fix-mysterious-hanging-issue
To run test, run:
then use this to watch for a hang:
Resolves #547