RFR(xs): 8247252: TestCombinedCompressedFlags.java failed src/hotspot/share/services/virtualMemoryTracker.cpp:388 Error: ShouldNotReachHere()

Yumin Qi yumin.qi at oracle.com
Wed Jun 10 16:53:26 UTC 2020


My tests on tier4 failed too (It started yesterday after updated my repo):

V  [libjvm.dylib+0x10929fd]  VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x6ed
V  [libjvm.dylib+0x1093131]  VMError::report_and_die(Thread*, void*, char const*, int, char const*, char const*, __va_list_tag*)+0x41
V  [libjvm.dylib+0x5638d2]  report_vm_error(char const*, int, char const*, char const*, ...)+0x142
V  [libjvm.dylib+0x1085076]  VirtualMemoryTracker::add_reserved_region(unsigned char*, unsigned long, NativeCallStack const&, MemoryType)+0x5c6
V  [libjvm.dylib+0xdaf15b]  os::map_memory(int, char const*, unsigned long, char*, unsigned long, bool, bool, MemoryType)+0x12b
V  [libjvm.dylib+0x63857a]  FileMapInfo::map_region(int, long, char*, ReservedSpace)+0x1da
V  [libjvm.dylib+0x6380a0]  FileMapInfo::map_regions(int*, int, char*, ReservedSpace)+0x90
V  [libjvm.dylib+0xcfd9e0]  MetaspaceShared::map_archive(FileMapInfo*, char*, ReservedSpace)+0xb0
V  [libjvm.dylib+0xcfcd30]  MetaspaceShared::map_archives(FileMapInfo*, FileMapInfo*, bool)+0x330
V  [libjvm.dylib+0xcfc632]  MetaspaceShared::initialize_runtime_shared_and_meta_spaces()+0x112
V  [libjvm.dylib+0xcf04fb]  Metaspace::global_initialize()+0x6b
V  [libjvm.dylib+0x1026ad2]  universe_init()+0x1a2
V  [libjvm.dylib+0x7d7334]  init_globals()+0x74
V  [libjvm.dylib+0xff53b8]  Threads::create_vm(JavaVMInitArgs*, bool*)+0x388
V  [libjvm.dylib+0x903c4b]  JNI_CreateJavaVM+0x8b
C  [libjli.dylib+0x4472]  JavaMain+0x122
C  [libjli.dylib+0x7599]  ThreadJavaMain+0x9
C  [libsystem_pthread.dylib+0x5e65]  _pthread_start+0x94
C  [libsystem_pthread.dylib+0x183b]  thread_start+0xf


On 6/10/20 8:52 AM, Daniel D. Daugherty wrote:
>> The reason we did not see these errors before in our (SAPs) CI was 
>> that we
>> run our tests with NMT (by default) switched off. Apparently Oracle runs
>> the jtreg tests with NMT enabled via -vmoptions? We will change our 
>> CI to
>> do this too. But it would be good if the test flags would be published
>> somewhere, and we would all use the same flags.
>
> This failure first showed up in our Tier4 testing. It looks like
> that tier's task definition includes these options:
>
> -XX:+UnlockDiagnosticVMOptions -XX:ArchiveRelocationMode=1 
> -Xlog:cds=debug -XX:NativeMemoryTracking=detail
>
>
> The task itself is named: tier4-rt-cds-relocation.
>
> I don't know if there are plans to publish the tiered testing
> task definitions.
>
> Dan
>
>
> On 6/10/20 9:09 AM, Thomas Stüfe wrote:
>> Hi all,
>>
>> could I please have reviews for this bug fix.
>>
>> JBS: https://bugs.openjdk.java.net/browse/JDK-8247252
>> webrev:
>> http://cr.openjdk.java.net/~stuefe/webrevs/8247252-cds-nmt-ccps-off/webrev.00/webrev/ 
>>
>>
>> This bug was introduced with "8243535 NMT may show wrong numbers for CDS
>> and CCS".
>>
>> The error is that a VM loading a shared archive but having compressed 
>> class
>> pointers disabled would reserve space for the CDS but fail to 
>> register it
>> with the correct tag with NMT. So, inside NMT it still is marked as
>> "mtUnknown". This leads to a follow up error when the actual archive 
>> files
>> are to be mapped into this reserved region, since the region is 
>> expected to
>> carry the "mtClassShared" tag for this to work.
>>
>> The fix is simple to add the missing registration in metaspaceShared.cpp
>> when the cds has been reserved for the non-class-space case:
>>
>> @@ -2469,10 +2470,12 @@
>>       archive_space_rs = ReservedSpace(archive_space_size,
>> archive_space_alignment,
>>                                        false /* bool large */,
>> (char*)base_address);
>>       if (archive_space_rs.is_reserved()) {
>>         assert(base_address == NULL ||
>>                (address)archive_space_rs.base() == base_address, 
>> "Sanity");
>> +      // Register archive space with NMT.
>> + MemTracker::record_virtual_memory_type(archive_space_rs.base(),
>> mtClassShared);
>>         return archive_space_rs.base();
>>       }
>>       return NULL;
>>     }
>>
>> All the rest is fluff:
>>
>> - added logging in a number of places to make analysis of these kinds of
>> errors simpler
>> - explicitly switched on NMT for a number of cds jtreg tests.
>>
>> ---
>>
>> The reason we did not see these errors before in our (SAPs) CI was 
>> that we
>> run our tests with NMT (by default) switched off. Apparently Oracle runs
>> the jtreg tests with NMT enabled via -vmoptions? We will change our 
>> CI to
>> do this too. But it would be good if the test flags would be published
>> somewhere, and we would all use the same flags.
>>
>> Thanks, Thomas
>


More information about the hotspot-runtime-dev mailing list