Subject: Re: sun jdk 1.5 appletviewer deadlocks or crashes on 2.0 MP - am I crazy?
To: None <tech-kern@NetBSD.org>
From: J Chapman Flack <flack@cs.purdue.edu>
List: tech-kern
Date: 02/27/2005 12:16:46
Ok, the dodgy MP ProLiant has been replaced with an identical but working
one, and I completely deinstalled mozilla-bin, sun-jdk15, sun-jre15,
and suse_* (7.3), and reinstalled starting with the suse91 libraries
as Thomas Bieg and Matthew Mondor suggested.  Still the same behavior, so
that would seem to rule out both broken hardware and suse7.3 as the culprits.

To replicate: (on ProLiant 800 with two PIII/600s, NetBSD 2.0)

  cd /usr/pkgsrc/emulators/suse91_x11     &&  make bin-install
  cd /usr/pkgsrc/emulators/suse91_compat  &&  make bin-install
  cd /usr/pkgsrc/lang/sun-jre15  &&  make bin-install
  cd /usr/pkgsrc/lang/sun-jdk15  &&  make bin-install

  sun15-appletviewer /usr/pkg/java/sun-1.5/demo/applets/Animator/example1.html

  Observe varying misbehavior including hangs (blocked or spinning),
  jvm panic report, or occasional ( < 20% ) good runs.

  Rerun after booting with only one processor enabled, observe flawless
  operation.

Should I PR this, or is there still something simple I might be missing?

One interesting thing: when hotspot actually reports a panic (which only
happens sometimes), the "SYSTEM" part of the report includes this line:

  CPU:total 1 family 6, cmov, cx8, fxsr, mmx, sse

I haven't seen the hotspot internals to know just what this line is
intended to mean, but does it seem that hotspot thinks it's running on
a uniprocessor?  that could be a problem ... I wonder if there's a suse or
emulator call it's using to get that information, and it's getting the
wrong story?

-Chap

= = = = = = =  A  SAMPLE  HOTSPOT  REPORT  = = = = = = =

#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  Internal Error (4F424A4543542D4F4E49544F523F4C494E55580E4350500155), pid=799, tid=147478
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0-b64 mixed mode, sharing)

---------------  T H R E A D  ---------------

Current thread (0x08171c10):  JavaThread "AWT-XAWT" daemon [_thread_blocked, id=947]

Stack: [0xbcb80000,0xbcc00000),  sp=0xbcbff084,  free space=508k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x2dcf73]
V  [libjvm.so+0x119d6c]
V  [libjvm.so+0x24c67e]
V  [libjvm.so+0x24c7f6]
V  [libjvm.so+0x24cbad]
V  [libjvm.so+0x294c1b]
V  [libjvm.so+0x18843c]
C  [libmawt.so+0xfe37]  mul8table+0xfe37
C  [libmawt.so+0xfcc7]  mul8table+0xfcc7
C  [libmawt.so+0xfd8d]  Java_sun_awt_X11_XToolkit_waitForEvents+0x31
j  sun.awt.X11.XToolkit.waitForEvents()V+0
j  sun.awt.X11.XToolkit.run(Z)V+64
j  sun.awt.X11.XToolkit.run()V+5
j  java.lang.Thread.run()V+11
v  ~StubRoutines::call_stub
V  [libjvm.so+0x1688ec]
V  [libjvm.so+0x257378]
V  [libjvm.so+0x168145]
V  [libjvm.so+0x1681de]
V  [libjvm.so+0x1d5495]
V  [libjvm.so+0x2b030d]
V  [libjvm.so+0x257e88]
C  [libpthread.so.0+0x6201]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  sun.awt.X11.XToolkit.waitForEvents()V+0
j  sun.awt.X11.XToolkit.run(Z)V+64
j  sun.awt.X11.XToolkit.run()V+5
j  java.lang.Thread.run()V+11
v  ~StubRoutines::call_stub

---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
  0x083ac5a8 JavaThread "AWT-EventQueue-1" [_thread_blocked, id=226]
  0x083b9370 JavaThread "TimerQueue" daemon [_thread_blocked, id=227]
  0x0805e810 JavaThread "DestroyJavaVM" [_thread_blocked, id=799]
  0x0839f080 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=229]
  0x4c702688 JavaThread "AWT-Shutdown" [_thread_blocked, id=232]
  0x4c700550 JavaThread "thread applet-net.anastigmatix.fretfocus.FF" [_thread_blocked, id=233]
=>0x08171c10 JavaThread "AWT-XAWT" daemon [_thread_blocked, id=947]
  0x081647a8 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=949]
  0x080a4fd8 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=953]
  0x080a3ab8 JavaThread "CompilerThread0" daemon [_thread_blocked, id=922]
  0x080a2c38 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=228]
  0x0809e908 JavaThread "Finalizer" daemon [_thread_blocked, id=231]
  0x0809dc10 JavaThread "Reference Handler" daemon [_thread_blocked, id=1079]

