pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Alexander Voytsekhovskyy <young.inbox@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG in 10.1 - dsa_area could not attach to a segment that has been freed
Date: Wed, 29 Nov 2017 19:41:39 +0100
Message-ID: <46967194-cbb1-9a94-e39d-503c7c2ed417@2ndquadrant.com> (raw)
In-Reply-To: <CAPa4P2ZwSfGXZLjM5_666Lc2L1QG5MNBhRQyk42y0+2Xx4SDwQ@mail.gmail.com>
References: <CAPa4P2a8Umtzh6Pxjbw-u40X0PGHbJ_Wfts1T6NEHwRhrB2xTg@mail.gmail.com>
	<CAA4eK1Ld1fbROer6fY1BHUc=xWzpE1O3Ms3ZuRyWjLJGQ82P=g@mail.gmail.com>
	<CAPa4P2Zbd_LowKj2puQUuUSVbJUfjQ+TMxnDbm9yRRjY7gG-ww@mail.gmail.com>
	<CAA4eK1JsYq=mK43GzaijFZF5zM_poSNZBodOed3Qordap0mUiA@mail.gmail.com>
	<CAPa4P2YzgRTBHHRx2KAPUO1_xkmqQgT2xP0tS_e=phWvNzWdkA@mail.gmail.com>
	<5426a66a-c722-6a34-2de2-275c774345aa@2ndquadrant.com>
	<CAPa4P2ZwSfGXZLjM5_666Lc2L1QG5MNBhRQyk42y0+2Xx4SDwQ@mail.gmail.com>

On 11/29/2017 05:23 PM, Alexander Voytsekhovskyy wrote:
> thanks for detailed instructions!
> 
> Here it is:
> 
> Note: breakpoint 1 also set at pc 0x5560252c21f5.
> Breakpoint 2 at 0x5560252c21f5: file
> /build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/backend/utils/mmgr/dsa.c,
> line 1736.
> (gdb) bt
> #0  0x00007f53e538e9b3 in __epoll_wait_nocancel () at
> ../sysdeps/unix/syscall-template.S:84
> #1  0x000055602516a791 in WaitEventSetWaitBlock (nevents=1,
> occurred_events=0x7ffc2849a460, cur_timeout=-1, set=0x556026359498) at
> /build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/backend/storage/ipc/latch.c:1048

Unfortunately, that's still not it.  This shows the backtrace at the
moment when gdb attached to the process (because it interrupts the
exectution). You need to do "c" first, to continue the execution.

So it should be:

1) gdb -p $PID
2) (gdb) handle SIGUSR1 noprint nostop
3) (gdb) break dsa.c:1736
4) (gdb) c
5) run the query, gdb should interrupt at the breakpoint
6) (gdb) bt


regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




view thread (19+ messages)  latest in thread

Message-ID: <46967194-cbb1-9a94-e39d-503c7c2ed417@2ndquadrant.com>
Permalink:  ../46967194-cbb1-9a94-e39d-503c7c2ed417@2ndquadrant.com/
Also on:    postgresql.org/message-id/46967194-cbb1-9a94-e39d-503c7c2ed417@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tomas.vondra@2ndquadrant.com, young.inbox@gmail.com, amit.kapila16@gmail.com
  Subject: Re: BUG in 10.1 - dsa_area could not attach to a segment that has been freed
  In-Reply-To: <46967194-cbb1-9a94-e39d-503c7c2ed417@2ndquadrant.com>
  References: <CAPa4P2a8Umtzh6Pxjbw-u40X0PGHbJ_Wfts1T6NEHwRhrB2xTg@mail.gmail.com> <CAA4eK1Ld1fbROer6fY1BHUc=xWzpE1O3Ms3ZuRyWjLJGQ82P=g@mail.gmail.com> <CAPa4P2Zbd_LowKj2puQUuUSVbJUfjQ+TMxnDbm9yRRjY7gG-ww@mail.gmail.com> <CAA4eK1JsYq=mK43GzaijFZF5zM_poSNZBodOed3Qordap0mUiA@mail.gmail.com> <CAPa4P2YzgRTBHHRx2KAPUO1_xkmqQgT2xP0tS_e=phWvNzWdkA@mail.gmail.com> <5426a66a-c722-6a34-2de2-275c774345aa@2ndquadrant.com> <CAPa4P2ZwSfGXZLjM5_666Lc2L1QG5MNBhRQyk42y0+2Xx4SDwQ@mail.gmail.com> <46967194-cbb1-9a94-e39d-503c7c2ed417@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox