On 2013-09-13 13:15:34 -0400, Stephen Frost wrote: > Andres, > > On Friday, September 13, 2013, Andres Freund wrote: > > > > It'd be interesting to replace the origin callbacks with one immediately > > doing an abort() or similar to see whether they maybe are called after > > they shouldn't be and from where. > > > > Good thought. Got sucked into a meeting but once I'm out I'll try having > the lock/unlock routines abort if they're called while ssl_open_connections > is zero, which should not be happening, but seems like it is.
Hm. close_SSL() first does pqsecure_destroy() which will unset the callbacks, and the count and then goes on to do X509_free() and ENGINE_finish(), ENGINE_free() if either is used. It's not implausible that one of those actually needs locking. I doubt engines play a role here, but, without having looked at the testcase, X509_free() might be a possibility. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers