JDK-6403625 : crash in compiled code when using profiler agent
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 5.0u11,5.0u14,5.0u15,6
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS:
    generic,linux_redhat_8.0,solaris,solaris_9 generic,linux_redhat_8.0,solaris,solaris_9
  • CPU: generic,x86,sparc
  • Submitted: 2006-03-24
  • Updated: 2018-02-23
  • Resolved: 2006-07-11
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 JDK 6
5.0u16-revFixed 5.0u17Fixed 6 b91Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Description
One of the profiler vendors is seeing a crash in compiled code with the Server VM at a customer site. The crash does not happen with the Client VM. Excluding the offending method from compilation with the Server VM eliminates the crash.

The profiler is using BCI but issue duplicates with -Xverify:all. The issue duplicated with the fastdebug build of mustang b76 as an access violation reading 0xbaadbad2.

In the comments section of this bug is a link to a zip file with further logs obtained from -XX:+LogCompilation -XX:+PrintOptoAssembly. The zip file also contains a crash dump obtained by -XX:OnError"userdump %p".


# An unexpected error has been detected by Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0109ad22, pid=872, tid=3888
#
# Java VM: Java HotSpot(TM) Server VM (1.6.0-beta2-fastdebug-b76-debug mixed mode)
# Problematic frame:
# J  com.swapcom.framework.library.device.devicemgr.base.DeviceMgrImpl.synchronizeWithHM(Z)Z
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

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

Current thread (0x04bd8400):  JavaThread "SCCServletInit" [_thread_in_Java, id=3888]

siginfo: ExceptionCode=0xc0000005, reading address 0xbaadbad2

Registers:
EAX=0x00000001, EBX=0x2001f460, ECX=0x10360420, EDX=0xcab20000
ESP=0x0592f730, EBP=0x00000001, ESI=0xbaadbabe, EDI=0x95d65c5c
EIP=0x0109ad22, EFLAGS=0x00010202

Top of Stack: (sp=0x0592f730)
0x0592f730:   06a49f48 7c37a2a8 ffffffff 7c3416b8
0x0592f740:   7c3416db 000000a8 7c3416f8 12210830
0x0592f750:   00000000 12fb2000 10360420 100cf818
0x0592f760:   12fb2018 12fb2040 13916350 13916378
0x0592f770:   13916398 139163c0 100d39d8 00000000
0x0592f780:   0592f7ac 00000001 00000000 0846be14
0x0592f790:   100f3398 00000202 7fb69723 95d65c5c
0x0592f7a0:   06a49f48 04bd8400 00cf2056 0592f7ac 

Instructions: (pc=0x0109ad22)
0x0109ad12:   00 8b 4c 24 28 85 c9 0f 84 6d 1a 00 00 8b 71 04
0x0109ad22:   8b 5e 14 81 fb a8 d5 bd 20 74 2b 81 fe a8 d5 bd 


Stack: [0x058e0000,0x05930000),  sp=0x0592f730,  free space=317k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
J  com.swapcom.framework.library.device.devicemgr.base.DeviceMgrImpl.synchronizeWithHM(Z)Z

[error occurred during error reporting, step 120, id 0xe0000000]


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

Java Threads: ( => current thread )
  0x055f6400 JavaThread "spfTaskScheduler-delivery-worker" [_thread_blocked, id=2036]
  0x05ca9800 JavaThread "spfTaskScheduler-statengine" [_thread_blocked, id=3564]
  0x05abe400 JavaThread "spfTaskScheduler-dmc" [_thread_blocked, id=2884]
  0x05ac4800 JavaThread "spfTaskScheduler-delivery" [_thread_blocked, id=3780]
  0x0551ac00 JavaThread "spfTaskScheduler-content" [_thread_blocked, id=3816]
  0x06a79400 JavaThread "spfTaskScheduler-accountfo" [_thread_blocked, id=3548]
  0x05594400 JavaThread "spfAsyncEventHandler-DMC_XFO" [_thread_blocked, id=3652]
  0x057b0400 JavaThread "spfTaskScheduler-history" [_thread_blocked, id=3404]
  0x05327000 JavaThread "KeepAlive_OMA_DM" [_thread_blocked, id=2388]
  0x05230000 JavaThread "tcpConnection-8080-0" daemon [_thread_blocked, id=1484]
  0x05217800 JavaThread "tcp-accept-8080" daemon [_thread_blocked, id=3808]
  0x05225c00 JavaThread "tcp-accept-8080" daemon [_thread_in_native, id=2440]
  0x05205400 JavaThread "resin-cron" daemon [_thread_blocked, id=3920]
