[BUG] Re-entering malloc problem when use --enable-nls build postgresql

Поиск
Список
Период
Сортировка
От 158306855
Тема [BUG] Re-entering malloc problem when use --enable-nls build postgresql
Дата
Msg-id tencent_34F9D9C6F16EAA9EB10ED2CE6CCF88B5B407@qq.com
обсуждение исходный текст
Ответы Re: [BUG] Re-entering malloc problem when use --enable-nls build postgresql  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
HI pg team:

I found that compiling postgresql with enable-nls may be introduce a problem

1. When build postgresql with enable-nls (Native Language Support), postgresql use dgettext function to translate Language.
2. The quickdie use dgettext translate message ; dgettext use malloc (in __dcigettext  function)
3. When use pg_ctl -m fast to shutdown postgresql, pg backend process use function quickdie to shutdown database.
4. Before receive quickdie signal, if backend process in malloc function and already have lock that will lead to process deadlock.
5. This is the deadlock process stack:

Вложения

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: BUG #15187: When use huge page, there may be a lot of hangedconnections with status startup or authentication
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [BUG] Re-entering malloc problem when use --enable-nls build postgresql