JDK-4503974 : JCK1.4, api/java_net/... tests hang in "-Xprof -verbose -verify" mode, linux
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.4.0
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • OS: linux
  • CPU: x86
  • Submitted: 2001-09-18
  • Updated: 2012-10-08
  • Resolved: 2001-09-27
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.
Other Other
1.3.1_09 09Fixed 1.4.0Fixed
Related Reports
Relates :  
Relates :  
Description

Name: iaR10016			Date: 09/18/2001


JDK            : JDK1.4.0-beta-b79
JCK            : JCK1.4-b09
Platform[s]    : RedHat Linux 6.2, RedHat Linux 7.1
                 (The tests pass under Windows OS)
switch/Mode    : -Xprof -verbose -verify -Xfuture
                 (The tests pass with default switches)
JCK test owner : http://javaweb.eng/jck/usr/owners.jto
Failing Test   : api/java_net/DatagramSocket/index.html#Receive
                 api/java_net/DatagramSocket/index.html#connect
                 api/java_net/MulticastSocket/descriptions.html#leaveGroup
                 api/java_net/distributed/index.html#NetDistributed

Four JCK1.4-b09 runtime api/java_net tests hang and fail because of timeout when running
in "-Xprof -verbose -verify" mode.

Probably, this bug is a duplicate of #4461173.

Test source location:
=====================
/net/jdk/export/disk8/local.java/jck1.4/JCK-runtime-14/tests/api/java_net/DatagramSocket/ReceiveTests.java
/net/jdk/export/disk8/local.java/jck1.4/JCK-runtime-14/tests/api/java_net/DatagramSocket/DatagramTestServer.java
/net/jdk/export/disk8/local.java/jck1.4/JCK-runtime-14/tests/api/java_net/DatagramSocket/connectTests.java
/net/jdk/export/disk8/local.java/jck1.4/JCK-runtime-14/tests/api/java_net/DatagramSocket/MyDatagramSocket.java

/net/jdk/export/disk8/local.java/jck1.4/JCK-runtime-14/tests/api/java_net/MulticastSocket/leaveGroupTests.java
/net/jdk/export/disk8/local.java/jck1.4/JCK-runtime-14/tests/api/java_net/MulticastSocket/MulticastTestServer.java
/net/jdk/export/disk8/local.java/jck1.4/JCK-runtime-14/tests/api/java_net/MulticastSocket/TestServerException.java
/net/jdk/export/disk8/local.java/jck1.4/JCK-runtime-14/tests/api/java_net/MulticastSocket/TSInterruptedException.java

/net/jdk/export/disk8/local.java/jck1.4/JCK-runtime-14/tests/api/java_net/distributed/NetDistributedTests.java
/net/jdk/export/disk8/local.java/jck1.4/JCK-runtime-14/tests/api/java_net/distributed/DServer.java

jtr file location:
==================
/net/jtgb4u4c.eng/export/sail15/results/merlin/b79/jck14/linux/redhat6.2_single_kde_client_prof_verbose_verify_linux-12/workDir/api/java_net/DatagramSocket/index_Receive.jtr
/net/jtgb4u4c.eng/export/sail15/results/merlin/b79/jck14/linux/redhat6.2_single_kde_client_prof_verbose_verify_linux-12/workDir/api/java_net/DatagramSocket/index_connect.jtr
/net/jtgb4u4c.eng/export/sail15/results/merlin/b79/jck14/linux/redhat6.2_single_kde_client_prof_verbose_verify_linux-12/workDir/api/java_net/MulticastSocket/descriptions_leaveGroup.jtr
/net/jtgb4u4c.eng/export/sail15/results/merlin/b79/jck14/linux/redhat6.2_single_kde_client_prof_verbose_verify_linux-12/workDir/api/java_net/distributed/index_NetDistributed.jtr

How to reproduce:
====================
Run the following script under RedHat Linux 6.2
(probably, you need to change JCK and JAVA_HOME paths):
--------Script START---------------------
#!/bin/sh
JAVA_HOME=/net/jdk/export/disk8/local.java/jdk1.4/linux-i386
JCK=/net/jdk/export/disk8/local.java/jck1.4/JCK-runtime-14
export CLASSPATH="$JCK/classes:$JCK/javatest.jar"
executeClass="javasoft.sqe.tests.api.java.net.DatagramSocket.ReceiveTests"
$JAVA_HOME/bin/java -Xprof -verbose -verify -Xfuture ${executeClass}
---------Script END----------------------

Test output:
=============
[Opened /.automount/linux-15/root/export/home/java/jdk1.4.0/linux/jre/lib/rt.jar]
[Opened /.automount/linux-15/root/export/home/java/jdk1.4.0/linux/jre/lib/sunrsasign.jar]
[Opened /.automount/linux-15/root/export/home/java/jdk1.4.0/linux/jre/lib/jsse.jar]
[Opened /.automount/linux-15/root/export/home/java/jdk1.4.0/linux/jre/lib/jce.jar]
[Opened /.automount/linux-15/root/export/home/java/jdk1.4.0/linux/jre/lib/charsets.jar]
[Loaded java.lang.Object from /.automount/linux-15/root/export/home/java/jdk1.4.0/linux/jre/lib/rt.jar]
[Loaded java.io.Serializable from /.automount/linux-15/root/export/home/java/jdk1.4.0/linux/jre/lib/rt.jar]
[Loaded java.lang.Comparable from /.automount/linux-15/root/export/home/java/jdk1.4.0/linux/jre/lib/rt.jar]
[Loaded java.lang.CharSequence from /.automount/linux-15/root/export/home/java/jdk1.4.0/linux/jre/lib/rt.jar]
[Loaded java.lang.String from /.automount/linux-15/root/export/home/java/jdk1.4.0/linux/jre/lib/rt.jar]
...
[Loaded sun.reflect.GeneratedConstructorAccessor1]
[Loaded sun.reflect.BootstrapConstructorAccessorImpl from /.automount/linux-15/root/export/home/java/jdk1.4.0/linux/jre/lib/rt.jar]
[Loaded sun.reflect.FieldAccessor from /.automount/linux-15/root/export/home/java/jdk1.4.0/linux/jre/lib/rt.jar]
[Loaded sun.reflect.FieldAccessorImpl from /.automount/linux-15/root/export/home/java/jdk1.4.0/linux/jre/lib/rt.jar]
[Loaded sun.reflect.UnsafeFieldAccessorImpl from /.automount/linux-15/root/export/home/java/jdk1.4.0/linux/jre/lib/rt.jar]
[Loaded sun.misc.Signal$1 from /.automount/linux-15/root/export/home/java/jdk1.4.0/linux/jre/lib/rt.jar]
[Loaded java.util.HashMap$HashIterator from /.automount/linux-15/root/export/home/java/jdk1.4.0/linux/jre/lib/rt.jar]
[Loaded java.util.HashMap$KeyIterator from /.automount/linux-15/root/export/home/java/jdk1.4.0/linux/jre/lib/rt.jar]

Flat profile of 6.01 secs (298 total ticks): main

  Interpreted + native   Method
 91.3%     0  +   272    java.net.PlainDatagramSocketImpl.receive
  0.7%     0  +     2    java.lang.ClassLoader.defineClass0
  0.7%     0  +     2    javasoft.sqe.tests.api.java.net.DatagramSocket.ReceiveTests.DatagramSocket2006
  0.3%     0  +     1    java.util.zip.ZipEntry.initIDs
  0.3%     0  +     1    java.net.PlainDatagramSocketImpl.datagramSocketClose
  0.3%     0  +     1    java.io.UnixFileSystem.getLength
  0.3%     0  +     1    java.io.UnixFileSystem.getBooleanAttributes0
  0.3%     0  +     1    java.lang.ClassLoader$NativeLibrary.load
  0.3%     0  +     1    sun.reflect.ClassDefiner.defineClass
  0.3%     0  +     1    sun.reflect.NativeConstructorAccessorImpl.newInstance
  0.3%     1  +     0    java.lang.StringCoding.decode
  0.3%     0  +     1    java.lang.String.<init>
  0.3%     0  +     1    java.util.jar.JarFile.getManifest
  0.3%     0  +     1    java.lang.String.toLowerCase
  0.3%     0  +     1    java.util.jar.Manifest.read
  0.3%     0  +     1    sun.reflect.MethodAccessorGenerator.generate
 97.0%     1  +   288    Total interpreted

  Thread-local ticks:
  1.3%     4             Class loader
  1.3%     4             Compilation
  0.3%     1             Unknown: no last frame


Global summary of 6.01 seconds:
100.0%   298             Received ticks
  2.3%     7             Compilation
  1.3%     4             Class loader
  0.3%     1             Unknown code
Result is 130

Specific Machine Info:
=====================
Hostname: Linux-12
OS: RedHat Linux 6.2

Hostname: Linux-14
OS: RedHat Linux 7.1

Intel Pentium III 800MHz / 256Mb / HDD 17 Gb SCSI / video Matrox G200 AGP /
CD-ROM drive/ Sound on board VIA686a

======================================================================
###@###.### 2001-09-24
Could reproduce on following machines :
1. bespin.sfbay.sun.com (RH7.1, dual proc, pentium III {Dell Precision 420} 664 MHz, 256 MB RAM) 
2. tralus.sfbay.sun.com (RH6.2, 1 proc, Pentium III {Dell Dimension XPS R700r} 700 MHz, 128 MB RAM)
=======================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.3.1_09 merlin-beta3 FIXED IN: 1.3.1_09 merlin-beta3 INTEGRATED IN: 1.3.1_09 merlin-beta3 VERIFIED IN: merlin-beta3
14-06-2004

EVALUATION Running tests on pea.east linux 6.2 zoot machine works fine. Also test on dogboy.east 7.1 linux machine. Not re-producible. Is this a single CPU issue, dual, or quad, etc.. Please Test on single, dual, quad processor machine PC's. ###@###.### 2001-09-19 I can dup it on my Linux box (single CPU 1G AMD). This hang is caused by a bug in hpi::timeout(). hpi::timeout() on Linux is implemented by poll() system call, and when poll() is interrupted by a signal, hpi::timeout() would restart poll(). However, hpi::timeout() should adjust its timeout value according to elapsed time when restarting poll(). Otherwise, if hpi::timeout() is constantly interrupted and everytime it uses same non-zero value to restart poll(), VM would hang in infinite loop of poll()'s. ###@###.### 2001-09-24 Fixes to correct hpi::timeout() were put back in addition to more general handling of EINTR (see 4178050 and 4425033, which should theoretically be possible on Linux but could not be reproduced). ###@###.### 2001-09-25
25-09-2001