No, removing the atexit does not solve the problem. It still keeps
crashing, although in a different place (PyErr_Restore).
Regards,
Marc
-----Original Message-----
From: David James [mailto:james82@gmail.com]
Sent: Tuesday, October 18, 2005 15:32
To: Marc Haesen
Cc: Max Bowsher; dev@subversion.tigris.org; Daniel L. Rall; David
Anderson
Subject: Re: Crash in python bindings on windows (in apache)
> > > The current python bindings crash in windows when used with
viewcvs in
> > > apache. The crash occurs when the apache server is restarted or
stopped.
> > >
> > > It is the routine svn_swig_py_pool_destroyed that is crashing
because
> > > the function call apr_threadkey_private_get(&val,
_saved_thread_key);
> > > returns NULL as val. This is because the
svn_swig_py_pool_destroyed is
> > > not called from the same thread that created the pool.
> > Why is the cross thread behaviour occurring?
> The reason is that the svn_swig_py_pool_destroyed is called from the
> apr_terminate function call which is called from apache after all the
> other threads are terminated.
>
> If there is a way in apr to call the svn_swig_py_pool_destroyed when
the
> thread that created the pool terminates, the problem is solved to.
Marc, does removing the "atexit(apr_terminate)" function call solve
the problem? In Subversion 1.2, we did not automatically terminate
APR. Maybe we can find a different way to solve this problem, such as
by using the Python atexit module to call our apr_terminate function
while the Python interpreter is still valid?
Cheers,
David
--
David James -- http://www.cs.toronto.edu/~james
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Oct 18 16:11:10 2005