RFR: 8370732: vmTestbase/nsk/jvmti/AttachOnDemand/attach020/TestDescription.java intermittent fails [v2]

SendaoYan syan at openjdk.org
Wed Oct 29 03:15:41 UTC 2025


On Wed, 29 Oct 2025 02:56:44 GMT, SendaoYan <syan at openjdk.org> wrote:

>> Hi all,
>> 
>> We observed the test vmTestbase/nsk/jvmti/AttachOnDemand/attach020/TestDescription.java intermittent fails. since the target application intermittent OOM. The target application will try to exhaust the heap memory and then trigger garbage collection by `ClassUnloader.eatMemory()` in file test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach020/attach020Target.java.
>> 
>> So I think it's better to limited the max heap usage of target application. Before this PR, the physical memory usage is about 30.7GB(this depends the total free memory on the test machine), and the jtreg main action take about 11 seconds to finish; After this PR, the physical memory usage is about 126MB, and the jtreg main action take about 0.7 senonds to finish. I use below command to get the usage of physical memory.
>> 
>> Change has been verified locally, test-fix only, no risk.
>> 
>> 
>> grep VmRSS /proc/`ps -ef | grep -w java | grep vmsqe.aod.AppId | awk '{print $2}'`/status
>
> SendaoYan has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Add -Xmx128 for attach021/022

Below 9 tests was added '-Xmx128M' and remove the 'exclusiveAccess.dirs=.' property.

test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart001/TestDescription.java
test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart002/TestDescription.java
test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionFinish/gcfinish001/TestDescription.java
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t002/TestDescription.java
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t006/TestDescription.java
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP12/ap12t001/TestDescription.java
test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach020/TestDescription.java
test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach021/TestDescription.java
test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach022/TestDescription.java

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

PR Comment: https://git.openjdk.org/jdk/pull/28011#issuecomment-3459446446


More information about the serviceability-dev mailing list