Re: Strange hanging bug in a simple milter - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: Strange hanging bug in a simple milter
Date
Msg-id 20130913194109.GC2706@tamriel.snowman.net
Whole thread Raw
In response to Re: Strange hanging bug in a simple milter  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List pgsql-hackers
* Heikki Linnakangas (hlinnakangas@vmware.com) wrote:
> Actually, I think there's a pre-existing bug there in git master. If
> the SSL_set_app_data or SSL_set_fd call in pqsecure_open_client
> fails for some reason, it will call close_SSL() with conn->ssl
> already set, and the mutex held. close_SSL() will call
> pqsecure_destroy()->destroy_SSL()->destory_ssl_system(), which will
> try to acquire the mutex again.

Yeah, good point, and that one looks like my fault.  Moving it after the
unlock should address that tho, no?  Looking through the other
close_SSL() calls, I don't see any other situations where it might be
called with the lock held.
Thanks,
    Stephen

pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Large shared_buffer stalls WAS: proposal: Set effective_cache_size to greater of .conf value, shared_buffers
Next
From: Merlin Moncure
Date:
Subject: Re: Large shared_buffer stalls WAS: proposal: Set effective_cache_size to greater of .conf value, shared_buffers