Other Threads:
  0x080991c0 VMThread [id=1012]
  0x080a6470 WatcherThread [id=920]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
 def new generation   total 576K, used 121K [0x6bf50000, 0x6bff0000, 0x6c430000)
  eden space 512K,  22% used [0x6bf50000, 0x6bf6d0f8, 0x6bfd0000)
  from space 64K,   8% used [0x6bfe0000, 0x6bfe1580, 0x6bff0000)
  to   space 64K,   0% used [0x6bfd0000, 0x6bfd0000, 0x6bfe0000)
 tenured generation   total 1408K, used 1213K [0x6c430000, 0x6c590000, 0x6ff50000)
   the space 1408K,  86% used [0x6c430000, 0x6c55f750, 0x6c55f800, 0x6c590000)
 compacting perm gen  total 8192K, used 1355K [0x6ff50000, 0x70750000, 0x73f50000)
   the space 8192K,  16% used [0x6ff50000, 0x700a2ec0, 0x700a3000, 0x70750000)
    ro space 8192K,  64% used [0x73f50000, 0x74475e00, 0x74475e00, 0x74750000)
    rw space 12288K,  47% used [0x74750000, 0x74cfda98, 0x74cfdc00, 0x75350000)

Dynamic libraries:

VM Arguments:
jvm_args: -Dapplication.home=/usr/pkg/java/sun-1.5
java_command: sun.applet.Main sim0.html

Environment Variables:
JAVA_HOME=/usr/pkg/java/sun-1.5
PATH=/usr/pkg/java/sun-1.5/bin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/pkg/sbin:/usr/pkg/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin
LD_LIBRARY_PATH=/usr/pkg/java/sun-1.5/lib/i386/client:/usr/pkg/java/sun-1.5/lib/i386:/usr/pkg/java/sun-1.5/../lib/i386
SHELL=/bin/ksh
DISPLAY=:0.0


---------------  S Y S T E M  ---------------

OS:SuSE Linux 9.1 (i586)
VERSION = 9.1

uname:Linux 2.4.18 #0 Wed Feb 20 20:00:02 CET 2002 i386
libc:glibc 2.3.3 linuxthreads-0.10 (floating stack)
rlimit: STACK 2044k, CORE infinity, NPROC 160, NOFILE 1772, AS 1k
load average:73154671350111493470403396648718739434402923501058020107454036217623343888025149720876143656533616282872585783733731567063444896083455496299408917162611483218752228194532594231881294549319425129653547734914641558510805975040.00 0.00 106577407679155848876130304.00

CPU:total 1 family 6, cmov, cx8, fxsr, mmx, sse

Memory: 4k page, physical 523884k(395692k free), swap 1048572k(1048572k free)

vm_info: Java HotSpot(TM) Client VM (1.5.0-b64) for linux-x86, built on Sep 15 2004 03:56:41 by java_re with gcc 3.2.1-7a (J2SE release)

= = = = = = = =  NetBSD  DMESG  EXCERPTS  = = = = = = = =

NetBSD 2.0 (lundestad) #6: Sat Feb 19 00:13:15 UTC 2005
	chap@lundestad.anastigmatix.net:/usr/src/sys/arch/i386/compile/lundestad
total memory = 511 MB
avail memory = 496 MB
BIOS32 rev. 0 found at 0xf0000
mainbus0 (root)
mainbus0: Intel MP Specification (Version 1.4) (COMPAQ   PROLIANT    )
cpu0 at mainbus0: apid 1 (boot processor)
cpu0: Intel Pentium III (686-class), 598.21 MHz, id 0x673
cpu0: features 383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu0: features 383fbff<PGE,MCA,CMOV,PAT,PSE36,MMX>
cpu0: features 383fbff<FXSR,SSE>
cpu0: I-cache 16 KB 32B/line 4-way, D-cache 16 KB 32B/line 4-way
cpu0: L2 cache 512 KB 32B/line 4-way
cpu0: ITLB 32 4 KB entries 4-way, 2 4 MB entries fully associative
cpu0: DTLB 64 4 KB entries 4-way, 8 4 MB entries 4-way
cpu0: calibrating local timer
cpu0: apic clock running at 99 MHz
cpu0: 32 page colors
cpu1 at mainbus0: apid 0 (application processor)
cpu1: starting
cpu1: Intel Pentium III (686-class), 598.18 MHz, id 0x673
cpu1: features 383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu1: features 383fbff<PGE,MCA,CMOV,PAT,PSE36,MMX>
cpu1: features 383fbff<FXSR,SSE>
cpu1: I-cache 16 KB 32B/line 4-way, D-cache 16 KB 32B/line 4-way
cpu1: L2 cache 512 KB 32B/line 4-way
cpu1: ITLB 32 4 KB entries 4-way, 2 4 MB entries fully associative
cpu1: DTLB 64 4 KB entries 4-way, 8 4 MB entries 4-way
mpbios: bus 0 is type PCI   
mpbios: bus 1 is type PCI   
mpbios: bus 9 is type ISA   
ioapic0 at mainbus0 apid 8 (I/O APIC)
ioapic0: pa 0xfec00000, version 11, 35 pins
ioapic0: misconfigured as apic 0
ioapic0: remapped to apic 8
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0
pchb0: Intel 82443BX Host Bridge/Controller (AGP disabled) (rev. 0x03)
pchb0: fixing Idle/Pipeline DRAM Leadoff Timing
...
ppb0 at pci0 dev 10 function 0: Digital Equipment DECchip 21152 PCI-PCI Bridge (rev. 0x03)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled, rd/line, wr/inv ok
...
pcib0 at pci0 dev 20 function 0
pcib0: Intel 82371AB PCI-to-ISA Bridge (PIIX4) (rev. 0x02)
...
ioapic0: enabling
...
boot device: ld0
root on ld0a dumps on ld0b
cpu1: CPU 0 running