[jdk8u-dev] Integrated: 8260589: Crash in JfrTraceIdLoadBarrier::load(_jclass*)

Long Yang duke at openjdk.org
Mon Jun 27 12:30:13 UTC 2022


On Mon, 18 Apr 2022 04:09:21 GMT, Long Yang <duke at openjdk.org> wrote:

> Hi!
> 
> Please review the backport of JDK-8260589 to 8u.
> This crash problem is easy to reproduce, so I feel it is necessary to backport it to 8u.
> 
> 3 months ago, I launched webrev and it has been reviewed by Zhengyu Gu ([the review mail link](https://mail.openjdk.java.net/pipermail/jdk8u-dev/2022-March/014715.html)), thanks a lot to Zhengyu and Mario.
> Recently, I learned that the review method of 8u was changed to github, so I re-launched it in the new way.
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8260589
> 11u commit: https://urldefense.com/v3/__https://github.com/openjdk/jdk11u-dev/commit/1d204c554ffe969567161cc05992486ff47d346d__;!!ACWV5N9M2RV99hQ!PTNDNigiV8MGBwnkg5SELrxI7eKg7Qy6Yyvtx5Uw7NfxxfJXj6HkfMAhAUVn3_qNlo0Uwjy1hYp6uSXeMEE$ 
> Test: jdk/test/jdk/jfr/jvm/TestPrimitiveClasses.java passed.
> 
> Due to the differences between JFR in 11u and 17, Denghui made some changes when backporting this fix to 11u. 
> Denghui's changes also apply to 8u, so I directly quote Denghui's list here. (4 in total)
> 1. use MaxJfrEventId + 101 instead of LAST_TYPE_ID + 1 as the klass id of void.class
> 2. jdk 11 doesn't support jfr streaming, so I removed the call `JfrTraceIdEpoch::set_changed_tag_state()` in `load_primitive`
> 3. the Class in jdk 11 doesn't have the field 'hidden', so I removed `writer->write<bool>(false);` in `write_primitive`
> 4. there are many differences in the API of JfrTraceId between 11u and tip
> 
> In addition to the above differences, I also make supplementary explanations for the modifications I made.
> 1. The static global variable clear_artifacts in 11u was introduced by the bugfix https://bugs.openjdk.java.net/browse/JDK-8231081, but this fix has not been backported to 8u, so I removed the code related to clear_artifacts. In 8u, the metadata of the primitive types will be written into the previous chunk on every chunk rotation.
> 2. In 11u, _artifacts and _class_unload are static global variables, but in 8u, they are static member variables of JfrTypeSet, so I also made necessary changes to the functions that use these two variables.
> 
> Thanks

This pull request has now been integrated.

Changeset: cf6b6282
Author:    yibo.yl <yibo.yl at alibaba-inc.com>
Committer: Denghui Dong <ddong at openjdk.org>
URL:       https://git.openjdk.org/jdk8u-dev/commit/cf6b6282c4836e561e88a114a8d72db4180b160c
Stats:     230 lines in 6 files changed: 219 ins; 8 del; 3 mod

8260589: Crash in JfrTraceIdLoadBarrier::load(_jclass*)

Reviewed-by: zgu
Backport-of: a9d2267f8d306522522c999ff584ccaa34c46456

-------------

PR: https://git.openjdk.org/jdk8u-dev/pull/36


More information about the jdk8u-dev mailing list