RFR: 8256337: ap01t001.cpp, 67: Received unexpected number of ObjectFree events: 7
Stefan Karlsson
stefank at openjdk.java.net
Fri Nov 13 14:18:12 UTC 2020
On Fri, 13 Nov 2020 14:11:23 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
> The ap01t001 test creates six extra instances of the tested class, let them die, and then checks that it gets exactly six ObjectFree callbacks. The problem is that this is verified in the VMDeath callback and at that point the instance has gone out-of-scope and and a seventh ObjectFree event has been triggered.
>
> My proposed fix is to ensure that the test instance is kept alive.
I've tested this by running the following reproducer that used to trigger this bug:
`while true; do make -C ../build/fastdebug jdk test-only TEST=test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP01/ap01t001/TestDescription.java JTREG="JAVA_OPTIONS= -XX:+UseZGC -Xmx2g -XX:ZCollectionInterval=0.01"; done`
-------------
PR: https://git.openjdk.java.net/jdk/pull/1204
More information about the serviceability-dev
mailing list