John Wehle created DAEMON-339: --------------------------------- Summary: Patch for commons-daemon 1.0.15 to avoid shutdown failures Key: DAEMON-339 URL: https://issues.apache.org/jira/browse/DAEMON-339 Project: Commons Daemon Issue Type: Bug Components: Jsvc Affects Versions: 1.0.15 Environment: Multiple UNIX platforms ... E.g.: Red Hat ES 6 Solaris 10 x64 Reporter: John Wehle Priority: Minor
We've seen situations on UNIX where JSVC will fail to shutdown when requested ... in at least one case this caused the machine to hang during shutdown. On UNIX JSVC automatically restarts the JVM if it crashes. Currently this means that if the JVM crashes after receiving a shutdown request (i.e. a SIGINT), then it's restarted by the controller which is not what's desired. The enclosed patch propagates the termination request from the JVM to the controller so that the controller knows not to schedule a restart thus allowing JSVC to actually terminate. Granted this doesn't fix the underlying problem of the JVM crashing during shutdown, however that's a separate (potentially application specific) issue. Tested by using a dummy JAVA service containing an endless loop in the shutdown code. Test sequence was: jsvc ... -verbose -debug hello.MyDaemon kill -INT `cat pidfile` # notice that output showed shutdown running kill -BUS `cat pidfile` # notice that prior to patch output showed restart being scheduled -- John Wehle -- This message was sent by Atlassian JIRA (v6.3.4#6332)