United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7185340 TEST_BUG: java/nio/channels/AsynchronousSocketChannel/Leaky.java failing intermittently [win]
JDK-7185340 : TEST_BUG: java/nio/channels/AsynchronousSocketChannel/Leaky.java failing intermittently [win]

Details
Type:
Bug
Submit Date:
2012-07-19
Status:
Closed
Updated Date:
2013-12-17
Project Name:
JDK
Resolved Date:
2012-08-20
Component:
core-libs
OS:
windows
Sub-Component:
java.nio
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
7u10,7u13,8
Fixed Versions:

Related Reports
Backport:
Backport:
Backport:
Backport:
Backport:
Relates:

Sub Tasks

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

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.
                                     
2012-07-19
EVALUATION

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



Hardware and Software, Engineered to Work Together