Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDK18 AIX java/nio/channels/FileChannel/Transfer2GPlus.java - RuntimeException: Transfer too small: 1043881984 #14504

Open
JasonFengJ9 opened this issue Feb 13, 2022 · 5 comments

Comments

@JasonFengJ9
Copy link
Member

Failure link

From an internal build job/Test_openjdk18_j9_extended.openjdk_ppc64_aix/3/(paix907):

openjdk version "18" 2022-03-22
IBM Semeru Runtime Open Edition 18.0.0.0-m1 (build 18+35)
Eclipse OpenJ9 VM 18.0.0.0-m1 (build openj9-0.31.0-m1, JRE 18 AIX ppc64-64-Bit Compressed References 20220210_28 (JIT enabled, AOT enabled)
OpenJ9   - 700cde7b8
OMR      - bb5d44b8c
JCL      - cdd4205c649 based on jdk-18+35)

Rerun in Grinder - Change TARGET to run only the failed test targets.

Optional info

Failure output (captured from console output)

[2022-02-11T07:42:13.549Z] variation: Mode150
[2022-02-11T07:42:13.549Z] JVM_OPTIONS:  -XX:+UseCompressedOops 

[2022-02-11T08:08:44.384Z] TEST: java/nio/channels/FileChannel/Transfer2GPlus.java

[2022-02-11T08:08:44.385Z] STDERR:
[2022-02-11T08:08:44.385Z] java.lang.RuntimeException: Transfer too small: 1043881984
[2022-02-11T08:08:44.385Z] 	at Transfer2GPlus.testToFileChannel(Transfer2GPlus.java:87)
[2022-02-11T08:08:44.385Z] 	at Transfer2GPlus.main(Transfer2GPlus.java:58)
[2022-02-11T08:08:44.385Z] 	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
[2022-02-11T08:08:44.385Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:577)
[2022-02-11T08:08:44.385Z] 	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
[2022-02-11T08:08:44.385Z] 	at java.base/java.lang.Thread.run(Thread.java:889)
[2022-02-11T08:08:44.385Z] 
[2022-02-11T08:08:44.385Z] JavaTest Message: Test threw exception: java.lang.RuntimeException: Transfer too small: 1043881984
[2022-02-11T08:08:44.385Z] JavaTest Message: shutting down test
[2022-02-11T08:08:44.385Z] 
[2022-02-11T08:08:44.385Z] STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Transfer too small: 1043881984

[2022-02-11T08:41:53.822Z] jdk_nio_0_FAILED
@pshipton
Copy link
Member

Repeated the failure in https://openj9-jenkins.osuosl.org/view/Test/job/Grinder/634

12:55:24  java.lang.RuntimeException: Transfer too small: 2133209088
12:55:24  	at Transfer2GPlus.testToFileChannel(Transfer2GPlus.java:87)
12:55:24  	at Transfer2GPlus.main(Transfer2GPlus.java:58)

@pshipton
Copy link
Member

Looks like a test issue, I'll try adding an exception for AIX.

                    if (!Platform.isLinux())
                        throw new RuntimeException("Transfer too small: " + total);

                    // If this point is reached we're on Linux which cannot
                    // transfer all LENGTH bytes in one call to sendfile(2),
                    // so loop to get the rest.

@pshipton
Copy link
Member

pshipton commented Feb 15, 2022

Updating the test resulted in the following on an open machine. Internal machines may have more space available.

13:27:12  java.io.IOException: No space left on device
13:27:12  	at java.base/sun.nio.ch.FileDispatcherImpl.write0(Native Method)
13:27:12  	at java.base/sun.nio.ch.FileDispatcherImpl.write(FileDispatcherImpl.java:62)
13:27:12  	at java.base/sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:137)
13:27:12  	at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:81)
13:27:12  	at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:72)
13:27:12  	at java.base/sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:288)
13:27:12  	at java.base/sun.nio.ch.FileChannelImpl.transferToTrustedChannel(FileChannelImpl.java:605)
13:27:12  	at java.base/sun.nio.ch.FileChannelImpl.transferTo(FileChannelImpl.java:699)
13:27:12  	at Transfer2GPlus.testToFileChannel(Transfer2GPlus.java:93)
13:27:12  	at Transfer2GPlus.main(Transfer2GPlus.java:58)

@pushkarnk
Copy link
Contributor

I wasn't able to reproduce this with Temurin 18 EA. I ran the test 5 times.

With Semeru 18 EA, I see a different error:

Exception while calling user-specified class: requires.VMProps
java.lang.UnsatisfiedLinkError: jdk/test/whitebox/WhiteBox.registerNatives()V
        at jdk.test.whitebox.WhiteBox.<clinit>(WhiteBox.java:67)
        at requires.VMProps.<clinit>(VMProps.java:64)
        at java.base/java.lang.Class.forNameImpl(Native Method)
        at java.base/java.lang.Class.forName(Class.java:369)
        at java.base/java.lang.Class.forName(Class.java:349)
        at com.sun.javatest.regtest.agent.GetJDKProperties.run(GetJDKProperties.java:78)
        at com.sun.javatest.regtest.agent.GetJDKProperties.main(GetJDKProperties.java:54)
failed to get JDK properties for /home/jenkins/pushkar/jdk-18+35/bin/java ; exit code 1
Error: failed to get JDK properties for /home/jenkins/pushkar/jdk-18+35/bin/java ; exit code 1

@pshipton
Copy link
Member

pshipton commented Feb 22, 2022

@pushkarnk the problem is specific to certain machines. It fails on Termurin 18 if specific machines are used. The problem is with the test, it needs to be modified for AIX the same as it's modified for Linux, see #14504 (comment). Similarly to Linux , this is due to the implementation using send_file() on AIX which may not transfer the entire contents in a single call. Can we pls fix the test at OpenJDK for AIX with backports to jdk17 and 18.

14:38:03  openjdk version "18-beta" 2022-03-22
14:38:03  OpenJDK Runtime Environment Temurin-18+35-202202142340 (build 18-beta+35-202202142340)
14:38:03  OpenJDK 64-Bit Server VM Temurin-18+35-202202142340 (build 18-beta+35-202202142340, mixed mode)

...

14:40:23  java.lang.RuntimeException: Transfer too small: 1043742720
14:40:23  	at Transfer2GPlus.testToFileChannel(Transfer2GPlus.java:87)
14:40:23  	at Transfer2GPlus.main(Transfer2GPlus.java:58)

The problem is not specific to jdk18 it occurs on jdk17 as well. Fixing the labels and removing from the Java 18 milestone plan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants