为什么 JVM 返回退出状态代码 143?

发布于 2024-11-28 17:15:22 字数 168 浏览 0 评论 0原文

在 Windows 2003 上作为计划任务运行的 Java 应用程序崩溃了,没有日志或任何有助于查明发生情况的信息。唯一可用的信息是应用程序返回代码 143 (8F)。该错误代码是从计划任务日志中检索到的。

有谁知道错误代码(143)代表什么?用户注销是否有可能导致应用程序终止?

谢谢,

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, is that the application returned code 143 (8F). That error code was retrieved from the scheduled tasks log.

Does anyone knows what that error code (143) stands for? Is it possible that an user logging off could cause the application to be terminated?

Thanks,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

幸福丶如此 2024-12-05 17:15:22

143 通常意味着应用程序因 SIGTERM 命令而终止。另请参阅https://unix.stackexchange。 com/questions/10231/when-does-the-system-send-a-sigterm-to-a-process

但是,请注意,应用程序可能会使用 143 作为其自己的自定义结果。

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.

对你再特殊 2024-12-05 17:15:22

JVM 错误代码 143 表示 内部字段必须有效OTN 论坛对此进行了讨论。然而,结论似乎是某些东西杀死了你的进程。

我怀疑这确实可能是由于用户注销造成的。

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.

一抹微笑 2024-12-05 17:15:22

用户注销会向所有正在运行的进程发出 CTRL_LOGOFF_EVENT 信号。来自 https://msdn。 microsoft.com/en-us/library/windows/desktop/aa376876(v=vs.85).aspx

系统还会向每个
注销操作期间的过程。

现在,在某些情况下,它将终止 Java 应用程序,并显示错误代码 143 (SIGTERM)。请参阅https://bugs.openjdk.java.net/browse/JDK-6871190。

好吧,无论如何,您需要阻止这种情况发生,就是使用 -Xrs 选项启动 Java。来自 https://www.ibm.com/support/knowledgecenter/SSYKE2_8.0.0/com.ibm.java.win.80.doc/diag/appendixes/cmdline/Xrs.html

设置 -Xrs 会阻止 Java™ 运行时环境处理任何
内部或外部生成的信号,例如 SIGSEGV 和
SIGABRT。

因此,您应该使用以下内容启动 Java 应用程序:

>java -Xrs -jar myapplication.jar

PS:

SIGTERM143 数字之间的关系在 https://unix.stackexchange.com/questions/10231/when-does-the-system-send-a-sigterm-to-a-process#comment13523_10231

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文