JDK-4824045 : RegTest-test java/nio/channels/FileChannel/Transfer.java fails
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 1.4.2,1.4.2_17
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_9,solaris_10
  • CPU: other,x86,sparc
  • Submitted: 2003-02-26
  • Updated: 2009-08-27
  • Resolved: 2003-04-10
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.
Other Other
1.4.2_24-revFixed 1.4.2_25Fixed
Related Reports
Relates :  
Description

Name: iaR10016			Date: 02/25/2003


Filed By      : J2SE-SQA [###@###.###
JDK           : JDK1.4.2-b16
Testbase      : RegTest-test
Platform[s]   : Solaris 8 (sparc), Solaris 9 (sparc), Solaris 9 (x86)
switch/Mode   : -server
Falling tests :
        java/nio/channels/FileChannel/Transfer.java

RegTest-test java/nio/channels/FileChannel/Transfer.java test fails on JDK1.4.2-b16,
b14, etc. on Solaris 8 (sparc), Solaris 9 (sparc), Solaris 9 (x86) with
"java.io.IOException: Invalid argument" error message.

I am not able to reproduce the failure on my Solaris 7 (sparc) and Solaris 8 (x86) machines.

Probably, this is a duplicate of the bug 4643189.

Test source location:
=====================
/java/re/jdk/1.4.2/promoted/latest/ws/j2se/test/java/nio/channels/FileChannel/Transfer.java

jtr file location:
==================
/net/jtgb4u4c.sfbay/export/sail15/results/mantis/b16/regtest/sparc/sol8_sparc-server_smp_linux-1/workDir/test/java/nio/channels/FileChannel/Transfer.jtr

How to reproduce:
=================
Run the following script (you may need to change its
variables JT_HOME, JAVA_HOME, TEST_BASE_PATH variables)

--- script start ---
#!/bin/sh

JT_HOME="/net/linux-15/export/home/java/jct"
JAVA_HOME="/net/linux-15/export/home/java/jdk1.4.2/sparc"
TEST_BASE_PATH="/net/linux-15/export/home/java/regtest/test"
RESULT_DIR=`pwd`
WORK_DIR=$RESULT_DIR/workDir/test
REPORT_DIR=$RESULT_DIR/reportDir
export CLASSPATH="$JT_HOME/classes:$JT_HOME/lib/javatest.jar:$JT_HOME/lib/jtreg.jar:$JT_HOME/jemmy/jemmy.jar"
mkdir -p $WORK_DIR/scratch 2>&1
mkdir -p $WORK_DIR/jtData 2>&1
mkdir -p $REPORT_DIR 2>&1
cd $WORK_DIR/scratch

$JAVA_HOME/bin/java -DenvVars=TESTJAVAHOME=$JAVA_HOME -Dprogram=jtreg com.sun.javatest.regtest.Main -batch -params -w "$WORK_DIR" -r "$REPORT_DIR" -t "$TEST_BASE_PATH" "$TEST_BASE_PATH/java/nio/channels/FileChannel/Transfer.java"
--- script end ---

Test output (jtr part):
=======================
----------System.out:(0/0)----------
----------System.err:(17/920)----------
java.io.IOException: Invalid argument
        at sun.nio.ch.FileChannelImpl.transferTo0(Native Method)
        at sun.nio.ch.FileChannelImpl.transferToDirectly(FileChannelImpl.java:391)
        at sun.nio.ch.FileChannelImpl.transferTo(FileChannelImpl.java:486)
        at Transfer.xferTest04(Transfer.java:211)
        at Transfer.main(Transfer.java:27)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:82)
        at java.lang.Thread.run(Thread.java:534)

JavaTest Message: Test threw exception: java.io.IOException: Invalid argument
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.io.IOException: Invalid argument
result: Failed. Execution failed: `main' threw exception: java.io.IOException: Invalid argument

test result: Failed. Execution failed: `main' threw exception: java.io.IOException: Invalid argument

Specific machine info:
======================
Hostname: linux-1
OS: Solaris 8 (sparc)

Hostname: novo48
OS: Solaris 9 (sparc)

Hostname: linux-6
OS: Solaris 9 (x86)

======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger FIXED IN: tiger INTEGRATED IN: tiger tiger-b05 VERIFIED IN: tiger-beta
14-06-2004

EVALUATION I have not been able to reproduce this on Solaris 7 or 8 (sparc). ###@###.### 2003-02-26 Some versions of Solaris return EINVAL from sendfile if the target FD is a pipe. We will use a fallback transfer mechanism in this case. Also, transfer can fail because we are not using sendfilevec64, so long offsets can cause errors. This will also be fixed. ###@###.### 2003-03-31
31-03-2003