--- old/src/hotspot/share/services/management.cpp 2018-11-20 03:38:21.155387525 -0500 +++ new/src/hotspot/share/services/management.cpp 2018-11-20 03:38:19.535295075 -0500 @@ -1645,6 +1645,12 @@ return; } + // NonJavaThread instances may not be fully initialized yet, so we need to + // skip any that aren't - check for zero stack_size() + if (!thread->is_Java_thread() && thread->stack_size() == 0) { + return; + } + if (_count >= _names_len || _count >= _times_len) { // skip if the result array is not big enough return;