RFR: 8308499: Test vmTestbase/nsk/jdi/MethodExitRequest/addClassExclusionFilter/filter001/TestDescription.java failed: VMDisconnectedException

Leonid Mesnik lmesnik at openjdk.org
Wed Jun 14 21:56:56 UTC 2023


On Wed, 14 Jun 2023 21:24:31 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

> The test gets overloaded with MethodExitEvents, causing them to queue up (in the JDI queue) and continue to be processed by the test after the debuggee exits. This results in a VMDisconnectedException when the test tries to do the following after getting an event:
> 
> `    String str = ((MethodExitEvent)event).location().declaringType().name(); `
> 
> The test is suppose to add filters to execlude events for all non-test classes, but it is only filtering `java.*` and `sun.*`. There are also a very large number of `jdk.*` events coming in, and this is what is causing the event backlog and the processing of events after disconnect. Filtering out `jdk.*` events reduces the total number of events to a few dozen, and the test passes.
> 
> More details can be found in the CR.
> 
> Testing in progress: tier5 svc testing, and also running the failing test on all platforms (both debug and product).

Changes requested by lmesnik (Reviewer).

test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassExclusionFilter/filter001.java line 77:

> 75:     private String classExclName1 = "java";
> 76:     private String classExclName2 = "sun";
> 77:     private String classExclName3 = "jdk";

The fix is reasonable. However,
I think it would be better to use List<String> with List.of(...) and list.contains() to filter exclusions.

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

PR Review: https://git.openjdk.org/jdk/pull/14480#pullrequestreview-1480363171
PR Review Comment: https://git.openjdk.org/jdk/pull/14480#discussion_r1230209088


More information about the serviceability-dev mailing list