[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Possible Problem with JavaHL in 1.3.0 RC2

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-11-02 21:15:38 CET

Mark Phippard <markp@softlanding.com> writes:

> Philip Martin <philip@codematters.co.uk> wrote on 11/02/2005 02:42:04 PM:
>
>> Do the crashes happen near the start of the operations?
>
> Yes, for certain. Although in the case of checkout, sometimes it seems
> like I receive 1 file successfully. I haven't really looked at the WC too
> closely, but I see a message in my Eclipse console right before it
> crashes.

So it probably is an initialisation problem, rather than memory
corruption.

>> As I pointed out earlier, the on-the-fly static initialisation in
>> JNIUtil::JNIInit() looks dodgy to me. Could you arrange for JNIInit
>> to be called, and for the call to return, by a single thread before
>> any other calls to JNIInit?
>
> In Subclipse we talk to the Java code, so this is all invisible to us. I
> can say that Subclipse constructs the SVNClientSynchronized object
> frequently. It doesn't just construct it one time and then hang on to it
> until you close Eclipse.

JNIInit appears to attempt to do some once-only initialisation (that's
once per application) using static variables but the code looks very
dodgy. I don't do Java at all, and I've barely looked at the javahl
code, but I suspect that if you can arrange for a single thread to
call JNIInit, and allow it to complete, before any other thread gets a
chance to race then the problem might go away. I don't know what that
would involve in Java, perhaps it would be sufficient to construct and
discard a temporary SVNClientSynchronized object. Do it from the
debugger if necessary.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Nov 2 21:16:31 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.