RFR: 8360707: Globally enumerate all blobs, stubs and entries
Andrew Dinn
adinn at openjdk.org
Tue Jul 1 07:47:41 UTC 2025
On Tue, 1 Jul 2025 06:27:04 GMT, Amit Kumar <amitkumar at openjdk.org> wrote:
>> @offamitkumar I managed to run the test on an s390x build and it passed. I didn't get any hserr output in the jtr file when I set DEBUG on the command line. So, I modified the test to write the hserr file to system.err unconditionially (i.e. I changed the if at line 137 of MachCodeFramesInErrorFile.java to 'if (true)'.
>>
>> The System.err output in the jtr file contained [MachCode] sections for 4 compiled methods, including the two that appeared in the stack listing (crashInJava3 and crashInJava2). So, I'm not sure why it is failing.
>>
>> n.b. not all the System.err output ends up in the jtr file because the test harness truncates excessive output. However, I wonder if the problem you are seeing is because the original hserr file is being truncated. It includes a message to that effect starting "Output overflow: ..."
>>
>> If that is the case and if you can reproduce the problem after modifying the test to write the hserr contents unconditionally then you ought to be able to see all the file contents by setting system property javatest.maxOutputSize to a suitable value (default is 100000).
>
>> The System.err output in the jtr file contained [MachCode] sections for 4 compiled methods, including the two that appeared in the stack listing (crashInJava3 and crashInJava2). So, I'm not sure why it is failing.
>>
>>n.b. not all the System.err output ends up in the jtr file because the test harness truncates excessive output. However, I wonder if the problem you are seeing is because the original hserr file is being truncated. It includes a message to that effect starting "Output overflow: ..."
>
>
> @adinn is this something which is expected:
>
> Stack: [0x000003ff82980000,0x000003ff82a80000], sp=0x000003ff82a7e4c8, free space=1017k
> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
> J 21 c2 MachCodeFramesInErrorFile$Crasher.crashInJava3(J)V (27 bytes) @ 0x000003ff70657c8a [0x000003ff70657c40+0x000000000000004a]
> J 20 c2 MachCodeFramesInErrorFile$Crasher.crashInJava2(J)V (13 bytes) @ 0x000003ff706580c0 [0x000003ff70658040+0x0000000000000080]
> j MachCodeFramesInErrorFile$Crasher.crashInJava1(J)V+9
> j MachCodeFramesInErrorFile$Crasher.main([Ljava/lang/String;)V+71
> v ~StubRoutines::Stub Generator call_stub_stub 0x000003ff70580edc
>
> [error occurred during error reporting (printing native stack (with source info)), id 0xe0000000, Internal Error (/home/amit/jdk/src/hotspot/cpu/s390/frame_s390.inline.hpp:40)]
>
> Retrying call stack printing without source information...
>
>
> I don't see any truncation message in the hs_err output.
@offamitkumar Thanks for following up.
> is this something which is expected:
Stack: [0x000003ff82980000,0x000003ff82a80000], sp=0x000003ff82a7e4c8, free space=1017k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
J 21 c2 MachCodeFramesInErrorFile$Crasher.crashInJava3(J)V (27 bytes) @ 0x000003ff70657c8a [0x000003ff70657c40+0x000000000000004a]
J 20 c2 MachCodeFramesInErrorFile$Crasher.crashInJava2(J)V (13 bytes) @ 0x000003ff706580c0 [0x000003ff70658040+0x0000000000000080]
j MachCodeFramesInErrorFile$Crasher.crashInJava1(J)V+9
j MachCodeFramesInErrorFile$Crasher.main([Ljava/lang/String;)V+71
v ~StubRoutines::Stub Generator call_stub_stub 0x000003ff70580edc
[error occurred during error reporting (printing native stack (with source info)), id 0xe0000000, Internal Error (/home/amit/jdk/src/hotspot/cpu/s390/frame_s390.inline.hpp:40)]
Retrying call stack printing without source information...
That does not look right. Was there any more hserr printout after that last line? -- in particular any [MachCode]...[/MachCode] sections? It would help if you could attach the full .jtr file.
The stack backtrace in the listing above is broken at the frame for a generated stub (call_stub_stub) so it looks like the stack walk is failing. It ought to continue with a C++ frame for JavaCalls::call_helper and so on right up to the frame for start_thread. I'll check to see if perhaps this might be to do with some change to the stub.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26004#issuecomment-3022350306
More information about the shenandoah-dev
mailing list