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 20130913193608.GB2706@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:
> Umm, with that patch, pqsecure_destroy() is never called. The "if
> (conn->ssl)" test that's now at the end of the close_SSL function is
> never true, because conn->ssl is set to NULL earlier.

Yeah, got ahead of myself, as Andres pointed out.

> I'm afraid the "move_locks.diff" patch you posted earlier is also
> broken; close_SSL() is called in error scenarios from
> pqsecure_open_client(), while already holding the mutex. So it will
> deadlock with itself if the connection cannot be established.

Sorry, I was really just tossing it up to see if it really did avoid
this particular deadlock.  I'm running some tests now with the
attached to see if I can get it to deadlock now.

    Thanks,

        Stephen

Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: dynamic shared memory
Next
From: Josh Berkus
Date:
Subject: Re: Large shared_buffer stalls WAS: proposal: Set effective_cache_size to greater of .conf value, shared_buffers