Re: BUG in 10.1 - dsa_area could not attach to a segment that has been freed

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: Alexander Voytsekhovskyy <young(dot)inbox(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG in 10.1 - dsa_area could not attach to a segment that has been freed
Date: 2017-11-29 16:02:01
Message-ID: 5426a66a-c722-6a34-2de2-275c774345aa@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alexander Voytsekhovskyy 2017-11-29 16:23:49 Re: BUG in 10.1 - dsa_area could not attach to a segment that has been freed
Previous Message Alexander Voytsekhovskyy 2017-11-29 15:46:27 Re: BUG in 10.1 - dsa_area could not attach to a segment that has been freed