=>0x04bd8400 JavaThread "SCCServletInit" [_thread_in_Java, id=3888]
  0x042f1000 JavaThread "resin-alarm" daemon [_thread_blocked, id=820]
  0x0417f400 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3428]
  0x04165c00 JavaThread "CompilerThread1" daemon [_thread_blocked, id=2500]
  0x04178400 JavaThread "CompilerThread0" daemon [_thread_blocked, id=3044]
  0x0418d800 JavaThread "YJPAgent-CPUSampler" daemon [_thread_blocked, id=2392]
  0x04193400 JavaThread "YJPAgent-RequestListener" daemon [_thread_in_native, id=3448]
  0x04190400 JavaThread "YJPAgent-Telemetry" daemon [_thread_blocked, id=2848]
  0x0413a000 JavaThread "Attach Listener" daemon [_thread_blocked, id=2288]
  0x04150400 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=3948]
  0x0411f800 JavaThread "Finalizer" daemon [_thread_blocked, id=3576]
  0x00c2fc00 JavaThread "Reference Handler" daemon [_thread_blocked, id=3124]
  0x0029a400 JavaThread "main" [_thread_blocked, id=1744]

Other Threads:
  0x00c32400 VMThread [id=2564]
  0x04181000 WatcherThread [id=2136]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
 def new generation   total 5312K, used 1224K [0x10010000, 0x105d0000, 0x11c80000)
  eden space 4736K,  20% used [0x10010000, 0x100fda00, 0x104b0000)
  from space 576K,  47% used [0x104b0000, 0x104f4978, 0x10540000)
  to   space 576K,   0% used [0x10540000, 0x10540000, 0x105d0000)
 tenured generation   total 46300K, used 29995K [0x11c80000, 0x149b7000, 0x20010000)
   the space 46300K,  64% used [0x11c80000, 0x139cafb0, 0x139cb000, 0x149b7000)
 compacting perm gen  total 27136K, used 26963K [0x20010000, 0x21a90000, 0x24010000)
   the space 27136K,  99% used [0x20010000, 0x21a64e10, 0x21a65000, 0x21a90000)
No shared spaces configured.

