[ 
https://issues.apache.org/jira/browse/PHOENIX-4113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16137733#comment-16137733
 ] 

Samarth Jain commented on PHOENIX-4113:
---------------------------------------

[~jamestaylor] - I was hoping the QA run would help me validate if this change 
is going to help. Unfortunately it doesn't seem to be able to apply this patch 
on the 0.98 branch even though I did generate it with the latest code. I am 
running locally to verify if this helps the 0.98 build to pass. I have seen 
that build consistently fail with the below error:

{code}
Caused by: org.apache.maven.surefire.booter.SurefireBooterForkException: The 
forked VM terminated without properly saying goodbye. VM crash or System.exit 
called?

[ERROR] Process Exit Code: 0
[ERROR]         at 
org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:679)
[ERROR]         at 
org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533)
[ERROR]         at 
org.apache.maven.plugin.surefire.booterclient.ForkStarter.access$600(ForkStarter.java:117)
[ERROR]         at 
org.apache.maven.plugin.surefire.booterclient.ForkStarter$2.call(ForkStarter.java:429)
[ERROR]         at 
org.apache.maven.plugin.surefire.booterclient.ForkStarter$2.call(ForkStarter.java:406)
[ERROR]         at java.util.concurrent.FutureTask.run(FutureTask.java:262)
[ERROR]         at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[ERROR]         at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[ERROR]         at java.lang.Thread.run(Thread.java:745)
{code}



> Killing forked JVM may cause resources to be not released
> ---------------------------------------------------------
>
>                 Key: PHOENIX-4113
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4113
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Samarth Jain
>            Assignee: Samarth Jain
>         Attachments: PHOENIX-4113_4.x-HBase-0.98_v2.patch
>
>
> We have a <shutdown>kill</shutdown> configured in pom which behind the scenes 
> calls 
> {code}
> java.lang.Runtime.halt(1)
> {code}
> We also have a shutdown hook which is calling halt on the JVM.
> {code}
> private static String checkClusterInitialized(ReadOnlyProps serverProps) 
> throws Exception {
>         if (!clusterInitialized) {
>             url = setUpTestCluster(config, serverProps);
>             clusterInitialized = true;
>             Runtime.getRuntime().addShutdownHook(new Thread() {
>                 @Override
>                 public void run() {
>                     logger.info("SHUTDOWN: halting JVM now");
>                     Runtime.getRuntime().halt(0);
>                 }
>             });
>         }
>         return url;
>     }
> {code}
> This causes JVM to not execute all shutdown hooks which in turn would cause 
> the JVM process to not release all the system resources (network ports, file 
> handles, etc) it was using. If OS is not able to clean up these orphaned 
> resources soon enough, it could cause subsequent new JVM processes to run 
> into resource issues.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to