Re: Strange hanging bug in a simple milter
От | Heikki Linnakangas |
---|---|
Тема | Re: Strange hanging bug in a simple milter |
Дата | |
Msg-id | 523366CF.6030801@vmware.com обсуждение исходный текст |
Ответ на | Re: Strange hanging bug in a simple milter (Stephen Frost <sfrost@snowman.net>) |
Ответы |
Re: Strange hanging bug in a simple milter
Re: Strange hanging bug in a simple milter |
Список | pgsql-hackers |
On 13.09.2013 22:03, Stephen Frost wrote: > * Andres Freund (andres@2ndquadrant.com) wrote: >> It seems slightly cleaner to just move the pqsecure_destroy(); to the >> end of that function, based on a boolean. But if you think otherwise, I >> won't protest... > > Hmm, agreed; I had originally been concerned that the SIGPIPE madness > needed to be around the pqsecure_destroy() call, but I can't see why > that would be. > > I've run through a few times w/ the attached and haven't seen the > deadlock. Will continue testing, of course. > > Heikki, any thoughts regarding this change? Any concerns about > back-patching it? 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. 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. - Heikki
В списке pgsql-hackers по дате отправления: