Crash with a CUBE query on 9.6

From: Heikki Linnakangas <hlinnakangas(at)pivotal(dot)io>
To: Pg Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Crash with a CUBE query on 9.6
Date: 2016-12-19 12:47:35
Message-ID: e24885b5-fd08-246a-31d9-09f5a8aa7fb7@pivotal.io
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The attached test case crashes on REL9_6_STABLE and master. On 9.5, it
worked.

Stack trace:

Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x0000555d4f8c64b6 in tuplesort_performsort (state=0x0) at
tuplesort.c:1746
1746 MemoryContext oldcontext = MemoryContextSwitchTo(state->sortcontext);
(gdb) bt
#0 0x0000555d4f8c64b6 in tuplesort_performsort (state=0x0) at
tuplesort.c:1746
#1 0x0000555d4f59f739 in process_ordered_aggregate_single
(aggstate=0x555d51d561d0, pertrans=0x555d51d7be78,
pergroupstate=0x555d51d64bc0) at nodeAgg.c:1169
#2 0x0000555d4f5a033f in finalize_aggregates (aggstate=0x555d51d561d0,
peraggs=0x555d51d647a8, pergroup=0x555d51d64bc0, currentSet=0) at
nodeAgg.c:1588
#3 0x0000555d4f5a102f in agg_retrieve_direct (aggstate=0x555d51d561d0)
at nodeAgg.c:2197
#4 0x0000555d4f5a09db in ExecAgg (node=0x555d51d561d0) at nodeAgg.c:1877
#5 0x0000555d4f58c2c3 in ExecProcNode (node=0x555d51d561d0) at
execProcnode.c:503
#6 0x0000555d4f5ba47e in ExecSort (node=0x555d51d55f00) at nodeSort.c:103
#7 0x0000555d4f58c299 in ExecProcNode (node=0x555d51d55f00) at
execProcnode.c:495
#8 0x0000555d4f58833f in ExecutePlan (estate=0x555d51d55de8,
planstate=0x555d51d55f00, use_parallel_mode=0 '\000',
operation=CMD_SELECT, sendTuples=1 '\001', numberTuples=0,
direction=ForwardScanDirection, dest=0x555d51d4ba08) at execMain.c:1569
#9 0x0000555d4f5862da in standard_ExecutorRun
(queryDesc=0x555d51c5c128, direction=ForwardScanDirection, count=0) at
execMain.c:338
#10 0x0000555d4f586153 in ExecutorRun (queryDesc=0x555d51c5c128,
direction=ForwardScanDirection, count=0) at execMain.c:286
#11 0x0000555d4f7327f8 in PortalRunSelect (portal=0x555d51c37468,
forward=1 '\001', count=0, dest=0x555d51d4ba08) at pquery.c:948
#12 0x0000555d4f73247f in PortalRun (portal=0x555d51c37468,
count=9223372036854775807, isTopLevel=1 '\001', dest=0x555d51d4ba08,
altdest=0x555d51d4ba08, completionTag=0x7ffc26ce4350 "")
at pquery.c:789
#13 0x0000555d4f72c2b6 in exec_simple_query (
query_string=0x555d51cb8898 "SELECT CASE WHEN sale.qty < 10 THEN 1
ELSE 2 END as newalias1, TO_CHAR(COALESCE(STDDEV(DISTINCT
floor(sale.cn)),0),'99999999.9999999'),TO_CHAR(COALESCE(AVG(DISTINCT
floor(sale.vn*sale.vn)),0),'9999999"...) at postgres.c:1094

- Heikki

Attachment Content-Type Size
cube-crash.sql application/sql 2.0 KB

Browse pgsql-bugs by date

  From Date Subject
Next Message Heikki Linnakangas 2016-12-19 12:59:42 Crash with a CUBE query on 9.6
Previous Message Tom Lane 2016-12-18 18:54:10 Mishandling of right-associated phrase operators in FTS