RFR: 8298128: runtime/ErrorHandling/TestSigInfoInHsErrFile.java fails to find pattern with slowdebug

Daniel D. Daugherty dcubed at openjdk.org
Fri Dec 16 19:52:50 UTC 2022


On Fri, 16 Dec 2022 07:56:39 GMT, Afshin Zafari <duke at openjdk.org> wrote:

> ### Description
> The following problems found and solved:
> 
> 1) Reporting which regex pattern did not match with error messages was incorrect. To report the mismatched pattern, the head of the pattern list was peeked, while it was the already peeked item from that did not match. So the next pattern to the mismatched one was reported.
> 
> 2) The pattern for finding a crash was incorrectly set to "# .*VMError::controlled_crash.*", while it has to be "# .*crash_with_segfault.*".
> 
> 3) `crash_with_segfault` function is too small and was `inline`d in compiler optimisations. So it was not in the stack trace when the error message is created.
> 
> ### Patch
> 1 and 2 corrected and added the `NOINLINE` to  the `crash_with_segfault` signature. The same applied for `crash_with_sigfpe` function.
> 
> ### Test
> runtime/ErrorHandling/* and tier1-5

Thumbs up. Thanks for the careful analysis and including
your testing information.

I've only posted nit comments about typos.

test/hotspot/jtreg/runtime/ErrorHandling/HsErrFileUtils.java line 138:

> 136:                     throw new RuntimeException("hs-err file incomplete (first missing pattern: " + currentPositivePattern.pattern() + ")");
> 137:                 } else {
> 138:                     // Impossible to reach here, where stack is not empty and currentPositivePattern which peeked from stack is null.

nit typo: s/which peeked/which was peeked/

test/hotspot/jtreg/runtime/ErrorHandling/HsErrFileUtils.java line 139:

> 137:                 } else {
> 138:                     // Impossible to reach here, where stack is not empty and currentPositivePattern which peeked from stack is null.
> 139:                     // Beacuse, peek from stack returns null only when it is empty or has a null item.

nit typo: s/Beacuse/Because/

test/hotspot/jtreg/runtime/ErrorHandling/TestSigInfoInHsErrFile.java line 69:

> 67:     patterns.add(Pattern.compile("# *Problematic frame.*"));
> 68:     patterns.add(Pattern.compile("# .*crash_with_segfault.*"));
> 69: 

Please delete the extra blank line.

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

Marked as reviewed by dcubed (Reviewer).

PR: https://git.openjdk.org/jdk/pull/11704


More information about the hotspot-dev mailing list