Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault on simple query #3009

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

Segmentation fault on simple query #3009

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels

Comments

@monetdb-team
Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2012-02-15 15:28:46 +0100
From: @skinkie
To: SQL devs <>
Version: 11.7.5 (Dec2011) [obsolete]
CC: @drstmane

Last updated: 2012-02-29 10:34:22 +0100

Comment 16887

Date: 2012-02-15 15:28:46 +0100
From: @skinkie

User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.11 Safari/535.19
Build Identifier:

I reduced the query to:
sql>select 1 as y, (select x from (select 1) as test where x = y);

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffebaa7700 (LWP 30558)]
0x00007fffec41da1a in sql_ref_inc (r=0x0) at sql_mem.c:41
41 assert(r->refcnt > 0);
(gdb) bt
0 0x00007fffec41da1a in sql_ref_inc (r=0x0) at sql_mem.c:41
1 0x00007fffec385703 in rel_dup (r=0x0) at rel_select.c:40
2 0x00007fffec397c41 in rel_select_exp (sql=0x13dfd90, rel=0x15071f0, outer=0x1506f20, sn=0x1506c40, ek=...) at rel_select.c:4621
3 0x00007fffec3995cb in rel_query (sql=0x13dfd90, rel=0x1506f20, sq=0x1506c40, toplevel=0, ek=...) at rel_select.c:4972
4 0x00007fffec39ad33 in rel_subquery (sql=0x13dfd90, rel=0x1506f20, sq=0x1506c40, ek=...) at rel_select.c:5328
5 0x00007fffec396bab in rel_value_exp2 (sql=0x13dfd90, rel=0x7fffebaa6a30, se=0x1506c40, f=3, ek=..., is_last=0x7fffebaa6934) at rel_select.c:4321
6 0x00007fffec396ecb in rel_value_exp (sql=0x13dfd90, rel=0x7fffebaa6a30, se=0x1506c40, f=3, ek=...) at rel_select.c:4385
7 0x00007fffec396fb9 in column_exp (sql=0x13dfd90, rel=0x7fffebaa6a30, column_e=0x1506d40, f=3) at rel_select.c:4398
8 0x00007fffec39722b in rel_column_exp (sql=0x13dfd90, rel=0x7fffebaa6a30, column_e=0x1506d40, f=3) at rel_select.c:4442
9 0x00007fffec39736b in rel_simple_select (sql=0x13dfd90, rel=0x1506f20, where=0x0, selection=0x1506370, distinct=0) at rel_select.c:4468
10 0x00007fffec3995a3 in rel_query (sql=0x13dfd90, rel=0x0, sq=0x1506e70, toplevel=1, ek=...) at rel_select.c:4969
11 0x00007fffec39ad33 in rel_subquery (sql=0x13dfd90, rel=0x0, sq=0x1506e70, ek=...) at rel_select.c:5328
12 0x00007fffec39add0 in rel_selects (sql=0x13dfd90, s=0x1506e70) at rel_select.c:5339
13 0x00007fffec38569a in rel_semantic (sql=0x13dfd90, s=0x1506e70) at rel_semantic.c:297
14 0x00007fffec2f2a1a in sql_symbol2relation (c=0x13dfd90, sym=0x1506e70) at sql.mx:1616
15 0x00007fffec2e1402 in SQLparser (c=0x668328) at sql_scenario.c:1386
16 0x00007ffff6a7f154 in runPhase (c=0x668328, phase=1) at mal_scenario.c:522
17 0x00007ffff6a7f2af in runScenarioBody (c=0x668328) at mal_scenario.c:564
18 0x00007ffff6a7f559 in runScenario (c=0x668328) at mal_scenario.c:601
19 0x00007ffff6a805e7 in MSserveClient (dummy=0x668328) at mal_session.c:438
20 0x00007ffff2ea9d0c in start_thread () from /lib64/libpthread.so.0
21 0x00007ffff2befd7d in clone () from /lib64/libc.so.6

Reproducible: Always

Comment 16913

Date: 2012-02-16 15:02:13 +0100
From: @sjoerdmullender

Changeset 41944f467334 made by Sjoerd Mullender sjoerd@acm.org in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=41944f467334

Changeset description:

Added test for bug #3009.
It does indeed cause a crash.

Comment 16941

Date: 2012-02-19 18:20:52 +0100
From: @drstmane

Appears to be fixed in the default branch (only) after changesets
http://dev.monetdb.org/hg/MonetDB/rev/8ee024048e42
http://dev.monetdb.org/hg/MonetDB/rev/e2d3ecc7237c
http://dev.monetdb.org/hg/MonetDB/rev/03df27701cf7
http://dev.monetdb.org/hg/MonetDB/rev/70dc90e1de2f

Remains open/failing in the Dec2011 branch.

Comment 16944

Date: 2012-02-19 18:32:56 +0100
From: @skinkie

http://dev.monetdb.org/hg/MonetDB/rev/e2d3ecc7237c

Probably needed to backport just that one :)

Comment 16945

Date: 2012-02-19 18:46:54 +0100
From: @drstmane

Fixed (also) in Dec2011 by transplanting changeset e2d3ecc7237c from default to Dec2011:
http://dev.monetdb.org/hg/MonetDB/rev/98fe009c5e33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant