Thread: crash from pfree and brin index

crash from pfree and brin index

From
Mark Wong
Date:
Hi Álvaro,

I have a stack trace from a crash to share, when querying a table with
a brin index.  Let me know what else you need in addition to the stack trace:

#0  0x000000000077b0eb in pfree (pointer=0x1dcf1a8) at mcxt.c:754
#1  0x000000000045fe4a in bringetbitmap (fcinfo=<optimized out>) at brin.c:398
#2  0x0000000000761bb2 in FunctionCall2Coll (flinfo=<optimized out>, collation=<optimized out>, arg1=<optimized out>,
arg2=<optimizedout>) at fmgr.c:1324 
#3  0x000000000049a558 in index_getbitmap (scan=0x1dc9420, bitmap=0x1dcba58) at indexam.c:651
#4  0x00000000005aaf55 in MultiExecBitmapIndexScan (node=0x1dc9590) at nodeBitmapIndexscan.c:89
#5  0x00000000005aa999 in BitmapHeapNext (node=0x1dc6a30) at nodeBitmapHeapscan.c:104
#6  0x00000000005a35de in ExecScanFetch (recheckMtd=0x5aa500 <BitmapHeapRecheck>, accessMtd=0x5aa550 <BitmapHeapNext>,
node=0x1dc6a30)at execScan.c:82 
#7  ExecScan (node=0x1dc6a30, accessMtd=0x5aa550 <BitmapHeapNext>, recheckMtd=0x5aa500 <BitmapHeapRecheck>) at
execScan.c:132
#8  0x000000000059c6d8 in ExecProcNode (node=0x1dc6a30) at execProcnode.c:414
#9  0x00000000005b3651 in ExecNestLoop (node=0x1dc67c0) at nodeNestloop.c:123
#10 0x000000000059c658 in ExecProcNode (node=0x1dc67c0) at execProcnode.c:449
#11 0x00000000005a86d2 in agg_fill_hash_table (aggstate=0x1dc6070) at nodeAgg.c:1349
#12 ExecAgg (node=0x1dc6070) at nodeAgg.c:1111
#13 0x000000000059c5f8 in ExecProcNode (node=0x1dc6070) at execProcnode.c:476
#14 0x00000000005b56a9 in ExecSort (node=0x1dc5dd0) at nodeSort.c:103
#15 0x000000000059c618 in ExecProcNode (node=0x1dc5dd0) at execProcnode.c:468
#16 0x0000000000599b22 in ExecutePlan (dest=0xb5b700, direction=<optimized out>, numberTuples=0, sendTuples=1 '\001',
operation=CMD_SELECT,planstate=0x1dc5dd0, estate=0x1dc5c90)   at execMain.c:1475 
#17 standard_ExecutorRun (queryDesc=0x1dc4be8, direction=<optimized out>, count=0) at execMain.c:308
#18 0x00000000005552a1 in ExplainOnePlan (plannedstmt=<optimized out>, into=0x0, es=0x7fff2a0aaa30,
queryString=<optimizedout>, params=0x0, planduration=0x7fff2a0aa9e0) at explain.c:481 
#19 0x0000000000555561 in ExplainOneQuery (params=<optimized out>, queryString=<optimized out>, es=0x7fff2a0aaa30,
into=0x0,query=<optimized out>) at explain.c:336 
#20 ExplainOneQuery (query=<optimized out>, into=0x0, es=0x7fff2a0aaa30, queryString=<optimized out>, params=<optimized
out>)at explain.c:308 
#21 0x0000000000555958 in ExplainQuery (stmt=0x1d243e0,    queryString=0x1d5a660 "explain (analyze, buffers)\nselect
o_orderpriority,count(*) as order_count\nfrom o2\nwhere o_orderdate >= date '1995-01-01'\nand o_orderdate < cast(date
'1995-01-01'+ interval '3 month' as date)\nand exi"..., params=0x0, dest=0x1daecf0) at explain.c:227 
#22 0x00000000006890c1 in standard_ProcessUtility (parsetree=0x1d243e0,    queryString=0x1d5a660 "explain (analyze,
buffers)\nselecto_orderpriority, count(*) as order_count\nfrom o2\nwhere o_orderdate >= date '1995-01-01'\nand
o_orderdate< cast(date '1995-01-01' + interval '3 month' as date)\nand exi"..., context=<optimized out>, params=0x0,
dest=<optimizedout>, completionTag=<optimized out>) at utility.c:646 
#23 0x00000000006868b7 in PortalRunUtility (portal=0x1dacb80, utilityStmt=0x1d243e0, isTopLevel=1 '\001',
dest=0x1daecf0,completionTag=0x7fff2a0aab50 "") at pquery.c:1187 
#24 0x000000000068772d in FillPortalStore (portal=0x1dacb80, isTopLevel=1 '\001') at pquery.c:1061
#25 0x00000000006880a0 in PortalRun (portal=0x1dacb80, count=9223372036854775807, isTopLevel=1 '\001', dest=0x1d24900,
altdest=0x1d24900,completionTag=0x7fff2a0aaf20 "") at pquery.c:785 
#26 0x000000000068461e in exec_simple_query (   query_string=0x1d5a660 "explain (analyze, buffers)\nselect
o_orderpriority,count(*) as order_count\nfrom o2\nwhere o_orderdate >= date '1995-01-01'\nand o_orderdate < cast(date
'1995-01-01'+ interval '3 month' as date)\nand exi"...) at postgres.c:1045 
#27 PostgresMain (argc=<optimized out>, argv=<optimized out>, dbname=0x1d01880 "dbt3", username=<optimized out>) at
postgres.c:4010
#28 0x00000000006349ad in BackendRun (port=0x1d211e0) at postmaster.c:4112
#29 BackendStartup (port=0x1d211e0) at postmaster.c:3787
#30 ServerLoop () at postmaster.c:1566
#31 PostmasterMain (argc=<optimized out>, argv=<optimized out>) at postmaster.c:1219
#32 0x000000000045f98a in main (argc=3, argv=0x1d00aa0) at main.c:219

Regards,
Mark
--
Mark Wong
http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services