8220570: Additonal trace when native thread creation fails
Added additonal trace when native thread creation fails Reviewed-by: dholmes, goetz
This commit is contained in:
parent
c986cef7ba
commit
0714b75ac4
src/hotspot/os
@ -37,6 +37,7 @@
|
||||
#include "compiler/compileBroker.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "logging/log.hpp"
|
||||
#include "logging/logStream.hpp"
|
||||
#include "libo4.hpp"
|
||||
#include "libperfstat_aix.hpp"
|
||||
#include "libodm_aix.hpp"
|
||||
@ -923,6 +924,11 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
|
||||
char buf[64];
|
||||
log_warning(os, thread)("Failed to start thread - pthread_create failed (%d=%s) for attributes: %s.",
|
||||
ret, os::errno_name(ret), os::Posix::describe_pthread_attr(buf, sizeof(buf), &attr));
|
||||
// Log some OS information which might explain why creating the thread failed.
|
||||
log_info(os, thread)("Number of threads approx. running in the VM: %d", Threads::number_of_threads());
|
||||
LogStream st(Log(os, thread)::info());
|
||||
os::Posix::print_rlimit_info(&st);
|
||||
os::print_memory_info(&st);
|
||||
}
|
||||
|
||||
pthread_attr_destroy(&attr);
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include "compiler/disassembler.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "logging/log.hpp"
|
||||
#include "logging/logStream.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "memory/filemap.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
@ -743,6 +744,11 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
|
||||
} else {
|
||||
log_warning(os, thread)("Failed to start thread - pthread_create failed (%s) for attributes: %s.",
|
||||
os::errno_name(ret), os::Posix::describe_pthread_attr(buf, sizeof(buf), &attr));
|
||||
// Log some OS information which might explain why creating the thread failed.
|
||||
log_info(os, thread)("Number of threads approx. running in the VM: %d", Threads::number_of_threads());
|
||||
LogStream st(Log(os, thread)::info());
|
||||
os::Posix::print_rlimit_info(&st);
|
||||
os::print_memory_info(&st);
|
||||
}
|
||||
|
||||
pthread_attr_destroy(&attr);
|
||||
|
@ -780,6 +780,13 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
|
||||
} else {
|
||||
log_warning(os, thread)("Failed to start thread - pthread_create failed (%s) for attributes: %s.",
|
||||
os::errno_name(ret), os::Posix::describe_pthread_attr(buf, sizeof(buf), &attr));
|
||||
// Log some OS information which might explain why creating the thread failed.
|
||||
log_info(os, thread)("Number of threads approx. running in the VM: %d", Threads::number_of_threads());
|
||||
LogStream st(Log(os, thread)::info());
|
||||
os::Posix::print_rlimit_info(&st);
|
||||
os::print_memory_info(&st);
|
||||
os::Linux::print_proc_sys_info(&st);
|
||||
os::Linux::print_container_info(&st);
|
||||
}
|
||||
|
||||
pthread_attr_destroy(&attr);
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include "compiler/disassembler.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "logging/log.hpp"
|
||||
#include "logging/logStream.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "memory/filemap.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
@ -992,6 +993,11 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
|
||||
} else {
|
||||
log_warning(os, thread)("Failed to start thread - thr_create failed (%s) for attributes: %s.",
|
||||
os::errno_name(status), describe_thr_create_attributes(buf, sizeof(buf), stack_size, flags));
|
||||
// Log some OS information which might explain why creating the thread failed.
|
||||
log_info(os, thread)("Number of threads approx. running in the VM: %d", Threads::number_of_threads());
|
||||
LogStream st(Log(os, thread)::info());
|
||||
os::Posix::print_rlimit_info(&st);
|
||||
os::print_memory_info(&st);
|
||||
}
|
||||
|
||||
if (status != 0) {
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include "compiler/disassembler.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "logging/log.hpp"
|
||||
#include "logging/logStream.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "memory/filemap.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
@ -669,6 +670,10 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
|
||||
} else {
|
||||
log_warning(os, thread)("Failed to start thread - _beginthreadex failed (%s) for attributes: %s.",
|
||||
os::errno_name(errno), describe_beginthreadex_attributes(buf, sizeof(buf), stack_size, initflag));
|
||||
// Log some OS information which might explain why creating the thread failed.
|
||||
log_info(os, thread)("Number of threads approx. running in the VM: %d", Threads::number_of_threads());
|
||||
LogStream st(Log(os, thread)::info());
|
||||
os::print_memory_info(&st);
|
||||
}
|
||||
|
||||
if (thread_handle == NULL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user