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

Segfault encountered (sqlsmith) #6417

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

Segfault encountered (sqlsmith) #6417

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

Comments

@monetdb-team
Copy link

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

Date: 2017-10-13 22:50:11 +0200
From: @mlkersten
To: SQL devs <>
Version: 11.27.5 (Jul2017-SP1)
CC: @njnes

Last updated: 2017-10-26 14:01:45 +0200

Comment 25699

Date: 2017-10-13 22:50:11 +0200
From: @mlkersten

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:55.0) Gecko/20100101 Firefox/55.0
Build Identifier:

After installing the upgraded sqlsmith 2.0 and runnning sequences, this following simple query caused problems.

(gdb) print *s
$1 = {type = st_var, op1 = 0x0, op2 = 0x0, op3 = 0x0, op4 = {aval = 0x24c8310, lval = 0x24c8310, stval = 0x24c8310, cval = 0x24c8310,
idxval = 0x24c8310, tval = 0x24c8310, typeval = {type = 0x24c8310, digits = 1, scale = 0}, aggrval = 0x24c8310, funcval = 0x24c8310,
rel = 0x24c8310}, nrcols = 0 '\000', key = 1 '\001', aggr = 0 '\000', partition = 0 '\000', flag = 0, nr = 169, tname = 0x0,
cname = 0x0, q = 0x7f979431b110}

x00007f97c44ded35 in stmt_result (be=0x7f9794112190, s=0x7f97948a9250, nr=0)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/sql_statement.c:971
971 if (s->op1->nr < 0)
(gdb) where
0 0x00007f97c44ded35 in stmt_result (be=0x7f9794112190, s=0x7f97948a9250, nr=0)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/sql_statement.c:971
1 0x00007f97c44c4d95 in rel2bin_semijoin (be=0x7f9794112190, rel=0x7f97948892c0, refs=0x7f97948a0cc0)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:1991
2 0x00007f97c44d1dac in subrel_bin (be=0x7f9794112190, rel=0x7f97948892c0, refs=0x7f97948a0cc0)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:4815
3 0x00007f97c44c6fd9 in rel2bin_project (be=0x7f9794112190, rel=0x7f979488d2f0, refs=0x7f97948a0cc0, topn=0x0)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:2450
4 0x00007f97c44d1e66 in subrel_bin (be=0x7f9794112190, rel=0x7f979488d2f0, refs=0x7f97948a0cc0)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:4831
5 0x00007f97c44c4824 in rel2bin_semijoin (be=0x7f9794112190, rel=0x7f97948893f0, refs=0x7f97948a0cc0)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:1924
6 0x00007f97c44d1dac in subrel_bin (be=0x7f9794112190, rel=0x7f97948893f0, refs=0x7f97948a0cc0)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:4815
7 0x00007f97c44c6fd9 in rel2bin_project (be=0x7f9794112190, rel=0x7f9794889770, refs=0x7f97948a0cc0, topn=0x0)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:2450
8 0x00007f97c44d1e66 in subrel_bin (be=0x7f9794112190, rel=0x7f9794889770, refs=0x7f97948a0cc0)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:4831
9 0x00007f97c44c579b in rel2bin_union (be=0x7f9794112190, rel=0x7f979488a5a0, refs=0x7f97948a0cc0)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:2141
10 0x00007f97c44d1dda in subrel_bin (be=0x7f9794112190, rel=0x7f979488a5a0, refs=0x7f97948a0cc0)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:4819
11 0x00007f97c44c7a2d in rel2bin_select (be=0x7f9794112190, rel=0x7f9794886750, refs=0x7f97948a0cc0)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:2586
12 0x00007f97c44d1e94 in subrel_bin (be=0x7f9794112190, rel=0x7f9794886750, refs=0x7f97948a0cc0)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:4835
13 0x00007f97c44c6fd9 in rel2bin_project (be=0x7f9794112190, rel=0x7f9794883e10, refs=0x7f97948a0cc0, topn=0x7f97948840b0)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:2450
14 0x00007f97c44c8615 in rel2bin_topn (be=0x7f9794112190, rel=0x7f97948840b0, refs=0x7f97948a0cc0)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:2763
15 0x00007f97c44d1ef0 in subrel_bin (be=0x7f9794112190, rel=0x7f97948840b0, refs=0x7f97948a0cc0)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:4843
16 0x00007f97c44d215d in output_rel_bin (be=0x7f9794112190, rel=0x7f97948840b0)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:4896
17 0x00007f97c44ed3a8 in sql_relation2stmt (be=0x7f9794112190, r=0x7f97948840b0)

Reproducible: Always

Steps to Reproduce:

select
ref_0.active as c0
from
sys.sessions as ref_0
right join sys.netcdf_dims as sample_5
on ((true)
or (ref_0.active is NULL))
where ref_0.querytimeout is NULL
limit 106;

Comment 25703

Date: 2017-10-14 19:21:06 +0200
From: MonetDB Mercurial Repository <>

Changeset 43ecd1bf4fce made by Niels Nes niels@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=43ecd1bf4fce

Changeset description:

handle semi/anti join better with constants (fixes bug #6417)

Comment 25704

Date: 2017-10-14 19:25:03 +0200
From: MonetDB Mercurial Repository <>

Changeset 9649c7ed3440 made by Niels Nes niels@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=9649c7ed3440

Changeset description:

add test for bug #6417

Comment 25705

Date: 2017-10-14 19:25:23 +0200
From: @njnes

fixed by handling semi/anti join better

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