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

Assertion error in exp_bin (sqlsmith) #6450

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

Assertion error in exp_bin (sqlsmith) #6450

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels
bug Something isn't working major SQL

Comments

@monetdb-team
Copy link

Date: 2017-10-26 14:13:34 +0200
From: @mlkersten
To: SQL devs <>
Version: -- development
CC: @njnes

Last updated: 2017-12-14 14:46:07 +0100

Comment 25806

Date: 2017-10-26 14:13:34 +0200
From: @mlkersten

User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0
Build Identifier:

3 0x00007f98ae1c6dd2 in __assert_fail () from /lib64/libc.so.6
4 0x00007f98a8c23ef0 in exp_bin (be=0x7f9868006610, e=0x7f9868943e10,
left=0x7f9868a872f0, right=0x7f9868a87420, grp=0x0, ext=0x0, cnt=0x0, sel=0x0)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:564
5 0x00007f98a8c2d1ca in rel2bin_project (be=0x7f9868006610, rel=0x7f9868944c40,
refs=0x7f9868982200, topn=0x0)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:2467
6 0x00007f98a8c37f84 in subrel_bin (be=0x7f9868006610, rel=0x7f9868944c40,
refs=0x7f9868982200)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:4836
7 0x00007f98a8c2a8af in rel2bin_semijoin (be=0x7f9868006610, rel=0x7f9868947d20,
refs=0x7f9868982200)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:1923
8 0x00007f98a8c37eca in subrel_bin (be=0x7f9868006610, rel=0x7f9868947d20,
refs=0x7f9868982200)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:4820
9 0x00007f98a8c2955a in rel2bin_join (be=0x7f9868006610, rel=0x7f9868958f30,
refs=0x7f9868982200)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:1702
10 0x00007f98a8c37e7d in subrel_bin (be=0x7f9868006610, rel=0x7f9868958f30,
refs=0x7f9868982200)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:4813
11 0x00007f98a8c2db4b in rel2bin_select (be=0x7f9868006610, rel=0x7f9868958f60,
refs=0x7f9868982200)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:2591
12 0x00007f98a8c37fb2 in subrel_bin (be=0x7f9868006610, rel=0x7f9868958f60,
refs=0x7f9868982200)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:4840
13 0x00007f98a8c2d0f7 in rel2bin_project (be=0x7f9868006610, rel=0x7f98689303e0,
refs=0x7f9868982200, topn=0x0)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:2455
14 0x00007f98a8c37f84 in subrel_bin (be=0x7f9868006610, rel=0x7f98689303e0,
refs=0x7f9868982200)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:4836
15 0x00007f98a8c2b88a in rel2bin_union (be=0x7f9868006610, rel=0x7f9868930440,
refs=0x7f9868982200)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:2144
16 0x00007f98a8c37ef8 in subrel_bin (be=0x7f9868006610, rel=0x7f9868930440,
refs=0x7f9868982200)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:4824
17 0x00007f98a8c2db4b in rel2bin_select (be=0x7f9868006610, rel=0x7f9868955d70,
refs=0x7f9868982200)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:2591
18 0x00007f98a8c37fb2 in subrel_bin (be=0x7f9868006610, rel=0x7f9868955d70,
refs=0x7f9868982200)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/rel_bin.c:4840
19 0x00007f98a8c2d0f7 in rel2bin_project (be=0x7f9868006610, rel=0x7f9868961d90,
refs=0x7f9868982200, topn=0x7f98689814a0)

Reproducible: Always

Steps to Reproduce:

select
ref_25.columnsize as c0,
ref_11.dim_id as c1,
ref_18.function_id as c2
from
sys.function_languages as ref_9
left join bam.export as ref_10
on (ref_9.language_id = ref_10.flag )
right join sys.netcdf_vardim as ref_11
on (EXISTS (
select
ref_9.language_name as c0,
ref_11.file_id as c1,
ref_11.dimpos as c2,
ref_9.language_name as c3,
ref_10.tlen as c4
from
tmp.idxs as ref_12
where ref_9.language_id is NULL))
left join sys.args as ref_17
left join sys.systemfunctions as ref_18
right join sys.s as ref_19
inner join sys.storage as ref_20
on (ref_19.z = ref_20.schema )
on (ref_18.function_id = ref_20.typewidth )
on (ref_17.type_digits = ref_20.typewidth )
left join sys.storage as ref_25
on (ref_18.function_id is not NULL)
on ((true)
or (ref_10.rname is NULL))
where ref_9.language_name is NULL
limit 158;

Comment 25821

Date: 2017-10-30 08:30:41 +0100
From: @njnes

fixed order of handling the referenced sub queries in the dead code elimination,
ie first using the parents mark the expressions as used. This was done incorrectly leading to to many eliminated expressions.

@monetdb-team monetdb-team added bug Something isn't working major SQL labels Nov 30, 2020
@sjoerdmullender sjoerdmullender added this to the Ancient Release milestone Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working major SQL
Projects
None yet
Development

No branches or pull requests

2 participants