GitHub user JoshRosen opened a pull request:
https://github.com/apache/spark/pull/4944
[SPARK-6209] Clean up connections in ExecutorClassLoader after failing to
load classes (master branch PR)
ExecutorClassLoader does not ensure proper cleanup of network connections
that it opens. If it fails to load a class, it may leak partially-consumed
InputStreams that are connected to the REPL's HTTP class server, causing that
server to exhaust its thread pool, which can cause the entire job to hang. See
[SPARK-6209](https://issues.apache.org/jira/browse/SPARK-6209) for more
details, including a bug reproduction.
This patch fixes this issue by ensuring proper cleanup of these resources.
It also adds logging for unexpected error cases.
This PR is an extended version of #4935 and adds a regression test.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/JoshRosen/spark
executorclassloader-leak-master-branch
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/4944.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #4944
----
commit e2d70a35b3598fb44fb2fe85d79fa8d456b7ef5f
Author: Josh Rosen <[email protected]>
Date: 2015-03-06T22:44:26Z
Properly clean up after errors in ExecutorClassLoader
commit 7ee2261378a643ad478f1ef0d6f784bc1189ece6
Author: Josh Rosen <[email protected]>
Date: 2015-03-09T04:23:21Z
Add a failing regression test
commit 961c28471b5507bd08b1c7d766114edffff1073e
Author: Josh Rosen <[email protected]>
Date: 2015-03-09T04:25:35Z
Roll back changes that were added to get the regression test to fail
----
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]