<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Aug 15, 2022 at 10:27 AM Thomas Stüfe <<a href="mailto:thomas.stuefe@gmail.com">thomas.stuefe@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Aug 15, 2022 at 10:08 AM David Holmes <<a href="mailto:david.holmes@oracle.com" target="_blank">david.holmes@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Thomas,<br>
<br>
On 15/08/2022 3:42 pm, Thomas Stüfe wrote:<br>
> ..The only way I could see this happening is if tty itself is not valid. <br>
> Is this very early during initialization?<br>
<br>
Quite the opposite, it is during VM termination.<br>
<br></blockquote><div><br></div><div>Yes, that makes sense too. tty is defaultStream::instance, which we delete in ostream_exit() in DestroyVM.</div><div><br></div><div>Since this has bugging me for a while (more during pre-initialization, but its the same problem) I opened <a href="https://bugs.openjdk.org/browse/JDK-8292351" target="_blank">https://bugs.openjdk.org/browse/JDK-8292351</a> to track this. Should be trivial to fix.</div><div><br></div><div>..Thomas</div><div></div></div></div></blockquote><div><br></div><div>As for your crash, if you comment out "delete defaultStream::instance;" in ostream.cpp, you should be able to see the real issue.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Cheers,<br>
David<br>
<br>
> On Mon, Aug 15, 2022 at 7:40 AM Thomas Stüfe <<a href="mailto:thomas.stuefe@gmail.com" target="_blank">thomas.stuefe@gmail.com</a> <br>
> <mailto:<a href="mailto:thomas.stuefe@gmail.com" target="_blank">thomas.stuefe@gmail.com</a>>> wrote:<br>
> <br>
> Hi David,<br>
> <br>
> NMT detected a heap corruption or the pointer to be freed is<br>
> invalid. And then the reporter itself crashed while printing the<br>
> report. That is strange, since the reporter should be resilient<br>
> against crashes. It uses os::print_hex_dump, which should use<br>
> SafeFetch to check if the to-be-dumped info is accessible.<br>
> <br>
> Any more information?<br>
> <br>
> Cheers, Thomas<br>
> <br>
> On Mon, Aug 15, 2022 at 7:18 AM David Holmes<br>
> <<a href="mailto:david.holmes@oracle.com" target="_blank">david.holmes@oracle.com</a> <mailto:<a href="mailto:david.holmes@oracle.com" target="_blank">david.holmes@oracle.com</a>>> wrote:<br>
> <br>
> I'm getting the below crash:<br>
> <br>
> #<br>
> # A fatal error has been detected by the Java Runtime Environment:<br>
> #<br>
> # SIGSEGV (0xb) at pc=0x00007f3e3e24b417, pid=4537, tid=4538<br>
> #<br>
> # JRE version: Java(TM) SE Runtime Environment (20.0) (fastdebug<br>
> build<br>
> 20-internal-2022-06-10-0001400.daholme...)<br>
> # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug<br>
> 20-internal-2022-06-10-0001400.daholme..., mixed mode, sharing,<br>
> tiered,<br>
> compressed oops, compressed class ptrs, g1 gc, linux-amd64)<br>
> # Problematic frame:<br>
> # V [libjvm.so+0x174b417] outputStream::print_cr(char const*,<br>
> ...)+0x67<br>
> <br>
> --------------- T H R E A D ---------------<br>
> <br>
> Current thread (0x00007f3e38029890): Thread "Unknown thread"<br>
> [stack:<br>
> 0x00007f3e3f8a9000,0x00007f3e3f9aa000] [id=4538]<br>
> <br>
> Stack: [0x00007f3e3f8a9000,0x00007f3e3f9aa000], <br>
> sp=0x00007f3e3f9a84b0,<br>
> free space=1021k<br>
> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code,<br>
> C=native code)<br>
> V [libjvm.so+0x174b417] outputStream::print_cr(char const*,<br>
> ...)+0x67<br>
> V [libjvm.so+0x157d708]<br>
> MallocHeader::print_block_on_error(outputStream*, unsigned<br>
> char*) const+0x38<br>
> V [libjvm.so+0x157f2ef] MallocHeader::assert_block_integrity()<br>
> const+0x10f<br>
> V [libjvm.so+0x157eb6b] MallocTracker::record_free(void*)+0x3b<br>
> V [libjvm.so+0x172d3ef] os::free(void*)+0xbf<br>
> V [libjvm.so+0x1a6d77a] Thread::~Thread()+0x8a<br>
> V [libjvm.so+0x1060292] JavaThread::~JavaThread()+0x12<br>
> V [libjvm.so+0x1a8b174] Threads::destroy_vm()+0x264<br>
> <br>
> Any tips on trying to figure out what is going wrong?<br>
> <br>
> Thanks,<br>
> David<br>
> <br>
</blockquote></div></div>
</blockquote></div></div>