Re: LWLock deadlock and gdb advice
От | Jeff Janes |
---|---|
Тема | Re: LWLock deadlock and gdb advice |
Дата | |
Msg-id | CAMkU=1wL4WDyNmBLrmztdhpmgjMM_CPAStcxbtAOvk+Q16sy5g@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: LWLock deadlock and gdb advice (Peter Geoghegan <pg@heroku.com>) |
Ответы |
Re: LWLock deadlock and gdb advice
|
Список | pgsql-hackers |
On Mon, Jun 29, 2015 at 5:55 PM, Peter Geoghegan <pg@heroku.com> wrote:
On Mon, Jun 29, 2015 at 5:37 PM, Jeff Janes <jeff.janes@gmail.com> wrote:
> Is there a way to use gdb to figure out who holds the lock they are waiting
> for?
Have you considered building with LWLOCK_STATS defined, and LOCK_DEBUG
defined? That might do it.
I hadn't planned on running into this problem, so had not compiled accordingly.
I thought LOCK_DEBUG would produce too much output, but now I see it doesn't print anything unless Trace_lwlocks is on (but it still makes more info available to gdb, as Amit mentioned), so I think that should be OK.
Since I messed up the gdb session causing the postmaster to SIGKILL all the children and destroy the evidence, I'll repeat the run compiled with LOCK_DEBUG and see what it looks like in the morning.
Thanks,
Jeff
В списке pgsql-hackers по дате отправления: