Skip to content

[ZEPPELIN-2414] Memory leak under scoped mode of SparkInterpreter caused by inapproprately setting Thread.contextClassLoader - #2271

Closed
hammertank wants to merge 1 commit into
apache:branch-0.6from
hammertank:ZEPPELIN-2414
Closed

[ZEPPELIN-2414] Memory leak under scoped mode of SparkInterpreter caused by inapproprately setting Thread.contextClassLoader#2271
hammertank wants to merge 1 commit into
apache:branch-0.6from
hammertank:ZEPPELIN-2414

Conversation

@hammertank

@hammertankhammertank commented Apr 21, 2017

Copy link
Copy Markdown

What is this PR for?

Fix memory leak under scoped mode of SparkInterpreter which is caused by inapproprately setting Thread.contextClassLoader.

What type of PR is it?

Bug Fix

Todos

Rest Thread.contextClassLoader in Methods:

  • - Wraps interpreters with ClassLoader with ClassLoaderInterpreter in RemoteInterpreterServer.createInterpreter

What is the Jira issue?

https://issues.apache.org/jira/browse/ZEPPELIN-2414

How should this be tested?

Questions:

  • Does the licenses files need update? No
  • Is there breaking changes for older versions? No
  • Does this needs documentation? No

@hammertank

hammertank commented Apr 21, 2017

Copy link
Copy Markdown
Author

@jongyoul Ready to review. Please help. This PR is based on commits from #2262. Maybe this PR can wait until #2262 is merged.

@Leemoonsoo

Copy link
Copy Markdown
Member

Thanks @hammertank for the contribution.

What do you think wrap interpreter using ClassLoaderInterpreter instead of modifying individual interpreter?

Interpreter is being instantiated from RemoteInterpreterServer, so this is place where ClassLoaderInterpreter can wrap Interpreter. Like Interpreter factory does

@hammertank

hammertank commented Apr 24, 2017

Copy link
Copy Markdown
Author

@Leemoonsoo Changed the code as you suggested. But I find it difficult to write a testcase to validate the modification.

@Leemoonsoo

Copy link
Copy Markdown
Member

#2262 has been merged. so now, could you try include commit only related to this contributions?

@hammertank

Copy link
Copy Markdown
Author

@Leemoonsoo re-commit as required. Please review again.
Jenkins did not get the final travis-ci results successfully. Is there a way to trigger Jenkins to fetch again without a push?

@Leemoonsoo

Copy link
Copy Markdown
Member

You can close/reopen the issue to trigger Jenkins

@hammertankhammertank reopened this May 8, 2017
@hammertank

hammertank commented May 27, 2017

Copy link
Copy Markdown
Author

Found "ClassNotFoundException" after applying this fix. This is caused by SparkContext using the first TranslatingClassLoader to deserialize TaskResult.
Sorry to say that I haven't figure out a solution yet. 😭
I'm quite busy with my work recently.

@asfgitasfgit closed this in a962ea1Jul 4, 2018
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@hammertank@Leemoonsoo