导出启动器日志时包含 HMCL 的 JVM 崩溃日志 - #6651
Open
Hylfrd wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HMCL 目前没有对自身发生 JVM 崩溃时做过多处理。#6650 会在 HMCL 下次启动时提示上次可能发生了 Java 虚拟机崩溃;但用户通过帮助页面求助时,现有的“导出启动器日志”不会包含该报告,容易遗漏 JVM 崩溃原因和 native 调用栈等关键信息。
此 PR 在导出最近五份历史日志和当前日志时,会先扫描启动器目录下的
hs_err_pid*.log,并根据进程 PID、启动时间、工作目录和启动器文件名匹配由这些 HMCL 会话产生的 JVM 崩溃报告,并将匹配的hs_err_pid*.log一并写入日志压缩包。