Progress messages logic might have race conditions #1749
Labels
component: ghcide
type: bug
Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
I'm not familiar with the current progress code, so the below is somewhat guesswork and assumption - happy to understand why I'm wrong. There seem to be two invariants around progress messages:
As far as I can tell, the way we ensure invariant 1 is by forking a progress thread and not doing a sleep at the beginning. Unfortunately, if you make the operations fast enough or lose a bunch of races, it doesn't get a progress notification, and we get failures. I'm seeing a failure with the ghcide benchmarking stuff I think comes from this.
As far as I can tell, the way we ensure invariant 2 is by hoping the initialise gets handled super quickly, and that the timer gets killed. Again, that's using sleeps and races to ensure the property.
I've changed a lot of timing properties around the Shake graph, and am suddenly getting a lot of errors from progress stuff. While these might be due to my changes, my debugging suggests progress itself might be at fault.
The text was updated successfully, but these errors were encountered: