Re: Strange hanging bug in a simple milter

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: Strange hanging bug in a simple milter
Дата
Msg-id 20130913175954.GV2706@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: Strange hanging bug in a simple milter  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: Strange hanging bug in a simple milter  (Andres Freund <andres@2ndquadrant.com>)
Re: Strange hanging bug in a simple milter  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers
* Andres Freund (andres@2ndquadrant.com) wrote:
> On 2013-09-13 13:15:34 -0400, Stephen Frost wrote:
> > 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.

Unfortunately, while I can still easily get the deadlock to happen when
the hooks are reset, the hooks don't appear to ever get called when
ssl_open_connections is set to zero.  You have a good point about the
additional SSL calls after the hooks are unloaded though, I wonder if
holding the ssl_config_mutex lock over all of close_SSL might be more
sensible..
Thanks,
    Stephen

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Strange hanging bug in a simple milter
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Strange hanging bug in a simple milter