United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 7170203 TEST_BUG: test/java/nio/MappedByteBuffer/Truncate.java failing intermittently
7170203 : TEST_BUG: test/java/nio/MappedByteBuffer/Truncate.java failing intermittently

Details
Type:
Bug
Submit Date:
2012-05-19
Status:
Closed
Updated Date:
2012-07-03
Project Name:
JDK
Resolved Date:
2012-07-03
Component:
core-libs
OS:
generic
Sub-Component:
java.nio
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
8
Fixed Versions:
8

Related Reports
Backport:

Sub Tasks

Description
The fix for 6816049 has exposed a latent bug in the test java/nio/MappedBuffer/Truncate.java, it has failed intermittently on both Linux and Mac in the TL nightly. Attached is one sighting. 


#Test Results (version 2)
#Thu May 17 19:55:38 PDT 2012
#checksum:201a1375904d9a9f
#-----testdescription-----
$file=/Users/aurora/sandbox/testbase/test/java/nio/MappedByteBuffer/Truncate.java
$root=/Users/aurora/sandbox/testbase/test
keywords=bug6934977 othervm
run=USER_SPECIFIED main/othervm Truncate\n
source=Truncate.java
title=Test MappedByteBuffer operations after mapped bye buffer becomes inaccessible

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

#-----testresult-----
description=file\:/Users/aurora/sandbox/testbase/test/java/nio/MappedByteBuffer/Truncate.java
elapsed=153 0\:00\:00.153
end=Thu May 17 19\:55\:38 PDT 2012
environment=regtest
execStatus=Failed. Execution failed\: `main' threw exception\: java.lang.InternalError\: a fault occurred in a recent unsafe memory access operation in compiled Java code
hostname=sc14160057.us.oracle.com
javatestOS=Linux 2.6.18-238.0.0.0.1.el5xen (i386)
javatestVersion=4.4
jtregVersion=jtreg 4.1 fcs b04
script=com.sun.javatest.regtest.RegressionScript 
sections=script_messages build compile main
start=Thu May 17 19\:55\:38 PDT 2012
test=java/nio/MappedByteBuffer/Truncate.java
user.name=aurora
work=/Users/aurora/sandbox/gresults/testoutput/jdk_nio2/JTwork/java/nio/MappedByteBuffer

#section:script_messages
----------messages:(4/213)----------
JDK under test: (/Users/aurora/sandbox/jdk)
java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-langtools-nightly-h235-20120517-b40-b00)
Java HotSpot(TM) Server VM (build 24.0-b09, mixed mode)

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

#section:compile
----------messages:(3/173)----------
command: compile /Users/aurora/sandbox/testbase/test/java/nio/MappedByteBuffer/Truncate.java
reason: .class file out of date or does not exist
elapsed time (seconds): 0.048
result: Passed. Compilation successful

#section:main
----------messages:(3/111)----------
command: main Truncate
reason: User specified action: run main/othervm Truncate 
elapsed time (seconds): 0.104
----------System.out:(0/0)----------
----------System.err:(7/469)----------
java.lang.InternalError: a fault occurred in a recent unsafe memory access operation in compiled Java code
	at java.nio.MappedByteBuffer.load(MappedByteBuffer.java:175)
	at Truncate$2.call(Truncate.java:70)
	at Truncate$2.call(Truncate.java:68)
	at Truncate$3.run(Truncate.java:85)
	at java.lang.Thread.run(Thread.java:722)
STATUS:Failed.`main' threw exception: java.lang.InternalError: a fault occurred in a recent unsafe memory access operation in compiled Java code
result: Failed. Execution failed: `main' threw exception: java.lang.InternalError: a fault occurred in a recent unsafe memory access operation in compiled Java code


test result: Failed. Execution failed: `main' threw exception: java.lang.InternalError: a fault occurred in a recent unsafe memory access operation in compiled Java code

                                    

Comments
EVALUATION

This test doesn't fail when run directly, only in the jtreg. The reason for this is that jtreg runs the test in a thread group that has an uncaught exception handler. As the thread reading frmo the mapped buffer is (correctly) terminating with an exception then it causes jtreg to report the test as failed. We can fix this either by caught the error or by setting an uncaught exception handler.
                                     
2012-05-19



Hardware and Software, Engineered to Work Together