JDK-2125632 : nio does not seem to work with Linux kernel 2.6.4 (and probably above)
  • Type: Backport
  • Backport of: JDK-5056395
  • Component: core-libs
  • Sub-Component: java.nio
  • Priority: P3
  • Status: Closed
  • Resolution: Won't Fix
  • Submitted: 2005-04-26
  • Updated: 2011-02-16
  • Resolved: 2006-12-08
Description
FCtransferTosize and FCtransferTo testcases are failing on amd-sles9.0 with 1.4.2_07. It is failing with 1.4.2_06 also so it is not a regression. But this can be a cross platform regression as it is passing on solaris sparc.

How To Reproduce :
================
Compile and execute the FCtransferTosize.java
java -cp test.jar:. FCtransferTosize

OUTPUT:
======

AMD-SLES9.0:
===========
TestFailException: FCtransferTosizeTest1 FAIL: Expected Exception - FCtransferTosizeTest1java.io.IOException: Invalid argument
        at TestHelper.testFail(TestHelper.java:70)
        at FCtransferTosize.FCtransferTosizeTest1(FCtransferTosize.java:166)
        at FCtransferTosize.go(FCtransferTosize.java:78)
        at FCtransferTosize.main(FCtransferTosize.java:44)
Test Case FCtransferTosizeTest1 failed!
Pass count: 0
Fail count: 1
java.nio.channels.transferTo()  Failed
# uname -a
Linux urt-amd-1 2.6.5-7.97-default #1 Fri Jul 2 14:21:59 UTC 2004 x86_64 x86_64 x86_64 GNU/Linux


SOLARIS9 SPARC:
==============

where as this testcase is passed on solaris9 sparc, Here is the output
jtg-s124$ /usr/j2se/bin/java -cp test.jar:. FCtransferTosize
SIZE1 1850428
SIZE2 1850428
FCtransferTosizeTest1 PASS - FCtransferTosizeTest1
Pass count: 1
Fail count: 0
java.nio.channels.transferTo()  Passed
###@###.### 10/18/04 14:58 GMT
###@###.### 2005-04-26 07:05:56 GMT

Comments
EVALUATION -- There isn't a 1.4.x escalation against this and Anupam suggests closing it.
08-12-2006

EVALUATION sendfile(2) syscall has been modified in such a way that Linux kernel 2.6.x and above can be used to transfer data from a file descriptor to a socket descriptor. ###@###.### 2005-04-26 07:05:57 GMT
26-04-2005

SUGGESTED FIX backport from tiger ###@###.### 2005-04-26 07:05:57 GMT
26-04-2005