JDK-8229202 : Docker reporting causes secondary crashes in error handling
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 8,11,13,14
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-08-06
  • Updated: 2019-09-26
  • Resolved: 2019-09-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 14
14 b15Fixed
Related Reports
Relates :  
Description
When Vm crashes before/during VM initialization (e.g. in the course of asserting non-VM gtests), the hs-err file shows this call stack:

28 Stack: [0x00007ffe42d7f000,0x00007ffe4357d000],  sp=0x00007ffe435734a0,  free space=8145k
 29 Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
 30 V  [libjvm.so+0x15519c5]  VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, c    har const*, int, unsigned long)+0x811
 31 V  [libjvm.so+0x1551151]  VMError::report_and_die(Thread*, void*, char const*, int, char const*, char const*, __va_list_tag*)+0x57
 32 V  [libjvm.so+0xa9ed7d]  report_vm_error(char const*, int, char const*, char const*, ...)+0x205
 33 V  [libjvm.so+0x121b783]  OSContainer::is_containerized()+0x43
 34 V  [libjvm.so+0x121d539]  os::physical_memory()+0x15
 35 V  [libjvm.so+0x12173b5]  os::print_summary_info(outputStream*, char*, unsigned long)+0x93
 36 V  [libjvm.so+0x154eebb]  VMError::report(outputStream*, bool)+0xdc3
 37 V  [libjvm.so+0x15519c5]  VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, c    har const*, int, unsigned long)+0x811
 38 V  [libjvm.so+0x1551151]  VMError::report_and_die(Thread*, void*, char const*, int, char const*, char const*, __va_list_tag*)+0x57
 39 V  [libjvm.so+0xa9ed7d]  report_vm_error(char const*, int, char const*, char const*, ...)+0x205
 40 V  [libjvm.so+0x923060]  
... (real crash here) ...

So, "OSContainer::is_containerized()", called as part of "os::print_summary_info()", crashes in these cases. I did not dive down but probably some initialization is missing.

This could be handled more gracefully.
Comments
That path was apparently added by JDK-8146115, which is everywhere starting 8. Adding affected versions.
16-09-2019

URL: https://hg.openjdk.java.net/jdk/jdk/rev/03964761a23c User: bobv Date: 2019-09-11 17:31:13 +0000
11-09-2019

This must be occuring in a debug build so is it really a P2? inline bool OSContainer::is_containerized() { assert(_is_initialized, "OSContainer not initialized"); return _is_containerized; } We could fix this by removing the assert. In this situation, this will return false and cause the hs-err file to skip adding any container statictics but since we haven't initialized it, this is the correct thing to do.
06-09-2019

ILW = HLH = P2
06-08-2019