RFR: 8268288: jdk/jfr/api/consumer/streaming/TestOutOfProcessMigration.java fails with "Error: ShouldNotReachHere()"

Calvin Cheung ccheung at openjdk.java.net
Thu Dec 2 01:05:28 UTC 2021


On Wed, 1 Dec 2021 20:43:38 GMT, Yumin Qi <minqi at openjdk.org> wrote:

>> A small fix to ensure that the globally shared ClassPathImageEntry is not being deleted in CDS code.
>> The test failure is hard to reproduce. The proposed fix passed CI tiers 1-4 testing.
>> Currently running the TestOutOfProcessMigration.java test repeatedly on linux-x64 with the vm options in the bug report.
>
> src/hotspot/share/cds/filemap.cpp line 2495:
> 
>> 2493:     const char* path = scpe->name();
>> 2494:     struct stat st;
>> 2495:     if (os::stat(path, &st) != 0) {
> 
> Do you check if the file exists? If so please use os::file_exists which is better.

Using `os::file_exists` won't work because few lines below that I need to use the `st` returned from `os::stat`.

`ent = ClassLoader::create_class_path_entry(THREAD, path, &st, false, false);`

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

PR: https://git.openjdk.java.net/jdk/pull/6651


More information about the hotspot-runtime-dev mailing list