JDK-8290095 : java/nio/channels/FileChannel/largeMemory/LargeGatheringWrite.java timed out
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 19
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • CPU: x86_64
  • Submitted: 2022-07-11
  • Updated: 2022-12-22
  • Resolved: 2022-07-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 19 JDK 20
19 b31Fixed 20Fixed
Related Reports
Relates :  
Relates :  
Description
The following test timed out in the JDK19 CI:

java/nio/channels/FileChannel/largeMemory/LargeGatheringWrite.java

Here's a snippet from the log file:

#section:main
----------messages:(6/253)----------
command: main -Xmx4G LargeGatheringWrite
reason: User specified action: run main/othervm/timeout=240 -Xmx4G LargeGatheringWrite 
Mode: othervm [/othervm specified]
Timeout information:
--- Timeout information end.
elapsed time (seconds): 1119.014
----------configuration:(0/0)----------
----------System.out:(15/428)----------
Seed from RandomFactory = -8916152547217752015L
Writing 5368709122 bytes of data...
Wrote 5368709122 bytes
Total of 5368709122 bytes written
Checking length 1073741824
Timeout refired 960 times
Checking length 1073741824
Checking length 536870912
Checking length 536870912
Checking length 536870912
Checking length 536870912
Checking length 536870912
Checking length 536870912
Checking length 1
Checking length 1
----------System.err:(1/16)----------
STATUS:Passed.
----------rerun:(40/6196)*----------

<snip>

result: Error. Program `c:\ade\mesos\work_dir\jib-master\install\jdk-19+31-2188\windows-x64.jdk\jdk-19\bin\java' timed out (timeout set to 960000ms, elapsed time including timeout handling was 1118905ms).


Please note that the test PASSed while the timeout handler was running.
Comments
A lot of the tests in the java/nio/channels/FileChannel need to create large files in other to test some operation. This bug has signalled out one test but there are many more that potentially take longer to run than this one. I did a few experiments and the best approach seems to separate task for channels/FileChannel or also add a TEST.properties to that directory with exclusiveAccess.dirs=. so that a FileChannel test doesn't run concurrently with other FileChannel tests in the directory. Either way, the largeMemory directory isn't needed.
13-07-2022

Changeset: 128c6c64 Author: Brian Burkhalter <bpb@openjdk.org> Date: 2022-07-12 20:48:23 +0000 URL: https://git.openjdk.org/jdk19/commit/128c6c648c24c37ab20a7c902d67d245e2b4ca72
12-07-2022

> The test directory is in the value of exclusiveAccess.dirs but this doesn't prevent it from running > concurrently with tests that are in locations not listed in exclusiveAccess.dirs. This is because the tests in java/nio/channels/FileChannel/largeMemory are still run as part of: open/test/jdk/:tier2_part2 If they were excluded from that test group and then run in their own test group with their own test task, then they would not run in parallel with other tests. I don't know if that is how [~cjplummer] solved the problem with his "resourcehogs" test group or not. It's been too long since I've seen those changes.
12-07-2022

perhaps it is not the test per se but an issue in jtreg when reaping the othervm child process .... in a number of cases the test logs indicate the test has passed but the cleanup seems to run into difficulties. As such extending the test timeout may not rectify these difficulties ---------------------------------------- [2022-07-12 13:28:01] [C:\cygwin\bin\bash.exe, -c, wmic process where ParentProcessId=38288 get ProcessId | tail -n+2] timeout=20000 ---------------------------------------- ---------------------------------------- [2022-07-12 13:28:01] exit code: 0 time: 123 ms ---------------------------------------- WARNING: can't parse child pid No Instance(s) Available. : For input string: "No Instance(s) Available." java.lang.NumberFormatException: For input string: "No Instance(s) Available." at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67) at java.base/java.lang.Long.parseLong(Long.java:711) at java.base/java.lang.Long.valueOf(Long.java:1159) at jdk.test.failurehandler.action.ActionHelper.getChildren(ActionHelper.java:105) at jdk.test.failurehandler.ToolKit.gatherProcessInfo(ToolKit.java:92) at jdk.test.failurehandler.jtreg.GatherProcessInfoTimeoutHandler.runGatherer(GatherProcessInfoTimeoutHandler.java:112) at jdk.test.failurehandler.jtreg.GatherProcessInfoTimeoutHandler.runActions(GatherProcessInfoTimeoutHandler.java:87) at com.sun.javatest.regtest.TimeoutHandler.handleTimeout(TimeoutHandler.java:120) at com.sun.javatest.regtest.exec.ProcessCommand$2.run(ProcessCommand.java:317)
12-07-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk19/pull/135 Date: 2022-07-11 21:28:10 +0000
11-07-2022