Github user aarondav commented on the pull request:
https://github.com/apache/spark/pull/639#issuecomment-42705008
@markhamstra Further testing (test code
[here](https://gist.github.com/aarondav/ca1f0cdcd50727f89c0d)) seems to
indicate that the uncaughtExceptionHandler is **not** called in any of these
cases:
- Error in actor receive (causes a LocalActorRefProvider guardian failure
and shuts down the system)
- Error in scheduler (special TaskInvocation logic seems to catch this)
- Error in future using actor's context.dispatcher (not propagated anywhere
I can see)
The last one was especially surprising, but further investigation indicates
that the ExecutionContext in context.dispatcher is unrelated to the
ThreadFactory. Custom specification of a default ExecutionContext was added in
Akka 2.3.0 version
(https://github.com/akka/akka/commit/4b2d98c5cbf4bccb2de34e26f009510a98f725a0).
TL;DR It's pretty hard to get a custom exception handler that logs any
errors in Akka-related threads.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---