Upgrading JBossWeb causes the JVM to crash due to JBoss Native incompatibility
Environment
- JBoss Enterprise Application Platform (EAP) 5.0 with patch Content from jira.jboss.org is not included.JBPAPP-3434 applied.
Issue
- We put the patch Content from jira.jboss.org is not included.JBPAPP-3434 in production, and JBoss refused to start.
- The JVM crashing with the following error in the fatal error log:
# # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x3d7f8a39, pid=1704, tid=3484 # # JRE version: 6.0_18-b07 # Java VM: Java HotSpot(TM) Server VM (16.0-b13 mixed mode windows-x86 ) # Problematic frame: # C [libapr-1.dll+0x8a39] # # 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 (0x33d70800): JavaThread "main" [_thread_in_native, id=3484, stack(0x34270000,0x342c0000)]
siginfo: ExceptionCode=0xc0000005, reading address 0x00000018
Resolution
There is a temporary workaround until the JBoss EAP 5.0.1 native components are released. Download Content from www.jboss.org is not included.JBoss Native 2.0.9.
- On Windows, remove the existing
JBOSS_HOME/bin/native/bin/libtcnative-1.dll, and replace it withtcnative-1.dllfrom the JBoss Native 2.0.9 archivebin/native/directory. - On Linux, remove the existing
JBOSS_HOME/native/lib/libtcnative-1.so,libtcnative-1.so.0, andlibtcnative-1.so.0.1.16libraries, and replace them withlibtcnative-1.so,libtcnative-so.0, andlibtcnative-1.so.1.20from the JBoss Native 2.0.9 archivebin/native/directory.
Root Cause
AprLifecycleListener.init() calls the native connector JNI code by reflection, passing in the version of the native code that JBossWeb depends on. If the JBossWeb version is lower than the JBossNative version, the JNI code throws an UnsatisfiedLinkError. In this case JBossWeb is expecting Tomcat Native 1.1.17, but the JBoss EAP 5.0.0 native components include Tomcat Native 1.1.16.
Diagnostic Steps
- Add the following logging:
<category name="org.apache.catalina.core"> <priority value="DEBUG" /> </category> - Shows the following error in server.log:
ERROR [org.apache.catalina.core.AprLifecycleListener] (main) An incompatible version 1.1.16 of the Apache Tomcat Native library is installed, while Tomcat requires version 1.1.17
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.