8224793: os::die() does not honor CreateCoredumpOnCrash option

Reviewed-by: kbarrett, dholmes, stuefe
This commit is contained in:
Daniel D. Daugherty 2019-06-05 14:01:01 -04:00
parent c31f5bfa4a
commit 09b642e937
5 changed files with 37 additions and 5 deletions

View file

@ -1206,9 +1206,16 @@ void os::abort(bool dump_core, void* siginfo, const void* context) {
}
// Die immediately, no exit hook, no abort hook, no cleanup.
// Dump a core file, if possible, for debugging.
void os::die() {
if (TestUnresponsiveErrorHandler && !CreateCoredumpOnCrash) {
// For TimeoutInErrorHandlingTest.java, we just kill the VM
// and don't take the time to generate a core file.
os::signal_raise(SIGKILL);
} else {
::abort();
}
}
intx os::current_thread_id() {
return (intx)pthread_self();

View file

@ -1073,10 +1073,17 @@ void os::abort(bool dump_core, void* siginfo, const void* context) {
}
// Die immediately, no exit hook, no abort hook, no cleanup.
// Dump a core file, if possible, for debugging.
void os::die() {
if (TestUnresponsiveErrorHandler && !CreateCoredumpOnCrash) {
// For TimeoutInErrorHandlingTest.java, we just kill the VM
// and don't take the time to generate a core file.
os::signal_raise(SIGKILL);
} else {
// _exit() on BsdThreads only kills current thread
::abort();
}
}
// Information of current thread in variety of formats
pid_t os::Bsd::gettid() {

View file

@ -1461,9 +1461,16 @@ void os::abort(bool dump_core, void* siginfo, const void* context) {
}
// Die immediately, no exit hook, no abort hook, no cleanup.
// Dump a core file, if possible, for debugging.
void os::die() {
if (TestUnresponsiveErrorHandler && !CreateCoredumpOnCrash) {
// For TimeoutInErrorHandlingTest.java, we just kill the VM
// and don't take the time to generate a core file.
os::signal_raise(SIGKILL);
} else {
::abort();
}
}
// thread_id is kernel thread id (similar to Solaris LWP id)
intx os::current_thread_id() { return os::Linux::gettid(); }

View file

@ -1334,8 +1334,15 @@ void os::abort(bool dump_core, void* siginfo, const void* context) {
}
// Die immediately, no exit hook, no abort hook, no cleanup.
// Dump a core file, if possible, for debugging.
void os::die() {
::abort(); // dump core (for debugging)
if (TestUnresponsiveErrorHandler && !CreateCoredumpOnCrash) {
// For TimeoutInErrorHandlingTest.java, we just kill the VM
// and don't take the time to generate a core file.
os::signal_raise(SIGKILL);
} else {
::abort();
}
}
// DLL functions

View file

@ -518,6 +518,10 @@ class os: AllStatic {
static void abort(bool dump_core = true);
// Die immediately, no exit hook, no abort hook, no cleanup.
// Dump a core file, if possible, for debugging. os::abort() is the
// preferred means to abort the VM on error. os::die() should only
// be called if something has gone badly wrong. CreateCoredumpOnCrash
// is intentionally not honored by this function.
static void die();
// File i/o operations