Re: BUG in 10.1 - dsa_area could not attach to a segment that hasbeen freed - Mailing list pgsql-bugs
From | Alexander Voytsekhovskyy |
---|---|
Subject | Re: BUG in 10.1 - dsa_area could not attach to a segment that hasbeen freed |
Date | |
Msg-id | CAPa4P2Y-UDiu2AD_Zf6Kapgu4Dkgb89BvtUZfRTWCRuRKptc=g@mail.gmail.com Whole thread Raw |
In response to | Re: BUG in 10.1 - dsa_area could not attach to a segment that hasbeen freed (Tomas Vondra <tomas.vondra@2ndquadrant.com>) |
Responses |
Re: BUG in 10.1 - dsa_area could not attach to a segment that hasbeen freed
|
List | pgsql-bugs |
Thanks for helping, here is one more try
#0 get_segment_by_index (area=area@entry=0x556026700be8, index=1) at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/backend/utils/mmgr/dsa.c:1736
#1 0x00005560252c2b90 in dsa_get_address (area=area@entry=0x556026700be8,
dp=dp@entry=1099511685280) at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/backend/utils/mmgr/dsa.c:945
#2 0x00005560250a2c2b in tbm_attach_shared_iterate
(dsa=dsa@entry=0x556026700be8,
dp=1099511685280) at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/backend/nodes/tidbitmap.c:1503
#3 0x0000556025066c7b in BitmapHeapNext (node=node@entry=0x556026460710)
at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/backend/executor/nodeBitmapHeapscan.c:176
#4 0x000055602505b36d in ExecScanFetch (recheckMtd=0x556025066470
, accessMtd=0x556025066500 ,
node=0x556026460710) at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/backend/executor/execScan.c:97
#5 ExecScan (node=0x556026460710, accessMtd=0x556025066500
, recheckMtd=0x556025066470 ) at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/backend/executor/execScan.c:164
#6 0x0000556025061033 in ExecProcNode (node=0x556026460710) at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/include/executor/executor.h:250
#7 ExecAppend (pstate=0x556026582ff8) at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/backend/executor/nodeAppend.c:222
#8 0x0000556025068ce6 in ExecProcNode (node=0x556026582ff8) at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/include/executor/executor.h:250
#9 gather_getnext (gatherstate=0x5560263b0ae0) at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/backend/executor/nodeGather.c:281
#10 ExecGather (pstate=0x5560263b0ae0) at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/backend/executor/nodeGather.c:215
#11 0x000055602506b6d8 in ExecProcNode (node=0x5560263b0ae0) at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/include/executor/executor.h:250
#12 ExecHashJoinOuterGetTuple (hashvalue=0x7ffc2849a0dc,
hjstate=0x5560263b0220, outerNode=0x5560263b0ae0) at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/backend/executor/nodeHashjoin.c:612
#13 ExecHashJoin (pstate=0x5560263b0220) at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/backend/executor/nodeHashjoin.c:201
#14 0x0000556025077af6 in ExecProcNode (node=0x5560263b0220) at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/include/executor/executor.h:250
#15 ExecSort (pstate=0x5560263affb0) at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/backend/executor/nodeSort.c:106
#16 0x000055602506138c in ExecProcNode (node=0x5560263affb0) at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/include/executor/executor.h:250
#17 fetch_input_tuple (aggstate=aggstate@entry=0x5560263aef38) at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/backend/executor/nodeAgg.c:695
#18 0x000055602506363b in agg_retrieve_direct (aggstate=0x5560263aef38) at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/backend/executor/nodeAgg.c:2336
#19 ExecAgg (pstate=0x5560263aef38) at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/backend/executor/nodeAgg.c:2147
#20 0x000055602505528b in ExecProcNode (node=0x5560263aef38) at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/include/executor/executor.h:250
#21 ExecutePlan (execute_once=, dest=0x5560266986c0,
direction=, numberTuples=0, sendTuples=,
operation=CMD_SELECT, use_parallel_mode=,
planstate=0x5560263aef38, estate=0x5560263aecd8) at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/backend/executor/execMain.c:1722
#22 standard_ExecutorRun (queryDesc=0x556026567f28, direction=, count=0, execute_once=) at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/backend/executor/execMain.c:363
#23 0x000055602518f95b in PortalRunSelect (portal=portal@entry=0x556026377d48,
forward=forward@entry=1 '\001', count=0, count@entry=9223372036854775807,
dest=dest@entry=0x5560266986c0) at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/backend/tcop/pquery.c:932
#24 0x0000556025190f58 in PortalRun (portal=portal@entry=0x556026377d48,
count=count@entry=9223372036854775807, isTopLevel=isTopLevel@entry=1
'\001', run_once=run_once@entry=1 '\001', dest=dest@entry=0x5560266986c0,
altdest=altdest@entry=0x5560266986c0, completionTag=0x7ffc2849a470 "") at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/backend/tcop/pquery.c:773
#25 0x000055602518c8dc in exec_simple_query (query_string=0x55602640eda8
"SELECT\n delivery_data.id_product AS id_product,\n
client_tt.id_client_tt\nFROM delivery_data\n JOIN client_tt AS
client_tt_tmp ON (client_tt_tmp.id_client_tt
=\ndelivery_data.id_client_tt)\n JOIN clien"...) at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/backend/tcop/postgres.c:1099
#26 0x000055602518ddf6 in PostgresMain (argc=,
argv=argv@entry=0x5560263a08e0, dbname=0x5560263a07d8 "ddc_pvmrussia",
username=) at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/backend/tcop/postgres.c:4088
#27 0x0000556024ec7fe9 in BackendRun (port=0x55602639e570) at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/backend/postmaster/postmaster.c:4357
#28 BackendStartup (port=0x55602639e570) at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/backend/postmaster/postmaster.c:4029
#29 ServerLoop () at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/backend/postmaster/postmaster.c:1753
#30 0x000055602511d36b in PostmasterMain (argc=5, argv=) at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/backend/postmaster/postmaster.c:1361
#31 0x0000556024ec93e5 in main (argc=5, argv=0x556026358850) at
/build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/backend/main/main.c:228
On Wed, Nov 29, 2017 at 8:41 PM, Tomas Vondra
wrote:
> 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
>
pgsql-bugs by date: