RFR: 8344903: Test TestJhsdbJstackPrintVMLocks.java intermittemt fails getProcess() is null
Leonid Mesnik
lmesnik at openjdk.org
Sun Nov 24 01:44:15 UTC 2024
On Sat, 23 Nov 2024 13:08:13 GMT, SendaoYan <syan at openjdk.org> wrote:
> Hi all,
> The newly added test `test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackPrintVMLocks.java` intermittent fails `the return value of "jdk.test.lib.apps.LingeredApp.getProcess()" is null`. This PR check `getProcess()` is null or not before invoke `destroyForcibly`. Test-fix only, the change has been verified locally, no risk.
test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackPrintVMLocks.java line 82:
> 80: throw new RuntimeException("Not able to find lock");
> 81: } finally {
> 82: if (theApp.getProcess() != null) {
This a really nice and usefule improvement, however doesn't fix the failure.
It is unclear why the process is null. Some exception should have been thrown, but we don't see it. The exception from finally block override the real problem.
So after your fix the test should start failing with real exception. If you can reproduce, investigate and fix the problem then you can make it in this PR.
Otherwise, make sense to rename summary to something like:
`Improve error handling TestJhsdbJstackPrintVMLocks.java
`
and investigate the problem later when failure has more info
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22342#discussion_r1855325891
More information about the serviceability-dev
mailing list