phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Samarth Jain (JIRA)" <>
Subject [jira] [Created] (PHOENIX-4113) Killing forked JVM may cause resources to be not released
Date Tue, 22 Aug 2017 17:55:00 GMT
Samarth Jain created PHOENIX-4113:

             Summary: Killing forked JVM may cause resources to be not released
                 Key: PHOENIX-4113
             Project: Phoenix
          Issue Type: Bug
            Reporter: Samarth Jain
            Assignee: Samarth Jain

We have a <shutdown>kill</shutdown> configured in pom which behind the scenes

We also have a shutdown hook which is calling halt on the JVM.
private static String checkClusterInitialized(ReadOnlyProps serverProps) throws Exception
        if (!clusterInitialized) {
            url = setUpTestCluster(config, serverProps);
            clusterInitialized = true;
            Runtime.getRuntime().addShutdownHook(new Thread() {
                public void run() {
          "SHUTDOWN: halting JVM now");
        return url;

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