You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "John Wehle (JIRA)" <ji...@apache.org> on 2015/11/23 23:55:10 UTC
[jira] [Updated] (DAEMON-339) Patch for commons-daemon 1.0.15 to
avoid shutdown failures
[ https://issues.apache.org/jira/browse/DAEMON-339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Wehle updated DAEMON-339:
------------------------------
Attachment: jsvc-shutdown.txt
Patch for the problem.
> 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
> Attachments: jsvc-shutdown.txt
>
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> 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)