Github user aarondav commented on a diff in the pull request:
https://github.com/apache/spark/pull/1329#discussion_r14663412
--- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
---
@@ -768,6 +768,10 @@ class DAGScheduler(
abortStage(stage, "Task not serializable: " + e.toString)
runningStages -= stage
return
+ case e: Throwable => // Other exceptions, such as
IllegalArgumentException from Kryo.
--- End diff --
Please catch
[NonFatal(e)](http://www.scala-lang.org/files/archive/nightly/docs/library/index.html#scala.util.control.NonFatal$)
instead. I think we should catch StackOverflowError here (as that is a
possible error during serialization), but we should not catch OOMs and other
such throwables except to re-throw them.
NB: Despite what the documentation says, NonFatal does indeed seem to catch
StackOverflowError:
```scala
scala> NonFatal(new StackOverflowError())
res1: Boolean = true
scala> NonFatal(new OutOfMemoryError())
res2: Boolean = false
```
---
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.
---