You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT cods, elrik, ether, jaelen, sora, SUM(otter)
FROM t1
GROUP BY cods, elrik, ether, jaelen, sora
UNION ALL
SELECT 0 AS cods, 0 AS elrik, 0 AS ether, 0 AS jaelen, 0 AS sora, SUM(tib0)
FROM t2
GROUP BY cods, elrik, ether, jaelen, sora;
Actual Results:
MonetDB crashes
Expected Results:
Something..
It is interesting to note that using fewer columns doesn't trigger this bug. It's only when about 5 or more columns are used within the GROUP BY that we see this behavior.
It was rather hard to diagnostic, because we had a very large query in the first place. It tooks hours to find the very specific query that was triggering this problem.
Comment 21321
Date: 2015-10-08 15:26:51 +0200
From: Martin van Dinther <<martin.van.dinther>>
I found the issue is already reproducable (on Jul2015) with query:
SELECT 0 AS cods, 0 AS elrik, 0 AS ether, 0 AS jaelen, 0 AS sora, SUM(tib0)
FROM t2
GROUP BY cods, elrik, ether, jaelen, sora;
Also adding PLAN or EXPLAIN or TRACE in front of the query, also leads to a Segmentation fault in the mserver5.
No problem when grouping less than 5 columns as in query:
SELECT 0 AS elrik, 0 AS ether, 0 AS jaelen, 0 AS sora, SUM(tib0)
FROM t2
GROUP BY elrik, ether, jaelen, sora;
Date: 2015-10-07 18:15:09 +0200
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
To: SQL devs <>
Version: 11.17.21 (Jan2014-SP3)
CC: martin.van.dinther, @njnes
Last updated: 2015-11-03 10:18:26 +0100
Comment 21320
Date: 2015-10-07 18:15:09 +0200
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0
Build Identifier:
A specific combination of UNION / GROUP BY / AGGREGATES and tables definitions causes MonetDB to crash.
The server log just tell about SIGSEGV without further details.
Reproducible: Always
Steps to Reproduce:
CREATE TABLE t1 (cods int, elrik int, ether int, jaelen int, otter int, sora int);
CREATE TABLE t2 (tib0 int);
SELECT cods, elrik, ether, jaelen, sora, SUM(otter)
FROM t1
GROUP BY cods, elrik, ether, jaelen, sora
UNION ALL
SELECT 0 AS cods, 0 AS elrik, 0 AS ether, 0 AS jaelen, 0 AS sora, SUM(tib0)
FROM t2
GROUP BY cods, elrik, ether, jaelen, sora;
Actual Results:
MonetDB crashes
Expected Results:
Something..
It is interesting to note that using fewer columns doesn't trigger this bug. It's only when about 5 or more columns are used within the GROUP BY that we see this behavior.
It was rather hard to diagnostic, because we had a very large query in the first place. It tooks hours to find the very specific query that was triggering this problem.
Comment 21321
Date: 2015-10-08 15:26:51 +0200
From: Martin van Dinther <<martin.van.dinther>>
I found the issue is already reproducable (on Jul2015) with query:
SELECT 0 AS cods, 0 AS elrik, 0 AS ether, 0 AS jaelen, 0 AS sora, SUM(tib0)
FROM t2
GROUP BY cods, elrik, ether, jaelen, sora;
Also adding PLAN or EXPLAIN or TRACE in front of the query, also leads to a Segmentation fault in the mserver5.
No problem when grouping less than 5 columns as in query:
SELECT 0 AS elrik, 0 AS ether, 0 AS jaelen, 0 AS sora, SUM(tib0)
FROM t2
GROUP BY elrik, ether, jaelen, sora;
Comment 21330
Date: 2015-10-14 11:40:36 +0200
From: MonetDB Mercurial Repository <>
Changeset d04a59d1b9a9 made by Niels Nes niels@cwi.nl in the MonetDB repo, refers to this bug.
For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d04a59d1b9a9
Changeset description:
Comment 21331
Date: 2015-10-14 11:41:39 +0200
From: @njnes
properly handle alias expressions (and no other expressions) in the reduce group by optimizer.
Comment 21444
Date: 2015-11-03 10:18:26 +0100
From: @sjoerdmullender
Jul2015 SP1 has been released.
The text was updated successfully, but these errors were encountered: