commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Thomas (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (DAEMON-302) Service recovery options do not work when a JNI crash brings down the JVM
Date Thu, 26 Oct 2017 19:47:03 GMT

     [ https://issues.apache.org/jira/browse/DAEMON-302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Mark Thomas resolved DAEMON-302.
--------------------------------
       Resolution: Fixed
    Fix Version/s: 1.1

There are multiple parts to this.

For jni mode, an 'abort' hook has been added that sets a non-zero exit code when the JVM crashes.
This is sufficient to trigger recovery for jni mode.

For Java and exe modes, a crash will trigger a non-zero exit code. It is therefore necessary
for additional configuration to be made in the recovery tab. If the "Enable actions for stops
with errors." checkbox is enabled, then a crash will trigger recovery in java and exe modes

> Service recovery options do not work when a JNI crash brings down the JVM
> -------------------------------------------------------------------------
>
>                 Key: DAEMON-302
>                 URL: https://issues.apache.org/jira/browse/DAEMON-302
>             Project: Commons Daemon
>          Issue Type: Bug
>          Components: Procrun
>    Affects Versions: 1.0.15
>         Environment: Windows 7 64bit
> JRE 1.7.0_25-b17 (64bit)
>            Reporter: Iain Williams
>              Labels: jni, jvm, procrun, service
>             Fix For: 1.1
>
>
> We have a java application that we run as a service which has a C component setup, and
communicated to across the Java Native Interface. 
> If a crash occurs in the C component the whole JVM is brought down. However this does
not trigger the service recovery options to kick in.
> I believe this is due to a VM exit code of 0 (see bellow).
> [2013-06-27 11:55:47] [debug] ( prunsrv.c:1528) [ 8488] Waiting for worker to finish...
> [2013-06-27 11:55:55] [debug] ( javajni.c:964 ) [ 5716] Java Worker thread finished applicationName/core/applicationNameCore:main
with status=0
> [2013-06-27 11:55:55] [debug] ( prunsrv.c:1533) [ 8488] Worker finished.
> [2013-06-27 11:55:55] [debug] ( prunsrv.c:1559) [ 8488] Waiting for all threads to exit
> [2013-06-27 11:56:46] [debug] ( prunsrv.c:919 ) [10160] Start exit hook called ...
> [2013-06-27 11:56:46] [debug] ( prunsrv.c:920 ) [10160] VM exit code: 0
> [2013-06-27 11:56:46] [debug] ( prunsrv.c:844 ) [10160] reportServiceStatusE: 1, 0, 0,
0
> With a return code of 0, the SCM would think the service stopped safely, without error,
which is not the case here since the JNI has crashed.
> Is there anything that can be done about this?



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

Mime
View raw message