Hi Everyone, I can reproduce the crash below with the latest class library and I can also see the cause of it.
What happens is that the harmony launcher has been changed to close the jvm library after it is done (by calling hysl_close_shared_library (handle)). This causes our harmonyvm.dll to be unloaded along with all of it's static data. The problem is that we used some static strings in calls to hythread_global(), but when harmonyvm is unloaded, these strings go away as well. A couple of solutions: 1) Don't unload the library. It will go away when the process ends anyway. 2) We could allocate the strings on the heap instead of using static memory. 3) Provide a way to remove a hythread_global during shutdown. If you want a fast workaround, use 1) and just patch classlib\trunk\modules\luni\src\main\native\launcher\shared\main.c so it doesn't call hysl_close_shared_library. Regards, /Staffan Larsen JRockit Chief Architect On 1/30/07, Alexei Zakharov <[EMAIL PROTECTED]> wrote:
I've got the below dump while trying to run HelloWorld on this new combination (jRockitVM + fresh Harmony classlib) combination. It seems there were significant changes in classlib since r487452 this version of jRockit was tested with. --- C:\mydoc\projects\tests>C:\Java\harmony\enhanced\classlib\trunk\deploy\jdk\jre\b in\java RunHello Hello from Hello ===== BEGIN DUMP ============================================================= JRockit dump produced after 0 days, 00:00:10 on Tue Jan 30 15:03:27 2007 Additional information is available in: C:\mydoc\projects\tests\jrockit.4968.dump C:\mydoc\projects\tests\jrockit.4968.mdmp If you see this dump, please open a support case with BEA and supply as much information as you can on your system setup and the program you were running. You can also search for solutions to your problem at http://forums.bea.com in the forum jrockit.developer.interest.general. Error Message: Illegal memory access. [54] Exception Rec: EXCEPTION_ACCESS_VIOLATION (c0000005) at 0x7C342CD0 - memory at 0 x10002130 could not be read. Minidump : Wrote mdmp. Size is 102MB SafeDllMode : -1 Version : BEA JRockit(R) gras-75523-1.5.0-20070122-1634-windows-ia32 GC : System optimized over throughput (initial strategy singleparpar) : Current OC phase is: not running. YC is not running. : mmHeap->data = 0x11600000, mmHeap->top = 0x15600000 : References are 32-bit. CPU : Intel Pentium M model D SSE SSE2 Number CPUs : 1 Tot Phys Mem : 1072611328 (1022 MB) OS version : Microsoft Windows XP version 5.1 Service Pack 2 (Build 2600) (32- bit) Thread System: Windows Threads State : JVM is shutting down Command Line : -Dorg.apache.harmony.boot.class.path -Djava.home=C:\Java\harmony\ enhanced\classlib\trunk\deploy\jdk\jre -Djava.library.path=C:\Java\harmony\enhan ced\classlib\trunk\deploy\jdk\jre\bin\;.;C:\Java\harmony\enhanced\classlib\trunk \deploy\jdk\jre\bin\default;C:\Java\harmony\enhanced\classlib\trunk\deploy\jdk\j re\bin\;C:\MYDOC\bin;c:\mydoc\bin\rar;c:\java\jdk1.5.0\bin;c:\Java\apache-ant-1. 6.5\bin;C:\Program Files\ThinkPad\Utilities;C:\WINDOWS\system32;C:\WINDOWS;C:\IU WORK;C:\WINDOWS\System32\Wbem;C:\WINDOWS\Downloaded Program Files;C:\Program Fil es\PC-Doctor for Windows\;C:\Program Files\Intel\Wireless\Bin\;C:\PROGRA~1\F-Sec ure\ssh;;C:\Program Files\Intel\Wireless\Bin\;C:\Program Files\Intel\Wireless\Bi n\;C:\Program Files\ThinkPad\ConnectUtilities;C:\Program Files\Subversion\bin;C: \Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\ATI Technolog ies\Fire GL 3D Studio Max java.home : C:\Java\harmony\enhanced\classlib\trunk\deploy\jdk\jre j.class.path : c:\Java\junit3.8.1\junit.jar;%CLASSPATH%;. j.lib.path : C:\Java\harmony\enhanced\classlib\trunk\deploy\jdk\jre\bin\;.;C:\ Java\harmony\enhanced\classlib\trunk\deploy\jdk\jre\bin\default;C:\Java\harmony\ enhanced\classlib\trunk\deploy\jdk\jre\bin\;C:\MYDOC\bin;c:\mydoc\bin\rar;c:\jav a\jdk1.5.0\bin;c:\Java\apache-ant-1.6.5\bin;C:\Program Files\ThinkPad\Utilities; C:\WINDOWS\system32;C:\WINDOWS;C:\IUWORK;C:\WINDOWS\System32\Wbem;C:\WINDOWS\Dow nloaded Program Files;C:\Program Files\PC-Doctor for Windows\;C:\Program Files\I ntel\Wireless\Bin\;C:\PROGRA~1\F-Secure\ssh;;C:\Program Files\Intel\Wireless\Bin \;C:\Program Files\Intel\Wireless\Bin\;C:\Program Files\ThinkPad\ConnectUtilitie s;C:\Program Files\Subversion\bin;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\ATI Technologies\Fire GL 3D Studio Max JAVA_HOME : c:\java\jdk1.5.0 _JAVA_OPTIONS: <not set> PATH : C:\Java\harmony\enhanced\classlib\trunk\deploy\jdk\jre\bin\defaul t;C:\Java\harmony\enhanced\classlib\trunk\deploy\jdk\jre\bin\;C:\MYDOC\bin;c:\my doc\bin\rar;c:\java\jdk1.5.0\bin;c:\Java\apache-ant-1.6.5\bin;C:\Program Files\T hinkPad\Utilities;C:\WINDOWS\system32;C:\WINDOWS;C:\IUWORK;C:\WINDOWS\System32\W bem;C:\WINDOWS\Downloaded Program Files;C:\Program Files\PC-Doctor for Windows\; C:\Program Files\Intel\Wireless\Bin\;C:\PROGRA~1\F-Secure\ssh;;C:\Program Files\ Intel\Wireless\Bin\;C:\Program Files\Intel\Wireless\Bin\;C:\Program Files\ThinkP ad\ConnectUtilities;C:\Program Files\Subversion\bin;C:\Program Files\ATI Technol ogies\ATI Control Panel;C:\Program Files\ATI Technologies\Fire GL 3D Studio Max C Heap : Good; no memory allocations have failed StackOverFlow: 0 StackOverFlowErrors have occured OutOfMemory : 0 OutOfMemoryErrors have occured Registers (from ThreadContext: 0x0013F054 / OS context: 0x0013F88C): eax = 11112bec ecx = 11112bec edx = 10002130 ebx = 7ffde000 esp = 0013fb58 ebp = 0013fb6c esi = 00000000 edi = 00000000 es = 00000023 cs = 0000001b ss = 00000023 ds = 00000023 fs = 0000003b gs = 00000000 eip = 7c342cd0 eflags = 00010246 Stack: (* marks the word pointed to by the stack pointer) 0013fb58: 11502a79* 10002130 11112bec 0003629c 11508040 0013fb7c 0013fb70: 111070ce 11112bec 0013fbc0 0013fb88 11104ea0 0013fbc0 0013fb88: 0013ff60 00401111 0013fbc0 001a0018 00000002 00037280 0013fba0: 00032f50 0013fbc0 00000004 00000000 0000000f 00000000 Code: (* marks the word pointed to by the instruction pointer) 7c342ca0: 5e08458b 8ac3c95f 47880346 02468a03 8a024788 47880146 7c342cb8: 08458b01 c3c95f5e 0424548b 08244c8b 0003c2f7 3b750000 7c342cd0: 013a028b* c00a2d75 613a2674 0a247501 c11d74e4 413a10e8 7c342ce8: 0a187502 3a1174c0 0f750361 8304c183 e40a04c2 ff8bd275 Loaded modules: (* denotes the module causing the exception) 00400000-0040dfff C:\Java\harmony\enhanced\classlib\trunk\deploy\jdk\jre\bin\ja va.exe 7c900000-7c9affff C:\WINDOWS\system32\ntdll.dll 7c800000-7c8f4fff C:\WINDOWS\system32\kernel32.dll 11100000-1111bfff C:\Java\harmony\enhanced\classlib\trunk\deploy\jdk\jre\bin\HY PRT.dll 11500000-1150afff C:\Java\harmony\enhanced\classlib\trunk\deploy\jdk\jre\bin\HY THR.dll 7c340000-7c395fff *C:\Java\harmony\enhanced\classlib\trunk\deploy\jdk\jre\bin\MS VCR71.dll 71ab0000-71ac6fff C:\WINDOWS\system32\WS2_32.dll 77c10000-77c67fff C:\WINDOWS\system32\msvcrt.dll 71aa0000-71aa7fff C:\WINDOWS\system32\WS2HELP.dll 77dd0000-77e6afff C:\WINDOWS\system32\ADVAPI32.dll 77e70000-77f00fff C:\WINDOWS\system32\RPCRT4.dll 00410000-00688fff C:\Java\harmony\enhanced\classlib\trunk\deploy\jdk\jre\bin\de fault\jvm.dll 76b40000-76b6cfff C:\WINDOWS\system32\WINMM.dll 77d40000-77dcffff C:\WINDOWS\system32\USER32.dll 77f10000-77f56fff C:\WINDOWS\system32\GDI32.dll 76390000-763acfff C:\WINDOWS\system32\IMM32.DLL 629c0000-629c8fff C:\WINDOWS\system32\LPK.DLL 74d90000-74dfafff C:\WINDOWS\system32\USP10.dll 77fe0000-77ff0fff C:\WINDOWS\system32\Secur32.dll 003a0000-003c0fff C:\WINDOWS\system32\NTMARTA.DLL 003d0000-003fbfff C:\WINDOWS\system32\WLDAP32.dll 00bf0000-00d2cfff C:\WINDOWS\system32\ole32.dll 71bf0000-71c02fff C:\WINDOWS\system32\SAMLIB.dll 00d40000-00d46fff C:\Java\harmony\enhanced\classlib\trunk\deploy\jdk\jre\bin\de fault\vmi.dll 00d50000-00d78fff C:\Java\harmony\enhanced\classlib\trunk\deploy\jdk\jre\bin\hy luni.dll 71a50000-71a8efff C:\WINDOWS\system32\MSWSOCK.dll 00e80000-00e88fff C:\Java\harmony\enhanced\classlib\trunk\deploy\jdk\jre\bin\de fault\hynatives.dll 00e90000-00e95fff C:\Java\harmony\enhanced\classlib\trunk\deploy\jdk\jre\bin\hy sig.dll 00ea0000-00eb7fff C:\Java\harmony\enhanced\classlib\trunk\deploy\jdk\jre\bin\hy zlib.dll 00ec0000-00ec5fff C:\Java\harmony\enhanced\classlib\trunk\deploy\jdk\jre\bin\hy text.dll 4a800000-4a8c7fff C:\Java\harmony\enhanced\classlib\trunk\deploy\jdk\jre\bin\ic uuc34.dll 4ad00000-4b56ffff C:\Java\harmony\enhanced\classlib\trunk\deploy\jdk\jre\bin\ic udt34.dll 00ed0000-00ed5fff C:\Java\harmony\enhanced\classlib\trunk\deploy\jdk\jre\bin\hy nio.dll 00ee0000-00eeefff C:\Java\harmony\enhanced\classlib\trunk\deploy\jdk\jre\bin\hy archive.dll 00ef0000-00f06fff C:\Java\harmony\enhanced\classlib\trunk\deploy\jdk\jre\bin\IC UInterface34.dll 4a900000-4a9a9fff C:\Java\harmony\enhanced\classlib\trunk\deploy\jdk\jre\bin\ic uin34.dll 662b0000-66307fff C:\WINDOWS\system32\hnetcfg.dll 71a90000-71a97fff C:\WINDOWS\System32\wshtcpip.dll 01690000-01697fff C:\WINDOWS\System32\winrnr.dll 016a0000-016c6fff C:\WINDOWS\system32\DNSAPI.dll 016d0000-016e0fff C:\Program Files\Neoteris\Secure Application Manager\samnsp.d ll 01710000-01715fff C:\WINDOWS\system32\rasadhlp.dll 03000000-03112fff C:\Java\harmony\enhanced\classlib\trunk\deploy\jdk\jre\bin\de fault\dbghelp.dll 76bf0000-76bfafff C:\WINDOWS\system32\psapi.dll "Thread-11" id=11 idx=0x4 tid=5680 lastJavaFrame=0xFFFFFFFC Stack 0: start=0x00040000, end=0x00140000, guards=0x00043000 (ok), forbidden=0x0 0041000 Thread Stack Trace: at strcmp+16(strcmp.asm:77+0)@0x7C342CD0 at hythread_global+57(hythread.c:2012+16)@0x11502A79 at hysig_shutdown+14(hysignal.c:255+10)@0x111070CE at hyport_shutdown_library+16(hyport.c:76+13)@0x11104EA0 at main+257(cmain.c:118+13)@0x00401111 at mainCRTStartup+323(crtexe.c:398+14)@0x00404499 at RegisterWaitForInputIdle+73()@0x7C816FD7 -- Java stack -- Additional information is available in: C:\mydoc\projects\tests\jrockit.4968.dump C:\mydoc\projects\tests\jrockit.4968.mdmp If you see this dump, please open a support case with BEA and supply as much information as you can on your system setup and the program you were running. You can also search for solutions to your problem at http://forums.bea.com in the forum jrockit.developer.interest.general. ===== END DUMP =============================================================== ---
