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
Using the default_pipe with the 'constants' optimizer, the following statement crashes mserver. (Feb2010, checkout of last week):
CREATE TABLE x (id SERIAL, a VARCHAR(1000));
Leaving the 'constants' out of the pipeline, it seems to work fine.
This is what gdb tells me:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f3227a1a710 (LWP 19018)]
0x00007f3228dc069b in create_table_or_view (sql=0x7f3218005518, sname=0x7f3218054538 "sys", t=0x7f32180bd898, temp=0)
at /export/scratch0/alink/workspace/MonetDB-installer/MonetDB-Feb2010/sql/src/backends/monet5/sql.mx:1460
1460 sql_column c = n->data;
(gdb) l
1455 return sql_message("CREATE TABLE: insufficient privileges for user '%s' in schema '%s'", stack_get_string(sql, "current_user"), s->base.name);
1456 }
1457
1458 / first check default values */
1459 for (n = t->columns.set->h; n; n = n->next) {
1460 sql_column *c = n->data;
1461
1462 if (c->def) {
1463 char buf[BUFSIZ];
1464 sql_rel *r = NULL;
(gdb) p n
$1 = (node *) 0x135
(gdb) p n->data
Cannot access memory at address 0x13d
(gdb) p *n
Cannot access memory at address 0x135
(gdb) p t->columns.set
$2 = (struct list *) 0x7f321804d388
(gdb) p *t->columns.set
$3 = {sa = 0x7f3218000078, destroy = 0x20, h = 0x135, t = 0x108, cnt = 402653722}
(gdb) bt
0 0x00007f3228dc069b in create_table_or_view (sql=0x7f3218005518, sname=0x7f3218054538 "sys", t=0x7f32180bd898, temp=0)
at /export/scratch0/alink/workspace/MonetDB-installer/MonetDB-Feb2010/sql/src/backends/monet5/sql.mx:1460
1 0x00007f3228dc1f4a in SQLcatalog (cntxt=0x604e70, mb=0x7f321806fac8, stk=0x7f3218080d98, pci=0x7f32180818b8)
at /export/scratch0/alink/workspace/MonetDB-installer/MonetDB-Feb2010/sql/src/backends/monet5/sql.mx:1821
2 0x00007f323fd01e2d in runMALsequence (cntxt=0x604e70, mb=0x7f321806fac8, startpc=1, stoppc=0, stk=0x7f3218080d98, env=0x0, pcicaller=0x0)
at /export/scratch0/alink/workspace/MonetDB-installer/MonetDB-Feb2010/MonetDB5/src/mal/mal_interpreter.mx:1904
3 0x00007f323fcf86e2 in callMAL (cntxt=0x604e70, mb=0x7f321806fac8, env=0x7f3227a19b88, argv=0x7f3227a19bd0, debug=0 '\000')
at /export/scratch0/alink/workspace/MonetDB-installer/MonetDB-Feb2010/MonetDB5/src/mal/mal_interpreter.mx:400
4 0x00007f3228e0ab2a in SQLexecutePrepared (c=0x604e70, be=0x7f321803fdc8, q=0x7f321804bd18)
at /export/scratch0/alink/workspace/MonetDB-installer/MonetDB-Feb2010/sql/src/backends/monet5/sql_scenario.mx:1327
5 0x00007f3228e0ada9 in SQLengineIntern (c=0x604e70, be=0x7f321803fdc8)
at /export/scratch0/alink/workspace/MonetDB-installer/MonetDB-Feb2010/sql/src/backends/monet5/sql_scenario.mx:1380
6 0x00007f3228e0b2e4 in SQLengine (c=0x604e70)
at /export/scratch0/alink/workspace/MonetDB-installer/MonetDB-Feb2010/sql/src/backends/monet5/sql_scenario.mx:1490
7 0x00007f323fd4190b in runPhase (c=0x604e70, phase=4)
at /export/scratch0/alink/workspace/MonetDB-installer/MonetDB-Feb2010/MonetDB5/src/mal/mal_scenario.mx:602
8 0x00007f323fd41b01 in runScenarioBody (c=0x604e70) at /export/scratch0/alink/workspace/MonetDB-installer/MonetDB-Feb2010/MonetDB5/src/mal/mal_scenario.mx:654
9 0x00007f323fd41cbe in runScenario (c=0x604e70) at /export/scratch0/alink/workspace/MonetDB-installer/MonetDB-Feb2010/MonetDB5/src/mal/mal_scenario.mx:679
10 0x00007f323fcf6334 in MSserveClient (dummy=0x604e70)
at /export/scratch0/alink/workspace/MonetDB-installer/MonetDB-Feb2010/MonetDB5/src/mal/mal_session.mx:474
11 0x00000039f6e06a3a in start_thread () from /lib64/libpthread.so.0
12 0x00000039f62de67d in clone () from /lib64/libc.so.6
13 0x0000000000000000 in ?? ()
(gdb) q
A debugging session is active.
removed the constants optimizer from the mitosis_pipe which was back then used as default,
and
2010/02/19 - mlkersten: MonetDB5/conf/monetdb5.conf.in,1.82.2.2
Lets declare the new default pipeline with a fall-back position.
renamed the "mitosis_pipe" (without "constants" optimizer) into "default_pipe" and uses that as default,
keeping the former "default_pipe" as "nov2009_pipe" (incl. the "constants" optimizer).
Comment 13017
Date: 2010-05-04 09:32:09 +0200
From: Pseudo user for Sourceforge import <>
This problem seems to have disappeared in the default branch.
Test added as BugTracker-2010/Tests/constants-optimizer.Bug-2317.sql
The problem has not disappeared. If you add the constants optimizer to the default pipe line, the server crashes:
sql>set optimizer='inline,remap,evaluate,costModel,coercions,emptySet,aliases,mitosis,mergetable,deadcode,constants,commonTerms,joinPath,reorder,deadcode,reduce,dataflow,history,multiplex,accumulators,garbageCollector';
sql>CREATE TABLE x (id SERIAL, a VARCHAR(1000));
MAPI = (monetdb) /tmp/.s.monetdb.50012
ACTION= read_line
QUERY = CREATE TABLE x (id SERIAL, a VARCHAR(1000));
ERROR = !Connection terminated
Date: 2010-02-08 11:16:09 +0100
From: Wouter Alink <>
To: GDK devs <>
Version: 11.11.5 (Jul2012)
CC: @mlkersten, y.kargin
Last updated: 2014-08-11 14:36:32 +0200
Comment 13015
Date: 2010-02-08 11:16:09 +0100
From: Wouter Alink <>
Using the default_pipe with the 'constants' optimizer, the following statement crashes mserver. (Feb2010, checkout of last week):
CREATE TABLE x (id SERIAL, a VARCHAR(1000));
Leaving the 'constants' out of the pipeline, it seems to work fine.
This is what gdb tells me:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f3227a1a710 (LWP 19018)]
0x00007f3228dc069b in create_table_or_view (sql=0x7f3218005518, sname=0x7f3218054538 "sys", t=0x7f32180bd898, temp=0)
at /export/scratch0/alink/workspace/MonetDB-installer/MonetDB-Feb2010/sql/src/backends/monet5/sql.mx:1460
1460 sql_column c = n->data;
(gdb) l
1455 return sql_message("CREATE TABLE: insufficient privileges for user '%s' in schema '%s'", stack_get_string(sql, "current_user"), s->base.name);
1456 }
1457
1458 / first check default values */
1459 for (n = t->columns.set->h; n; n = n->next) {
1460 sql_column *c = n->data;
1461
1462 if (c->def) {
1463 char buf[BUFSIZ];
1464 sql_rel *r = NULL;
(gdb) p n
$1 = (node *) 0x135
(gdb) p n->data
Cannot access memory at address 0x13d
(gdb) p *n
Cannot access memory at address 0x135
(gdb) p t->columns.set
$2 = (struct list *) 0x7f321804d388
(gdb) p *t->columns.set
$3 = {sa = 0x7f3218000078, destroy = 0x20, h = 0x135, t = 0x108, cnt = 402653722}
(gdb) bt
0 0x00007f3228dc069b in create_table_or_view (sql=0x7f3218005518, sname=0x7f3218054538 "sys", t=0x7f32180bd898, temp=0)
at /export/scratch0/alink/workspace/MonetDB-installer/MonetDB-Feb2010/sql/src/backends/monet5/sql.mx:1460
1 0x00007f3228dc1f4a in SQLcatalog (cntxt=0x604e70, mb=0x7f321806fac8, stk=0x7f3218080d98, pci=0x7f32180818b8)
at /export/scratch0/alink/workspace/MonetDB-installer/MonetDB-Feb2010/sql/src/backends/monet5/sql.mx:1821
2 0x00007f323fd01e2d in runMALsequence (cntxt=0x604e70, mb=0x7f321806fac8, startpc=1, stoppc=0, stk=0x7f3218080d98, env=0x0, pcicaller=0x0)
at /export/scratch0/alink/workspace/MonetDB-installer/MonetDB-Feb2010/MonetDB5/src/mal/mal_interpreter.mx:1904
3 0x00007f323fcf86e2 in callMAL (cntxt=0x604e70, mb=0x7f321806fac8, env=0x7f3227a19b88, argv=0x7f3227a19bd0, debug=0 '\000')
at /export/scratch0/alink/workspace/MonetDB-installer/MonetDB-Feb2010/MonetDB5/src/mal/mal_interpreter.mx:400
4 0x00007f3228e0ab2a in SQLexecutePrepared (c=0x604e70, be=0x7f321803fdc8, q=0x7f321804bd18)
at /export/scratch0/alink/workspace/MonetDB-installer/MonetDB-Feb2010/sql/src/backends/monet5/sql_scenario.mx:1327
5 0x00007f3228e0ada9 in SQLengineIntern (c=0x604e70, be=0x7f321803fdc8)
at /export/scratch0/alink/workspace/MonetDB-installer/MonetDB-Feb2010/sql/src/backends/monet5/sql_scenario.mx:1380
6 0x00007f3228e0b2e4 in SQLengine (c=0x604e70)
at /export/scratch0/alink/workspace/MonetDB-installer/MonetDB-Feb2010/sql/src/backends/monet5/sql_scenario.mx:1490
7 0x00007f323fd4190b in runPhase (c=0x604e70, phase=4)
at /export/scratch0/alink/workspace/MonetDB-installer/MonetDB-Feb2010/MonetDB5/src/mal/mal_scenario.mx:602
8 0x00007f323fd41b01 in runScenarioBody (c=0x604e70) at /export/scratch0/alink/workspace/MonetDB-installer/MonetDB-Feb2010/MonetDB5/src/mal/mal_scenario.mx:654
9 0x00007f323fd41cbe in runScenario (c=0x604e70) at /export/scratch0/alink/workspace/MonetDB-installer/MonetDB-Feb2010/MonetDB5/src/mal/mal_scenario.mx:679
10 0x00007f323fcf6334 in MSserveClient (dummy=0x604e70)
at /export/scratch0/alink/workspace/MonetDB-installer/MonetDB-Feb2010/MonetDB5/src/mal/mal_session.mx:474
11 0x00000039f6e06a3a in start_thread () from /lib64/libpthread.so.0
12 0x00000039f62de67d in clone () from /lib64/libc.so.6
13 0x0000000000000000 in ?? ()
(gdb) q
A debugging session is active.
Comment 13016
Date: 2010-03-18 00:11:34 +0100
From: @drstmane
FYI:
2010/01/24 - nielsnes: MonetDB5/conf/monetdb5.conf.in,1.82.2.1
disable constant optimizer (breaks atom ptr values)
removed the constants optimizer from the mitosis_pipe which was back then used as default,
and
2010/02/19 - mlkersten: MonetDB5/conf/monetdb5.conf.in,1.82.2.2
Lets declare the new default pipeline with a fall-back position.
renamed the "mitosis_pipe" (without "constants" optimizer) into "default_pipe" and uses that as default,
keeping the former "default_pipe" as "nov2009_pipe" (incl. the "constants" optimizer).
Comment 13017
Date: 2010-05-04 09:32:09 +0200
From: Pseudo user for Sourceforge import <>
This bug was previously known as tracker item 2947749 at http://sourceforge.net/support/tracker.php?aid=2947749
The original assignee of this bug does not have
an account here. Reassigning to the default assignee
for the component, bugs-common@monetdb.org.
Previous assignee was nobody@users.sourceforge.net.
Comment 15790
Date: 2011-05-09 16:13:56 +0200
From: @mlkersten
This problem seems to have disappeared in the default branch.
Test added as BugTracker-2010/Tests/constants-optimizer.Bug-2317.sql
Comment 16194
Date: 2011-09-08 11:37:57 +0200
From: @sjoerdmullender
(In reply to comment 3)
The problem has not disappeared. If you add the constants optimizer to the default pipe line, the server crashes:
sql>set optimizer='inline,remap,evaluate,costModel,coercions,emptySet,aliases,mitosis,mergetable,deadcode,constants,commonTerms,joinPath,reorder,deadcode,reduce,dataflow,history,multiplex,accumulators,garbageCollector';
sql>CREATE TABLE x (id SERIAL, a VARCHAR(1000));
MAPI = (monetdb) /tmp/.s.monetdb.50012
ACTION= read_line
QUERY = CREATE TABLE x (id SERIAL, a VARCHAR(1000));
ERROR = !Connection terminated
Comment 17487
Date: 2012-07-17 14:37:04 +0200
From: @grobian
the constants optimizer is still in the accumulator_pipe, flagged as stable.
Comment 18150
Date: 2012-11-27 16:31:52 +0100
From: @mlkersten
Expanded the test with accumulator_pipe, which contains the constant optimizer.
The result does not trigger a segfault.
Comment 20021
Date: 2014-08-11 14:36:32 +0200
From: MonetDB Mercurial Repository <>
Changeset f62a6432981c made by Stefan Manegold Stefan.Manegold@cwi.nl in the MonetDB repo, refers to this bug.
For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f62a6432981c
Changeset description:
The text was updated successfully, but these errors were encountered: