Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OtherParseException thread killed is actively harmful #185

Closed
ndmitchell opened this issue Mar 8, 2020 · 3 comments
Closed

OtherParseException thread killed is actively harmful #185

ndmitchell opened this issue Mar 8, 2020 · 3 comments

Comments

@ndmitchell
Copy link
Contributor

In Ghcide I sometimes see an OtherParseException ThreadKilled coming out, as a result of a YAML parsing that got aborted. Unfortunately, the various layers of Ghcide consider that a deterministic errors, and thus never bother to retry the YAML parsing, leaving the IDE in a broken state.

It feels like the right solution is for YAML to rethrow any exceptions it doesn't understand, rather than passing them back as a Left value. If there are other exceptions that are legitimate, maybe just watching for ThreadKilled is enough - although in general any async exception should be bubbled upward.

@snoyberg
Copy link
Owner

snoyberg commented Mar 8, 2020

Sounds like a standard mishandling of async exceptions. Switching over to use unliftio in the relevant part of the cost should fix this. I'm not at my computer now, and won't be able to look at the code until later this week, but if someone wants to send a PR to replace the faulty exception handling code, that would be great.

@snoyberg
Copy link
Owner

snoyberg commented Mar 9, 2020

@ndmitchell I just pushed 4fac88c, can you give it a shot?

@ndmitchell
Copy link
Contributor Author

Thanks! It appears to work, but very hard to know, since it only fails with a race condition in an IDE. It used to happen pretty often, with this patch, it doesn't seem to be happening at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants