RFR 8240704: CheckHandles.java failed "AssertionError: Handle use increased by more than 10 percent."
daniel.fuchs at oracle.com
Thu Mar 12 11:13:22 UTC 2020
Looks good to me. If it were my own test I would add a little
Thread.sleep() after System.gc() to actually give time to the
gc to do something.
I have to note however that:
83 final long ERROR_PERCENT = 10;
84 final long ERROR_THRESHOLD = // 10% increase over min to
85 startHandles + ((startHandles + ERROR_PERCENT - 1)
is a bit misleading. IMO it only works because ERROR_PERCENT = 10; and
10 * 10 = 100; If you change it to ERROR_PERCENT = 1; for instance, then
you end up with allowing 100% of errors (and not 1%).
On 11/03/2020 20:43, Roger Riggs wrote:
> Please review a test improvement to avoid counting unexpected handles.
> The test for 8239893failed when non-test activities used handles.
> The test is modified to do a warmup phase spawning some processes and
> cleaning up.
> It then runs the test to create processes looking for no significant
> increase in handles.
> The execution mode is limited to the interpreter to avoid potential side
> effects of compilation.
> The error condition was corrected to look only for increases in the
> number of handles.
> Previously, it looked for a 10% delta between the minimum and maximum
> count of handles.
> Thanks, Roger
>  8239893 <https://bugs.openjdk.java.net/browse/JDK-8239893> Windows
> handle Leak when starting processes using ProcessBuilder
More information about the core-libs-dev