Internal Error Os_windows_x86.cpp
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Run 64-bit JVM from C code up vote 11 down vote favorite 2 I'm launching my Java software using a Windows launcher written in C. It basically loads the jvm.dll and uses it to initialize a JVM without using javaw. Now, I tried to compile it on 64-bit and it loads the correct jvm.dll from the 64-bit Java installation. Now, the Java program gets launched, but crashes with a hs_err_pid-file. It looks like AWT is crashing. # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (os_windows_x86.cpp:149), pid=8812, tid=10816 # guarantee(result == EXCEPTION_CONTINUE_EXECUTION) failed: Unexpected result from topLevelExceptionFilter # # JRE version: 7.0_10-b18 # Java VM: Java HotSpot(TM) 64-Bit Server VM (23.6-b04 mixed mode windows-amd64 compressed oops) # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows # # If you would like to submit a bug report, please visit: # (Blah blah) --------------- T H R E A D --------------- Current thread (0x0000000009b8c800): JavaThread "AWT-Windows" daemon [_thread_in_native, id=10816, stack(0x000000000a3c0000,0x000000000a5c0000)] Stack: [0x000000000a3c0000,0x000000000a5c0000] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j sun.awt.windows.WToolkit.init()Z+0 j sun.awt.windows.WToolkit.run()V+9 j java.lang.Thread.run()V+11 v ~StubRoutines::call_stub --------------- P R O C E S S --------------- Java Threads: ( => current thread ) =>0x0000000009b8c800 JavaThread "AWT-Windows" daemon [_thread_in_native, id=10816, stack(0x000000000a3c0000,0x000000000a5c0000)] 0x0000000009b8b800 JavaThread "AWT-Shutdown" [_thread_blocked, id=8348, stack(0x000000000a1c0000,0x000000000a3c0000)] 0x0000000009b8a800 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=7176, stack(0x0000000009fc0000,0x000000000a1c0000)] 0x0000000007e8b000 JavaThread "Service Thread" daemon [_thread_blocked, id=7228, stack(0x00000000096d0000,0x00000000098d0000)] 0x0000000007e88000 JavaThread "C2 Compiler
[ date ] [ thread ] [ subject ] [ author ] The guarantee failure seems to indicate an exception is occurring when processing something in the codecache, which would seem to be independent of your native code (though of course native code bugs can stomp on anything anywhere). I'd try with -Xint vs -client vs -server to see under what conditions it reproduces. Really all you can do now is submit a formal bug report - though unless you can submit a reproducible test case it will be difficult to make progress (unless someone recognizes this as a know issue). David cowwoc said the following on 06/12/10 10:38: > > David Holmes-9 wrote: >> First I'd suggest enabling http://stackoverflow.com/questions/18728177/run-64-bit-jvm-from-c-code verification to ensure that the bytecode >> generator is generating well-formed bytecode. >> > > Running with -Xcheck:jni and -Xverify:all doesn't find any problems. Please > note that while the crash dump (seen below) shows a Java method at the top > of the stack, it is actually a native method. It is also interesting to note > that when I run under a 32-bit JVM with a 32-bit native library the JVM http://mail.openjdk.java.net/pipermail/hotspot-dev/2010-June/003056.html > crashes with "Runtime Error! Program: [...]java.exe [...] The application > has requested the Runtime to terminate it in an unusual way. Please contact > the application's support team for more information". Maybe the JDK does not > like something about my native library... it's just not clear what that > might be... > > Here is the crash dump under 64-bit: > > # > # A fatal error has been detected by the Java Runtime Environment: > # > # Internal Error (os_windows_x86.cpp:114), pid=5952, tid=5512 > # guarantee(result == EXCEPTION_CONTINUE_EXECUTION) failed: Unexpected > result from topLevelExceptionFilter > # > # JRE version: 7.0-b94 > # Java VM: Java HotSpot(TM) 64-Bit Server VM (19.0-b01 mixed mode > windows-amd64 compressed oops) > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # The crash happened outside the Java Virtual Machine in native code. > # See problematic frame for where to report the bug. > # > > --------------- T H R E A D --------------- > > Current thread (0x00000000003ec000): JavaThread "main" [_thread_in_native, > id=5512, stack(0x0000000002420000,0x0000000002520000)] > > Stack: [0x0000000002420000,0x0000000002520000] > [error occurred during error reporting (printing stack bounds), id > 0xc0000005] > > Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) > j jperipheral.WindowsOS.jaceCreateInstance()J+0 > j jperipheral.WindowsOS.
Speaker BureauLog inRegisterSearchSearchCancelError: You don't have JavaScript enabled. This tool uses JavaScript and much of it will not work correctly without it enabled. Please turn JavaScript back on and reload this page. Please enter a title. You can not post a blank message. https://community.oracle.com/thread/2399518 Please type your message and try again. More discussions in Java Native Interface (JNI) All PlacesJavaJava HotSpot Virtual MachineJava Native Interface (JNI) This discussion is archived 2 Replies Latest reply on Jun 5, 2012 12:37 AM by jschellSomeoneStoleMyAlias JVM crash with 64bit JNI Windows 941452 Jun 4, 2012 12:00 PM Hi, I am trying to create a 64bit version of yaz4j and so far I am internal error unable to get this to work. I have managed to build a dll but any calls to the functions crashes the JVM. I have previously built yaz4j for Windows 32bit/Mac 32bit and 64bit/Linux so just followed the same approach to get this running on Windows 64bit. Currently I am using 64bit gcc v4.5.3 installed via cygwin. All other dependent dlls are 64bit. Reading a few forum internal error os_windows_x86.cpp posts, the suggestion is that this is caused by an exception being thrown in native code and the JVM not knowing what to do with it. The yaz4j code is C so there are no exceptions being thrown. # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (os_windows_x86.cpp:149), pid=5736, tid=9928 # guarantee(result == EXCEPTION_CONTINUE_EXECUTION) failed: Unexpected result from topLevelExceptionFilter # # JRE version: 6.0_32-b05 # Java VM: Java HotSpot(TM) 64-Bit Server VM (20.7-b02 mixed mode windows-amd64 compressed oops) # An error report file with more information is saved as: # C:\Y\2\hs_err_pid5628.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # Looking at the pid file: --------------- T H R E A D --------------- Current thread (0x00000000001db800): JavaThread "main" [_thread_in_native, id=9928, stack(0x0000000002020000,0x0000000002120000)] Stack: [0x0000000002020000,0x0000000002120000] [error occurred during error reporting (printing stack bounds), id 0xe0000000] [error occurred during error reporting (printing native stack), id 0xe0000000] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j org.yaz4j.jni.yaz4jlibJNI.ZOOM_connection_create(J)J+0 j org.yaz4j.jni.yaz4jlib.ZOOM_connection_create(Lorg/yaz4j/jni/SWIGTYPE_p_ZOOM_options_p;)Lorg/yaz4j/jni/SWIGTYPE_p_ZOOM_connection_p;+4 j org.yaz4j.Connection.