Uploaded image for project: 'Commons Daemon'
  1. Commons Daemon
  2. DAEMON-302

Service recovery options do not work when a JNI crash brings down the JVM

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.15
    • Fix Version/s: 1.1.0
    • Component/s: Procrun
    • Environment:

      Windows 7 64bit
      JRE 1.7.0_25-b17 (64bit)

      Description

      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?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                empirechaotix Iain Williams
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: