List Info

Thread: javahl-1.3.0-related crash




javahl-1.3.0-related crash
user name
2006-02-27 01:22:30
Hi,

I have 
 - subclipse 0.9.37
 - Sun jdk1.5.0_06
 - subversion-javahl-1.3.0-4.2 from Fedora Core rawhide.

I'm appending a crash backtrace. Summary is that javahl
crashes in
native code after JhlClientAdapter.isAvailable() calls new
SVNClient().
I debugged it a bit and it looks like a Subclipse issue,
though it seems
like a lot of people would be seeing this so I might be
missing
something.

I rebuilt the javahl native libs with some
logging/assertions, and I
believe the problem is that the global initialization
function for
javahl has not been called when the SVNClient is constructed
in
isAvailable(). If you look at
org/tigris/subversion/javahl/NativeResources.java in javahl,
when the
native lib is loaded javahl calls SVNClient.initNative().
subclipse
isAvailable() does native lib loading while skipping this
step.

initNative() eventually calls JNIUtil::JNIGlobalInit() in
javahl, which
in turn initializes the thread-local storage with
JNIThreadData::initThreadData(), which calls
apr_threadkey_private_create().

If initNative() is skipped as it is in
JhlClientAdapter.isAvailable(),
then you would expect a crash like this one in
apr_threadkey_private_get() since the thread private stuff
isn't
created.

I won't speculate on the correct fix, but hopefully if my
diagnosis is
right one of you guys can fix it trivially.

Thanks,
Havoc


C  [libapr-1.so.0+0x1f585]  apr_threadkey_private_get+0x15
C  [libsvnjavahl-1.so.0.0.0+0xd718] 
_ZN13JNIThreadData17pushNewThreadDataEv+0x38
C  [libsvnjavahl-1.so.0.0.0+0xdd87] 
_ZN7JNIUtil6setEnvEP7JNIEnv_+0x17
C  [libsvnjavahl-1.so.0.0.0+0xde21] 
_ZN7JNIUtil7JNIInitEP7JNIEnv_+0x51
C  [libsvnjavahl-1.so.0.0.0+0xd243] 
_ZN15JNIStackElementC1EP7JNIEnv_PKcS3_P8_jobject+0x33
C  [libsvnjavahl-1.so.0.0.0+0x2285e] 
Java_org_tigris_subversion_javahl_SVNClient_ctNative+0x5e
j  org.tigris.subversion.javahl.SVNClient.ctNative()J+0
j  org.tigris.subversion.javahl.SVNClient.<init>()V+6
j 
org.tigris.subversion.javahl.SVNClientSynchronized.<init&
gt;()V+9
j 
org.tigris.subversion.svnclientadapter.javahl.JhlClientAdapt
er.isAvailable()Z+560
j 
org.tigris.subversion.svnclientadapter.javahl.JhlClientAdapt
erFactory.setup()V+0
j 
org.tigris.subversion.subclipse.core.SVNClientManager.startu
p(Lorg/eclipse/core/runtime/IProgressMonitor;)V+10
j 
org.tigris.subversion.subclipse.core.SVNProviderPlugin.start
(Lorg/osgi/framework/BundleContext;)V+21j 
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2
.run()Ljava/lang/Object;+56
v  ~StubRoutines::call_stub
V  [libjvm.so+0x174fec]
V  [libjvm.so+0x2821f8]



------------------------------------------------------------
---------
To unsubscribe, e-mail: users-unsubscribesubclipse.tigris.org
For additional commands, e-mail: users-helpsubclipse.tigris.org

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )