Java VM will crash if JavaHL is used

Bug #67187 reported by Simen Sandberg
4
Affects Status Importance Assigned to Milestone
subversion (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: libsvn-javahl

Create JavaHlTest.java:

import org.tigris.subversion.javahl.*;

public class JavaHlTest {
       public static void main(String[] args) {
         SVNClient client = new SVNClient();
       }
}

Compile with "javac -classpath /usr/share/java/svn-javahl.jar:. JavaHlTest.java"
Run with "java -Djava.library.path=/usr/lib/jni -classpath /usr/share/java/svn-javahl.jar:. JavaHlTest"

It should crash with
$ /usr/lib/jvm/java-gcj/bin/java -Djava.library.path=/usr/lib/jni -classpath /usr/share/java/svn-javahl.jar:. JavaHlTest
Exception in thread "main" java.lang.ExceptionInInitializerError
   at java.lang.Class.initializeClass(libgcj.so.70)
   at JavaHlTest.main(JavaHlTest.java:5)
Caused by: java.lang.NullPointerException
   at org.tigris.subversion.javahl.NativeResources.loadNativeLibrary(NativeResources.java:65)
   at org.tigris.subversion.javahl.SVNClient.<clinit>(SVNClient.java:35)
   at java.lang.Class.initializeClass(libgcj.so.70)
   ...1 more

$ /usr/lib/jvm/java-1.5.0-sun/bin/java -Djava.library.path=/usr/lib/jni -classpath /usr/share/java/svn-javahl.jar:. JavaHlTest
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# SIGSEGV (0xb) at pc=0xb1fe3acb, pid=13324, tid=3084687024
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_08-b03 mixed mode, sharing)
# Problematic frame:
# C [libsvnjavahl-1.so.0.0.0+0xdacb] _ZN7JNIUtil18setExceptionThrownEv+0x2b
#
# An error report file with more information is saved as hs_err_pid13324.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
Aborted (core dumped)

Tags: java
Revision history for this message
Andreas Simon (andreas-w-simon) wrote :

I can confirm this on Edgy with both sun-java5-jdk 1.5.0-08-0ubuntu1 and gcj 4.1.1-14ubuntu7.

The same crash also happens when trying to use the subversion plugin from eclipse and configuring it to use javahl. The plugin only works when not using javahl.

Changed in subversion:
status: Unconfirmed → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.