RFR: 8283643: [AIX, testbug] MachCodeFramesInErrorFile test fails to find 'Native frames' text
Tyler Steele
duke at openjdk.java.net
Tue Apr 19 22:14:26 UTC 2022
On Tue, 19 Apr 2022 09:02:54 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:
>> I observed a failure of MachCodeFramesInErrorFile.java on AIX. The raised error complains that 'Native frames: ' is missing. To fix the failure, I made two changes to the test that allowed it to pass on AIX.
>>
>> The first change made was to the test's `extractFrames` method. AIX overrides `os::platform_print_native_stack` with stack printing specific to AIX/Power. This code does not produce the 'Native frames: ' text that `vmError::print_native_stack` does, so the test was modified to expect the AIX output when run on AIX.
>>
>> A second change was made to the address passed to the `crashInNative1` method. AIX does not consider low-address memory to be protected as other platforms do. In fact, "the first 256 bytes are reserved for software use" according to the Power ISA. Accordingly, the read address for PPC was changed to -1 (0xFF..FF) to produce the expected failure result.
>>
>> ### Testing
>>
>> Tier1 tests complete as expected on AIX/Power.
>
> test/hotspot/jtreg/runtime/ErrorHandling/MachCodeFramesInErrorFile.java line 177:
>
>> 175: } else {
>> 176: marker = (nativeStack ? "Native" : "Java") + " frames: ";
>> 177: }
>
> Yeah, we have special stack trace code on AIX. Ok.
> test/hotspot/jtreg/runtime/ErrorHandling/MachCodeFramesInErrorFile.java line 189:
>
>> 187: }
>> 188: }
>> 189: throw new RuntimeException("\"" + marker + "\" line missing in hs_err_pid file:\n");
>
> Please explain removal!
OK!
This was an odd one; I was getting errors that complained about the length of the message in the exception. It looked like 2^16 was the max number of characters that could be included in a RuntimeException. I haven't found the upper limit documented anywhere, but I would get unexpected failures with it included in the message. The text prints to stdout, so I didn't suffer by removing it.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8094
More information about the hotspot-dev
mailing list