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>
To: 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 17:02:01 +0100
Message-ID: <5426a66a-c722-6a34-2de2-275c774345aa@2ndquadrant.com> (raw)
In-Reply-To: <CAPa4P2YzgRTBHHRx2KAPUO1_xkmqQgT2xP0tS_e=phWvNzWdkA@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>


On 11/29/2017 04:46 PM, Alexander Voytsekhovskyy wrote:
> I see my fault
> 
> here is GDB with correct symbols
> 
> Program received signal SIGUSR1, User defined signal 1.
> pagetable_insert (found=<synthetic pointer>, key=8192, tb=<optimized
> out>) at
> /build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/include/lib/simplehash.h:540
> 540   
>  /build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/include/lib/simplehash.h:
> No such file or directory.
> Continuing.
> 

I think you really need to do "handle SIGUSR1 noprint nostop" to
eliminate the SIGUSR1 noise. That is absolutely irrelevant to the issue
you're trying to investigate.

Furthermore, this does not give us any sort of stack trace. You need to
either set a breakpoint at the elog() call, which I believe is this one:

https://github.com/postgres/postgres/blob/REL_10_STABLE/src/backend/utils/mmgr/dsa.c#L1736

wait for it to get triggered, and then generate backtrace using 'bt'.


So something like

1) gdb -p $PID

2) (gdb) handle SIGUSR1 noprint nostop

3) (gdb) break dsa.c:1736

4) run the query, gdb should interrupt at the breakpoint

5) (gdb) bt

and then send us the output of that gdb command.


regards

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




view thread (19+ messages)  latest in thread

Message-ID: <5426a66a-c722-6a34-2de2-275c774345aa@2ndquadrant.com>
Permalink:  ../5426a66a-c722-6a34-2de2-275c774345aa@2ndquadrant.com/
Also on:    postgresql.org/message-id/5426a66a-c722-6a34-2de2-275c774345aa@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: <5426a66a-c722-6a34-2de2-275c774345aa@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>

* 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