[jdk11u-dev] RFR: 8322511: JfrCheckpointThreadClosure::do_thread crashes when fetching thread_id
唐佳未
duke at openjdk.org
Tue Jan 23 19:28:43 UTC 2024
On Fri, 22 Dec 2023 07:46:36 GMT, Goetz Lindenmaier <goetz at openjdk.org> wrote:
>> Threads which are in the state of `is_attaching_via_jni` may have the NULL object as their `_threadObj` .
>> So the JVM will crash when calling `JfrCheckpointThreadClosure::do_thread()`.
>
> Hi,
> is this an error in 11 only?
> If so, explain why & where this was fixed in higher versions.
> Else please close this PR, reopen it against repo jdk. Once it is submitted there, backport it to 21, 17 and 11.
> See also https://wiki.openjdk.org/display/JDKUpdates/How+to+contribute+or+backport+a+fix
@GoeLin This is an error in 17,11 and 8.
1. In the newest JDK, commit [JDK-8276125 ](https://github.com/jia-wei-tang/jdk/commit/a885aab696777c99c8c4c5d9a46afc5fe0a4fe47) has solved half of the problem. It prevents jvm from visiting the null object when getting thread_group_id. And this commit is a bug fix.
2. In 17, commit [JDK-8226511](https://github.com/jia-wei-tang/dragonwell17/commit/8addc1418acf6d0cbba7c56429a12be2e1ebf521) has solved the other part of the problem. It prevents jvm from visiting the null object when getting thread_id. But this commit is a Sub-task, and I speculate that developers didn't notice that this place would cause a jvm crash at that time.
Thus, in 17, I need to port JDK-8276125. In 11 and 8, I need to combine both commits I mentioned above to fix this error.
Since the newest JDK doesn't have this problem, I am wondering where to open this PR.
-------------
PR Comment: https://git.openjdk.org/jdk11u-dev/pull/2413#issuecomment-1868705537
More information about the jdk-updates-dev
mailing list