mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8219414: SA: jhsdb jsnap throws UnmappedAddressException with core generated by gcore
Reviewed-by: cjplummer, jgeorge
This commit is contained in:
parent
4aac63bb93
commit
a38277e67b
2 changed files with 14 additions and 8 deletions
|
@ -70,7 +70,12 @@
|
||||||
diagnostic(bool, DumpPrivateMappingsInCore, true, \
|
diagnostic(bool, DumpPrivateMappingsInCore, true, \
|
||||||
"If true, sets bit 2 of /proc/PID/coredump_filter, thus " \
|
"If true, sets bit 2 of /proc/PID/coredump_filter, thus " \
|
||||||
"resulting in file-backed private mappings of the process to "\
|
"resulting in file-backed private mappings of the process to "\
|
||||||
"be dumped into the corefile, if UseSharedSpaces is true.") \
|
"be dumped into the corefile.") \
|
||||||
|
\
|
||||||
|
diagnostic(bool, DumpSharedMappingsInCore, true, \
|
||||||
|
"If true, sets bit 3 of /proc/PID/coredump_filter, thus " \
|
||||||
|
"resulting in file-backed shared mappings of the process to " \
|
||||||
|
"be dumped into the corefile.") \
|
||||||
\
|
\
|
||||||
diagnostic(bool, UseCpuAllocPath, false, \
|
diagnostic(bool, UseCpuAllocPath, false, \
|
||||||
"Use CPU_ALLOC code path in os::active_processor_count ")
|
"Use CPU_ALLOC code path in os::active_processor_count ")
|
||||||
|
|
|
@ -131,6 +131,7 @@
|
||||||
|
|
||||||
enum CoredumpFilterBit {
|
enum CoredumpFilterBit {
|
||||||
FILE_BACKED_PVT_BIT = 1 << 2,
|
FILE_BACKED_PVT_BIT = 1 << 2,
|
||||||
|
FILE_BACKED_SHARED_BIT = 1 << 3,
|
||||||
LARGEPAGES_BIT = 1 << 6,
|
LARGEPAGES_BIT = 1 << 6,
|
||||||
DAX_SHARED_BIT = 1 << 8
|
DAX_SHARED_BIT = 1 << 8
|
||||||
};
|
};
|
||||||
|
@ -1357,8 +1358,8 @@ void os::shutdown() {
|
||||||
void os::abort(bool dump_core, void* siginfo, const void* context) {
|
void os::abort(bool dump_core, void* siginfo, const void* context) {
|
||||||
os::shutdown();
|
os::shutdown();
|
||||||
if (dump_core) {
|
if (dump_core) {
|
||||||
#if INCLUDE_CDS
|
#ifndef ZERO
|
||||||
if (UseSharedSpaces && DumpPrivateMappingsInCore) {
|
if (DumpPrivateMappingsInCore) {
|
||||||
ClassLoader::close_jrt_image();
|
ClassLoader::close_jrt_image();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -3432,8 +3433,6 @@ bool os::Linux::hugetlbfs_sanity_check(bool warn, size_t page_size) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the coredump_filter bits to include largepages in core dump (bit 6)
|
|
||||||
//
|
|
||||||
// From the coredump_filter documentation:
|
// From the coredump_filter documentation:
|
||||||
//
|
//
|
||||||
// - (bit 0) anonymous private memory
|
// - (bit 0) anonymous private memory
|
||||||
|
@ -5131,11 +5130,13 @@ jint os::init_2(void) {
|
||||||
set_coredump_filter(DAX_SHARED_BIT);
|
set_coredump_filter(DAX_SHARED_BIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if INCLUDE_CDS
|
if (DumpPrivateMappingsInCore) {
|
||||||
if (UseSharedSpaces && DumpPrivateMappingsInCore) {
|
|
||||||
set_coredump_filter(FILE_BACKED_PVT_BIT);
|
set_coredump_filter(FILE_BACKED_PVT_BIT);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
if (DumpSharedMappingsInCore) {
|
||||||
|
set_coredump_filter(FILE_BACKED_SHARED_BIT);
|
||||||
|
}
|
||||||
|
|
||||||
return JNI_OK;
|
return JNI_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue