United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4824045 : RegTest-test java/nio/channels/FileChannel/Transfer.java fails

Details
Type:
Bug
Submit Date:
2003-02-26
Status:
Closed
Updated Date:
2009-08-27
Project Name:
JDK
Resolved Date:
2003-04-10
Component:
core-libs
OS:
solaris_9,solaris_10
Sub-Component:
java.nio
CPU:
x86,sparc,other
Priority:
P3
Resolution:
Fixed
Affected Versions:
1.4.2,1.4.2_17
Fixed Versions:
5.0 (tiger)

Related Reports
Backport:
Backport:
Relates:

Sub Tasks

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
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
                                     
2003-03-31
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
tiger

FIXED IN:
tiger

INTEGRATED IN:
tiger
tiger-b05

VERIFIED IN:
tiger-beta


                                     
2004-06-14



Hardware and Software, Engineered to Work Together