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

Can we report when the NC or incoming event handler crashes or blocks? #238

Open
facundominguez opened this issue Jun 19, 2015 · 1 comment

Comments

@facundominguez
Copy link
Contributor

When the NC thread or handleIncomingEvents crash, the application will probably block without further hints. It would be better if we printed some message in the console to report the problem. This won't help much, though, if the NC simply blocks not really terminating with an exception.

Another related aspect to consider is whether the NC really needs to die if there is an error handling any of the messages.

@qnikst
Copy link
Contributor

qnikst commented Jun 19, 2015

It's simply a matter of adding log output in exception handler:

https://github.com/haskell-distributed/distributed-process/blob/master/src/Control/Distributed/Process/Node.hs#L254-L260

I think writing to stderr will be fine because there are no other mechanism exists and there is no way to propagate exception, so user could catch it?

According to second question, ideally according to semantics error handling in messages should never happen, and it's a bug in implementation if we have such cases, so it's my be ok to just fail. But for user it's more expected if NC will survive and log error.

Any other thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Release 0.8
  
Backlog
Development

No branches or pull requests

2 participants