Dynamic libraries:
0x00400000 - 0x00429000 	D:\java\jdk-1.6.0-fastdebug\bin\java.exe
0x7c910000 - 0x7c9c7000 	C:\WINDOWS\system32\ntdll.dll
0x7c800000 - 0x7c904000 	C:\WINDOWS\system32\kernel32.dll
0x77da0000 - 0x77e4c000 	C:\WINDOWS\system32\ADVAPI32.dll
0x77e50000 - 0x77ee1000 	C:\WINDOWS\system32\RPCRT4.dll
0x7c340000 - 0x7c396000 	D:\java\jdk-1.6.0-fastdebug\jre\bin\msvcr71.dll
0x08000000 - 0x085b0000 	D:\java\jdk-1.6.0-fastdebug\jre\bin\server\jvm.dll
0x77d10000 - 0x77da0000 	C:\WINDOWS\system32\USER32.dll
0x77ef0000 - 0x77f37000 	C:\WINDOWS\system32\GDI32.dll
0x76ae0000 - 0x76b0f000 	C:\WINDOWS\system32\WINMM.dll
0x10000000 - 0x1000b000 	D:\java\jdk-1.6.0-fastdebug\jre\bin\hpi.dll
0x76ba0000 - 0x76bab000 	C:\WINDOWS\system32\PSAPI.DLL
0x00910000 - 0x009a6000 	D:\programs\yjp-6.0-eap-build906\bin\win32\yjpagent.dll
0x719f0000 - 0x71a07000 	C:\WINDOWS\system32\WS2_32.dll
0x77be0000 - 0x77c38000 	C:\WINDOWS\system32\msvcrt.dll
0x719e0000 - 0x719e8000 	C:\WINDOWS\system32\WS2HELP.dll
0x00c80000 - 0x00c90000 	D:\java\jdk-1.6.0-fastdebug\jre\bin\verify.dll
0x00c90000 - 0x00cb5000 	D:\java\jdk-1.6.0-fastdebug\jre\bin\java.dll
0x00cc0000 - 0x00cd7000 	D:\java\jdk-1.6.0-fastdebug\jre\bin\zip.dll
0x044b0000 - 0x044cc000 	D:\java\jdk-1.6.0-fastdebug\jre\bin\net.dll
0x71990000 - 0x719d0000 	C:\WINDOWS\system32\mswsock.dll
0x62e40000 - 0x62e99000 	C:\WINDOWS\system32\hnetcfg.dll
0x719d0000 - 0x719d8000 	C:\WINDOWS\System32\wshtcpip.dll
0x044d0000 - 0x044d9000 	D:\java\jdk-1.6.0-fastdebug\jre\bin\management.dll
0x76ed0000 - 0x76ef7000 	C:\WINDOWS\system32\DNSAPI.dll
0x76f60000 - 0x76f68000 	C:\WINDOWS\System32\winrnr.dll
0x76f10000 - 0x76f3d000 	C:\WINDOWS\system32\WLDAP32.dll
0x76f70000 - 0x76f76000 	C:\WINDOWS\system32\rasadhlp.dll
0x05a70000 - 0x05a79000 	D:\java\jdk-1.6.0-fastdebug\jre\bin\sunmscapi.dll
0x779e0000 - 0x77a76000 	C:\WINDOWS\system32\CRYPT32.dll
0x77a80000 - 0x77a92000 	C:\WINDOWS\system32\MSASN1.dll

VM Arguments:
jvm_args: -Xmx256m -agentpath:D:/programs/yjp-6.0-eap-build906/bin/win32/yjpagent.dll=port=10000 -Xverify:all -XX:+PrintCompilation -XX:+UnlockDiagnosticVMOptions -XX:+LogCompilation -XX:+PrintOptoAssembly -XX:OnError=D:\programs\userdump-8.0\x86\userdump %p
java_command: com.caucho.server.http.HttpServer -server a -conf D:\swapcom\dmc-2.4.0_rc003\resin\conf\resin.conf
Launcher Type: SUN_STANDARD

Environment Variables:
JAVA_HOME=D:\java\jdk-1.6.0-fastdebug
PATH=E:\programs\oracle9i\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Support Tools\;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;\\zeus\projets\packaging\2.2\bin;Y:\tools;D:\programs\yjp-3.2\bin\win32;\\zeus\kits\arquom-tools\UnxUtils\unzip\usr\local\wbin;D:\java\apache-ant-1.6.5\bin
USERNAME=xfournet
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 15 Model 3 Stepping 4, GenuineIntel



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

OS: Windows XP Build 2600 Service Pack 2

CPU:total 1 family 15, cmov, cx8, fxsr, mmx, sse, sse2

Memory: 4k page, physical 1046512k(89576k free), swap 2523952k(1105864k free)

vm_info: Java HotSpot(TM) Server VM (1.6.0-beta2-fastdebug-b76) for windows-x86, built on Mar 16 2006 01:38:57 by "java_re" with unknown MS VC++:1310

Comments
SUGGESTED FIX PRT webrev: file:///net/prt-archiver/data/archived_workspaces/main/c2_baseline/2006/20060627112656.sgoldman.6403625/workspace/webrevs/webrev-2006.06.27/index.html
20-09-2006

EVALUATION This is caused by a differing opinion of what oops are live between the interpreter and server compiler during an OSR compile. The code server generates is verifying the predicted class for an interpreter local because the compiler thinks it is live. The local is in fact dead and if a gc occurs it is possible for the dead oop to be junk and cause the segv.
14-06-2006