JVM returns error 143

前端 未结 3 2086
耶瑟儿~
耶瑟儿~ 2020-12-20 16:45

A Java application running as an scheduled task on Windows 2003 crashed with no logs or anything that would help to find out what happened. The only information available, i

相关标签:
3条回答
  • 2020-12-20 16:56

    JVM error code 143 means Internal field must be valid. This is discussed on the OTN discussion forums. However, the conclusion seems to be something killed your process.

    I suspect this could indeed be caused by a user logging off.

    0 讨论(0)
  • 2020-12-20 16:59

    143 often means that the application was terminated due to a SIGTERM command. See also https://unix.stackexchange.com/questions/10231/when-does-the-system-send-a-sigterm-to-a-process

    However, please note that an application might use 143 for its own custom result.

    0 讨论(0)
  • 2020-12-20 17:04

    An user logging off would signal the CTRL_LOGOFF_EVENT signal to all running processes. From https://msdn.microsoft.com/en-us/library/windows/desktop/aa376876(v=vs.85).aspx:

    The system also sends the CTRL_LOGOFF_EVENT control signal to every process during a log-off operation.

    Now, under certain circumstances it will terminate the Java application with error code 143 (SIGTERM). See https://bugs.openjdk.java.net/browse/JDK-6871190.

    Well, anyway, what you need to stop this from happening is to start Java with the -Xrs option. From https://www.ibm.com/support/knowledgecenter/SSYKE2_8.0.0/com.ibm.java.win.80.doc/diag/appendixes/cmdline/Xrs.html:

    Setting -Xrs prevents the Java™ run time environment from handling any internally or externally generated signals such as SIGSEGV and SIGABRT.

    So you should start your Java application with something like:

    >java -Xrs -jar myapplication.jar
    

    PS:

    The relation between SIGTERM and 143 number is explained in https://unix.stackexchange.com/questions/10231/when-does-the-system-send-a-sigterm-to-a-process#comment13523_10231.

    0 讨论(0)
提交回复
热议问题