JDK-7185340 : TEST_BUG: java/nio/channels/AsynchronousSocketChannel/Leaky.java failing intermittently [win]
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 7u10,7u13,8
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: windows
  • CPU: generic
  • Submitted: 2012-07-19
  • Updated: 2013-12-17
  • Resolved: 2012-08-20
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 7 JDK 8
7u21Fixed 8 b51Fixed
Related Reports
Relates :  
Description
Test, java/nio/channels/AsynchronousSocketChannel/Leaky.java, failed intermittently on windows platform.

#Test Results (version 2)
#Wed Jul 11 19:39:39 PDT 2012
#checksum:7ff94e01f2215586
#-----testdescription-----
$file=C\:\\Users\\aurora\\sandbox\\testbase\\test\\java\\nio\\channels\\AsynchronousSocketChannel\\Leaky.java
$root=C\:\\Users\\aurora\\sandbox\\testbase\\test
keywords=bug4607272 bug6999915 othervm
run=USER_SPECIFIED main/othervm -XX\:+DisableExplicitGC -XX\:MaxDirectMemorySize\=64m Leaky\r\n
source=Leaky.java
title=Unit test for AsynchronousSocketChannel

#-----environment-----

#-----testresult-----
description=file\:/C\:/Users/aurora/sandbox/testbase/test/java/nio/channels/AsynchronousSocketChannel/Leaky.java
elapsed=1344 0\:00\:01.344
end=Wed Jul 11 19\:39\:39 PDT 2012
environment=regtest
execStatus=Failed. Execution failed\: `main' threw exception\: java.lang.OutOfMemoryError\: Direct buffer memory
hostname=sfx2100-06
javatestOS=Windows Vista 6.0 (amd64)
javatestVersion=4.4
jtregVersion=jtreg 4.1 fcs b04
script=com.sun.javatest.regtest.RegressionScript 
sections=script_messages build compile main
start=Wed Jul 11 19\:39\:38 PDT 2012
test=java/nio/channels/AsynchronousSocketChannel/Leaky.java
user.name=aurora
work=C\:\\Users\\aurora\\sandbox\\gresults\\testoutput\\jdk_nio2\\JTwork\\java\\nio\\channels\\AsynchronousSocketChannel

#section:script_messages
----------messages:(4/230)*----------
JDK under test: (C:\\Users\\aurora\\sandbox\\jdk)
java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-langtools-nightly-h278-20120711-b47-b00)
Java HotSpot(TM) 64-Bit Server VM (build 24.0-b15, mixed mode)

#section:build
----------messages:(3/93)----------
command: build Leaky
reason: Named class compiled on demand
elapsed time (seconds): 0.062
result: Passed. Build successful

#section:compile
----------messages:(3/203)*----------
command: compile C:\\Users\\aurora\\sandbox\\testbase\\test\\java\\nio\\channels\\AsynchronousSocketChannel\\Leaky.java
reason: .class file out of date or does not exist
elapsed time (seconds): 0.062
result: Passed. Compilation successful

#section:main
----------messages:(3/210)----------
command: main -XX:+DisableExplicitGC -XX:MaxDirectMemorySize=64m Leaky
reason: User specified action: run main/othervm -XX:+DisableExplicitGC -XX:MaxDirectMemorySize=64m Leaky 
elapsed time (seconds): 1.282
----------System.out:(0/0)----------
----------System.err:(20/1107)----------
java.lang.OutOfMemoryError: Direct buffer memory
	at java.nio.Bits.reserveMemory(Bits.java:658)
	at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:123)
	at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:306)
	at sun.nio.ch.Util.getTemporaryDirectBuffer(Util.java:174)
	at sun.nio.ch.IOUtil.write(IOUtil.java:58)
	at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:450)
	at Leaky$Connection.write(Leaky.java:75)
	at Leaky.main(Leaky.java:109)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:474)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:722)

JavaTest Message: Test threw exception: java.lang.OutOfMemoryError: Direct buffer memory
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.OutOfMemoryError: Direct buffer memory
result: Failed. Execution failed: `main' threw exception: java.lang.OutOfMemoryError: Direct buffer memory


test result: Failed. Execution failed: `main' threw exception: java.lang.OutOfMemoryError: Direct buffer memory

Comments
EVALUATION http://hg.openjdk.java.net/hsx/hotspot-comp/jdk/rev/78644d4a9a32
14-08-2012

EVALUATION In recent bug fix 7176485, the size of temporary buffer cache has been increased to IOV_MAX, which leads to the increase of the direct buffer memory footprint. And accordingly, this test needs to adjust its vm option, -XX:MaxDirectMemorySize=64m.
19-07-2012