You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by zj...@apache.org on 2019/03/08 07:50:22 UTC
[zeppelin] branch master updated: [ZEPPELIN-4042]. IPythonClient is
not shutdown properly
This is an automated email from the ASF dual-hosted git repository.
zjffdu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git
The following commit(s) were added to refs/heads/master by this push:
new 1652d68 [ZEPPELIN-4042]. IPythonClient is not shutdown properly
1652d68 is described below
commit 1652d6898eb5d4b2671a5c21f4f4dab52614ed9b
Author: Jeff Zhang <zj...@apache.org>
AuthorDate: Fri Mar 8 11:24:07 2019 +0800
[ZEPPELIN-4042]. IPythonClient is not shutdown properly
### What is this PR for?
Trivial PR to fix the IPythonClient not shutdown issue. Otherwise user will get the following error
```
Channel ManagedChannelImpl{logId=6, target=127.0.0.1:43464} was not shutdown properly!!! ~*~*~*
Make sure to call shutdown()/shutdownNow() and wait until awaitTermination() returns true.
java.lang.RuntimeException: ManagedChannel allocation site
at io.grpc.internal.ManagedChannelOrphanWrapper$ManagedChannelReference.<init>(ManagedChannelOrphanWrapper.java:103)
at io.grpc.internal.ManagedChannelOrphanWrapper.<init>(ManagedChannelOrphanWrapper.java:53)
at io.grpc.internal.ManagedChannelOrphanWrapper.<init>(ManagedChannelOrphanWrapper.java:44)
at io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:410)
...
```
### What type of PR is it?
[Bug Fix ]
### Todos
* [ ] - Task
### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-4042
### How should this be tested?
* CI pass
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
Author: Jeff Zhang <zj...@apache.org>
Closes #3324 from zjffdu/ZEPPELIN-4042 and squashes the following commits:
72e1ceb58 [Jeff Zhang] [ZEPPELIN-4042]. IPythonClient is not shutdown properly
---
.../src/main/java/org/apache/zeppelin/python/IPythonInterpreter.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/python/src/main/java/org/apache/zeppelin/python/IPythonInterpreter.java b/python/src/main/java/org/apache/zeppelin/python/IPythonInterpreter.java
index b357e88..f5c19be 100644
--- a/python/src/main/java/org/apache/zeppelin/python/IPythonInterpreter.java
+++ b/python/src/main/java/org/apache/zeppelin/python/IPythonInterpreter.java
@@ -341,6 +341,11 @@ public class IPythonInterpreter extends Interpreter implements ExecuteResultHand
if (watchDog != null) {
LOGGER.info("Kill IPython Process");
ipythonClient.stop(StopRequest.newBuilder().build());
+ try {
+ ipythonClient.shutdown();
+ } catch (InterruptedException e) {
+ LOGGER.warn("Fail to shutdown IPythonClient");
+ }
watchDog.destroyProcess();
gatewayServer.shutdown();
}