RFR: 8330077: Allow max number of events to be buffered to be configurable to avoid OVERFLOW_EVENT [v8]
Brian Burkhalter
bpb at openjdk.org
Thu Apr 18 18:24:58 UTC 2024
On Thu, 18 Apr 2024 17:36:02 GMT, Fabian Meumertzheim <duke at openjdk.org> wrote:
>> test/jdk/java/nio/file/WatchService/LotsOfEntries.java line 32:
>>
>>> 30: * @run main/othervm -Djdk.nio.file.WatchService.maxEventsPerPoll=invalid LotsOfEntries 600 fail
>>> 31: * @run main/othervm -Djdk.nio.file.WatchService.maxEventsPerPoll=-5 LotsOfEntries 5 fail
>>> 32: * @run main/othervm -Djdk.nio.file.WatchService.maxEventsPerPoll=5 LotsOfEntries 5 pass
>>
>> I ran 100 repeats of this test on each of four different platforms. 398 executions passed, but two failed, both in the sub-test at line 32. I do not know what happened in these two cases for the sub-tests at lines 33-35 as these were not run. The output was like:
>>
>>
>> jtreg_open_test_jdk_java_nio_file_WatchService_LotsOfEntries_java/tmp/name7869734652501521174/entry1]
>> at LotsOfEntries.testCreateLotsOfEntries(LotsOfEntries.java:84)
>> at LotsOfEntries.main(LotsOfEntries.java:96)
>> at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
>> at java.base/java.lang.reflect.Method.invoke(Method.java:580)
>> at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
>> at java.base/java.lang.Thread.run(Thread.java:1575)
>>
>> JavaTest Message: Test threw exception: java.lang.RuntimeException: Expected events on: [multiple flle names omitted]
>
> I slightly lowered/raised the numbers of files to be created. We can tune this more if needed, I don't think fully precise control over the number of events is required.
We just don't want to have random failures creating noise. Tests are run many times each day. I think the problematic line here is
32 * @run main/othervm -Djdk.nio.file.WatchService.maxEventsPerPoll=5 LotsOfEntries 5 pass
This failed I think in only 3 of 300 repeats on linux-aarch64.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18739#discussion_r1571188501
More information about the nio-dev
mailing list