phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Samarth Jain (JIRA)" <>
Subject [jira] [Commented] (PHOENIX-4113) Killing forked JVM may cause resources to be not released
Date Wed, 23 Aug 2017 01:31:00 GMT


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:

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(
[ERROR]         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(
[ERROR]         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.access$600(
[ERROR]         at org.apache.maven.plugin.surefire.booterclient.ForkStarter$
[ERROR]         at org.apache.maven.plugin.surefire.booterclient.ForkStarter$
[ERROR]         at
[ERROR]         at java.util.concurrent.ThreadPoolExecutor.runWorker(
[ERROR]         at java.util.concurrent.ThreadPoolExecutor$
[ERROR]         at

> Killing forked JVM may cause resources to be not released
> ---------------------------------------------------------
>                 Key: PHOENIX-4113
>                 URL:
>             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
> {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() {
>           "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

View raw message