On 8/25/06, Vlad Georgescu <vgeorgescu@gmail.com> wrote:
> Hi Garrett,
>
> Could you test the following patch?
>
> It solves the problem by maintaining a count of how many sasl contexts
> were created, and only calling sasl_done() when all of them are
> destroyed (the count starts from 1, because we also decrement it in
> sasl_done_cb). It seems to work for me (i.e. the test runs
> successfully).
Unfortunately, that's not going to work. The problem isn't that we
call sasl_done(), then later on call sasl_dispose() on some existing
sasl context (well, that's probably A problem, but it's not THE
problem). The problem is that if we do any sasl stuff after sasl_pool
is destroyed then the mutex locking/unlocking that happens in the
subsequent calls to sasl_done() or sasl_dispose() will try to
lock/unlock mutexes allocated in memory that's potentially been reused
because it was allocated out of sasl_pool.
I'm thinking that we may be able to get away with sticking if
(sasl_done) return; in various places, since this will only ever
happen at global shutdown time, at which point we've already assumed
that we're in single threaded mode, so locking isn't needed...
-garrett
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Aug 25 16:54:42 2006