-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.4.2
-
sparc
-
solaris_8
Name: agR10195 Date: 10/09/2002
Alexey Gibadullin, ###@###.###
The test creates a temporary file, writes 30000 char values and then starts
reading from the file via DataInputStream.readLong() method. When the end of
the file reached, readLong() crashes VM instead of throwing EOFException.
I observed the crash against Mantis-b02 on 32-bit Solsparc in -Xmixed mode
only.
import java.io.*;
public class Test {
final static int LOOP_LENGTH = 30000;
final static String FILENAME = "tmpfile";
public static void main(String args[]) {
File inputFile = new File(FILENAME);
try {
FileOutputStream fos = new FileOutputStream(inputFile);
DataOutputStream dos = new DataOutputStream(
new BufferedOutputStream(fos));
for (int i = 0; i < LOOP_LENGTH; i++)
dos.writeChar('A');
dos.flush();
dos.close();
FileInputStream fis = new FileInputStream(inputFile);
DataInputStream dis = new DataInputStream(new
BufferedInputStream(fis));
for (int i = 0; i < LOOP_LENGTH; i++) {
System.out.print(i + " ");
dis.readLong();
}
} catch (IOException e) {
System.out.println("Exception " + e);
}
}
}
According to the spec DataOutputStream.writeChar('A') writes 2-byte value,
so after the first loop the file "tmpfile" must have size 60000 bytes.
DataInputStream.readLong() reads 8 bytes from the input stream, so it
should read 7500 long values and then throw EOFException. The log shows
that 7500 iterations work fine and then the crash occures:
$ ../jdk1.4.2-b02/solaris-sparc/bin/java -server Test
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
....
7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500
Unexpected Signal : 11 occurred at PC=0xFE196EBC
Function=[Unknown. Nearest: JVM_GetCPClassNameUTF+0xEFF8]
Library=/export/ld55/java/dest/jdk1.4.2-b02/solaris-sparc/jre/lib/sparc/server/l
ibjvm.so
Current Java thread:
at Test.main(Test.java:25)
Dynamic libraries:
0x10000 /export/ld25/java/dest/jdk1.4.2-b02/solaris-sparc/bin/java
0xff350000 /usr/lib/libthread.so.1
0xff390000 /usr/lib/libdl.so.1
0xff200000 /usr/lib/libc.so.1
0xff330000 /usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1
0xfe000000
/export/ld55/java/dest/jdk1.4.2-b02/solaris-sparc/jre/lib/sparc/server/libjvm.so
0xff2d0000 /usr/lib/libCrun.so.1
0xff1d0000 /usr/lib/libsocket.so.1
0xff100000 /usr/lib/libnsl.so.1
0xff0d0000 /usr/lib/libm.so.1
0xff300000 /usr/lib/libw.so.1
0xff0b0000 /usr/lib/libmp.so.2
0xff070000
/export/ld55/java/dest/jdk1.4.2-b02/solaris-sparc/jre/lib/sparc/native_threads/l
ibhpi.so
0xff040000
/export/ld55/java/dest/jdk1.4.2-b02/solaris-sparc/jre/lib/sparc/libverify.so
0xfe7c0000
/export/ld55/java/dest/jdk1.4.2-b02/solaris-sparc/jre/lib/sparc/libjava.so
0xff020000
/export/ld55/java/dest/jdk1.4.2-b02/solaris-sparc/jre/lib/sparc/libzip.so
Local Time = Wed Oct 9 12:37:12 2002
Elapsed Time = 1
#
# HotSpot Virtual Machine Error : 11
# Error ID : 4F530E43505002E2 01
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Java VM: Java HotSpot(TM) Server VM (1.4.2-beta-b02 mixed mode)
#
# An error report file has been saved as hs_err_pid12226.log.
# Please refer to the file for further information.
#
Abort
======================================================================
Name: agR10195 Date: 11/11/2002
Alexey Gibadullin, ###@###.###
This bug affects the new
nsk/regression/b4707800
test that has appeared in 17th release of testbase_nsk.
======================================================================
- duplicates
-
JDK-4793028 SPARC: deoptimization of method loses pending exception.
- Closed
- relates to
-
JDK-4707800 crash when using volatile field and when SQE runs CompileTheWorld admswt10.jar
- Closed
-
JDK-6492085 jvm crash with InterpreterRuntime::exception_handler_for_exception
- Closed
-
JDK-4751977 stress tests intermittently crash Hotspot VM in frame.cpp, 844
- Closed