David James wrote:
> On 10/4/05, Max Bowsher <maxb@ukf.net> wrote:
>> David James wrote:
>>>
>>> import _wc
>>>
>>> Oops! We imported _wc before importing _core. I'm not sure why
>>> importing _wc before _core leads to crashes on my machine now -- it
>>> used to work fine.
>>
>> Could you try using gdb to figure out where it crashes?
>>
>> It does not crash for me, nor would I expect it to, as no use of APR is
>> made in the _wc initialization function.
>>
>> In an "import svn.wc" situation, APR will be initialized when the "import
>> core" statement in libsvn.wc executes, which follows immediately (except
>> for some pure python swig internal definitions) after the "import _wc".
> I've figured out the problem: If we're using a threaded APR, and we
> import libsvn._wc before importing libsvn._core, the
> svn_swig_release_py_lock function will run before libsvn._core has had
> a chance to initialize APR.
I was do not have a threaded APR on my primary machine, so I've now compiled
Subversion on a Linux system which does have threaded APR:
Results:
>>> import svn.wc
Initializing libsvn._wc
Initializing libsvn._core
Initializing libsvn_swig_py threadkey
>>> # no crash
(messages produced by some strategically placed fprintf(stderr, ...) in the
C code)
[Tests done with r16474]
Thanks for reverting the earlier workaround.
Hope you have luck trying to trace the cause of the crash, because it looks
like a threaded APR is not the cause.
Max.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Oct 5 05:23:55 2005