Re: Possible problem with shm_mq spin lock
От | Andres Freund |
---|---|
Тема | Re: Possible problem with shm_mq spin lock |
Дата | |
Msg-id | 20141025231751.GN5790@alap3.anarazel.de обсуждение исходный текст |
Ответ на | Possible problem with shm_mq spin lock (Haribabu Kommi <kommi.haribabu@gmail.com>) |
Ответы |
Re: Possible problem with shm_mq spin lock
|
Список | pgsql-hackers |
Hi, On 2014-10-26 08:52:42 +1100, Haribabu Kommi wrote: > I am thinking of a possible problem with shm_mq structure spin lock. > This is used for protecting the shm_mq structure. > > During the processing of any code under the spin lock, if the process > receives SIGQUIT signal then it is leading to a dead lock situation. > > SIGQUIT->proc_exit->shm_mq_detach->try to acquire spin lock. The spin > lock is already took by the process. > > It is very dificult to reproduce the problem as because the code under > the lock is very minimal. > Please let me know if I missed anything. I think you missed the following bit in postgres.c: /** quickdie() occurs when signalled SIGQUIT by the postmaster.** Some backend has bought the farm,* so we need to stop whatwe're doing and exit.*/ void quickdie(SIGNAL_ARGS) { .../* * We DO NOT want to run proc_exit() callbacks -- we're here because * shared memory may be corrupted, so we don't wantto try to clean up our * transaction. Just nail the windows shut and get out of town. Now that * there's an atexitcallback to prevent third-party code from breaking * things by calling exit() directly, we have to reset the callbacks* explicitly to make this work as intended. */on_exit_reset(); .. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: