RFR: 8275677: Test fails due to truncated hs_err file

David Holmes dholmes at openjdk.org
Sat Nov 25 02:26:08 UTC 2023


On Fri, 24 Nov 2023 06:25:38 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> This failure has not reproduced in mainline for a long while but as a preventative measure, at the suggestion of @JesperIRL , I've made a slight change to the register printing so that we always print the raw value before we start trying to figure out what it points to. That may shed some light on any future truncation.
>> 
>> Testing tiers 1-3 and manual inspection of hs_err files produced by tests
>> 
>> Thanks
>
> src/hotspot/share/runtime/os.cpp line 1183:
> 
>> 1181:   // with debugging things if we fail to decode the location.
>> 1182:   st->print(INTPTR_FORMAT ": ", x);
>> 1183:   st->flush();
> 
> Nit: flush is not necessary, and strictly speaking should not be done by this function, since it depends on under which conditions the printing is done. In error handling, the caller must make sure that printing is unbuffered. And it is: we use unbuffered io (fdStream) which needs no flushing and where flush() is a noop.
> 
> So, I'd just remove the explicit flush() here.

Okay I will remove that flush(). I just wanted to try and guarantee the raw value would get printed.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16804#discussion_r1404705019


More information about the hotspot-runtime-dev mailing list