ouroboros-network icon indicating copy to clipboard operation
ouroboros-network copied to clipboard

Extend support for peer selection governor tests with TimedScript not restricted to NoDelay/ShortDelay's

Open crocodile-dentist opened this issue 1 year ago • 0 comments

Peer selection governor tests fail eventually if a TimedScript is used which includes arbitrary delays built via Delay constructor. In contrast, everything works fine as long as NoDelay/ShortDelay are employed, where a ShortDelay is interpreted as threadDelay of 1 second. Even 'small' delays of eg. 2 seconds are sufficient to make this issue apparent. An example trace of this issue shows that a Deadlock is reported, but no exception is raised.

3s - Thread [5] outbound-governor - Unblocked []
3s - Thread [5] outbound-governor - Deschedule Yield
3s - Thread [5] outbound-governor - TxBlocked [TVarId 3, TVarId 13, TVarId 15, TVarId 20, TVarId 24, TVarId 26]
3s - Thread [5] outbound-governor - Deschedule Blocked BlockedOnSTM
Deadlock (Time 3s) [Labelled (ThreadId []) (Just "main"),Labelled (ThreadId [5]) (Just "outbound-governor")]

crocodile-dentist avatar May 10 '24 13:05 crocodile-dentist