Re: LWLock deadlock and gdb advice

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: LWLock deadlock and gdb advice
Дата
Msg-id CAM3SWZQYxY2_gWYog4Er8Sk1YLFdDQeWJ7PNCy2_2fVNg2gBsw@mail.gmail.com
обсуждение исходный текст
Ответ на LWLock deadlock and gdb advice  (Jeff Janes <jeff.janes@gmail.com>)
Ответы Re: LWLock deadlock and gdb advice
Re: LWLock deadlock and gdb advice
Список pgsql-hackers
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.

Otherwise, I suggest dereferencing the "l" argument to
LWLockAcquireWithVar() or something -- set the frame to "3" in your
example backtrace, using "f 3". Then, "p *l". You'll get the tranche
id there, and so on.

-- 
Peter Geoghegan



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

Предыдущее
От: Jeff Janes
Дата:
Сообщение: LWLock deadlock and gdb advice
Следующее
От: Robert Haas
Дата:
Сообщение: Re: anole: assorted stability problems