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

Sqlitelogictest crash on complex on complex expression #6589

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

Sqlitelogictest crash on complex on complex expression #6589

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

Comments

@monetdb-team
Copy link

Date: 2018-04-21 16:47:01 +0200
From: @PedroTadim
To: SQL devs <>
Version: 11.29.3 (Mar2018)
CC: @njnes

Last updated: 2018-06-20 11:02:14 +0200

Comment 26400

Date: 2018-04-21 16:47:01 +0200
From: @PedroTadim

User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36
Build Identifier:

Run the query bellow for an assertion error in rel_bin.c.
Quick note: This query is also crashing on Mar2018 branch.

Reproducible: Always

Steps to Reproduce:

  1. SELECT DISTINCT + - 82 * + 26 - 12 * + - 27 * + + CASE WHEN NOT NULL IN ( - 69, ( + SUM ( DISTINCT CAST ( NULL AS INTEGER ) ) ) + + MAX ( - 6 ) + + - COUNT ( * ) / - - ( + 77 ) + 37, + 44, - - 0 * + + 23, - - 86, 3, 12 ) THEN + 41 WHEN NOT - 21 / - 95 IS NOT NULL THEN 63 END AS col0;

Actual Results:

Assertion error:
mserver5: rel_bin.c:576: exp_bin: Assertion `s' failed

Expected Results:

A single NULL value.

Backtrace:

0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
1 0x00007ffff4781c41 in __GI_abort () at abort.c:79
2 0x00007ffff4778f7a in __assert_fail_base (fmt=0x7ffff48c9260 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7fffe84fdb78 "s", file=file@entry=0x7fffe84fdb08 "rel_bin.c",
line=line@entry=576, function=function@entry=0x7fffe84fe348 <PRETTY_FUNCTION.18608> "exp_bin") at assert.c:92
3 0x00007ffff4778ff2 in __GI___assert_fail (assertion=0x7fffe84fdb78 "s", file=0x7fffe84fdb08 "rel_bin.c", line=576, function=0x7fffe84fe348 <PRETTY_FUNCTION.18608> "exp_bin") at assert.c:101
4 0x00007fffe8383d0e in exp_bin (be=0x7fffb0002b60, e=0x7fffb00f19c0, left=0x7fffb010e080, right=0x7fffb0142470, grp=0x0, ext=0x0, cnt=0x0, sel=0x0) at rel_bin.c:576
5 0x00007fffe83831a2 in exp_bin (be=0x7fffb0002b60, e=0x7fffb00ff440, left=0x7fffb010e080, right=0x7fffb0142470, grp=0x0, ext=0x0, cnt=0x0, sel=0x0) at rel_bin.c:450
6 0x00007fffe838d003 in rel2bin_project (be=0x7fffb0002b60, rel=0x7fffb00f9130, refs=0x7fffb010c520, topn=0x0) at rel_bin.c:2481
7 0x00007fffe8398bed in subrel_bin (be=0x7fffb0002b60, rel=0x7fffb00f9130, refs=0x7fffb010c520) at rel_bin.c:5068
8 0x00007fffe838cf30 in rel2bin_project (be=0x7fffb0002b60, rel=0x7fffb00fe7a0, refs=0x7fffb010c520, topn=0x0) at rel_bin.c:2469
9 0x00007fffe8398bed in subrel_bin (be=0x7fffb0002b60, rel=0x7fffb00fe7a0, refs=0x7fffb010c520) at rel_bin.c:5068
10 0x00007fffe8398ee0 in _subrel_bin (be=0x7fffb0002b60, rel=0x7fffb00fe7a0, refs=0x7fffb010c520) at rel_bin.c:5131
11 0x00007fffe8398ff3 in output_rel_bin (be=0x7fffb0002b60, rel=0x7fffb00fe7a0) at rel_bin.c:5154
12 0x00007fffe83b5423 in sql_relation2stmt (be=0x7fffb0002b60, r=0x7fffb00fe7a0) at sql_gencode.c:542
13 0x00007fffe83b5616 in backend_dumpstmt (be=0x7fffb0002b60, mb=0x7fffb00e9150, r=0x7fffb00fe7a0, top=1, add_end=0,
query=0x7fffb00e9310 "select distinct + - 82 * + 26 - 12 * + - 27 * + + case when not null in ( - 69, ( + sum ( distinct cast ( null as integer ) ) ) + + max ( - 6 ) + + - count ( * ) / - - ( + 77 ) + 37, + 44, - - 0 * + +"...) at sql_gencode.c:582
14 0x00007fffe83775df in SQLparser (c=0x7fffe973c368) at sql_scenario.c:1195
15 0x00007ffff7a0f378 in runPhase (c=0x7fffe973c368, phase=1) at mal_scenario.c:510
16 0x00007ffff7a0f481 in runScenarioBody (c=0x7fffe973c368, once=0) at mal_scenario.c:532
17 0x00007ffff7a0f73a in runScenario (c=0x7fffe973c368, once=0) at mal_scenario.c:569
18 0x00007ffff7a11666 in MSserveClient (dummy=0x7fffe973c368) at mal_session.c:519
19 0x00007ffff7a11161 in MSscheduleClient (command=0x7fffb0000b30 "0", challenge=0x7fffc72ecd9b "cslQC9fFutE", fin=0x1813590, fout=0x7fffc0002d90, protocol=PROTOCOL_9, blocksize=8190, compute_column_widths=0)
at mal_session.c:397
20 0x00007ffff7ab22c8 in doChallenge (data=0x18135a0) at mal_mapi.c:279
21 0x00007ffff76989ec in thread_starter (arg=0x9c3930) at gdk_system.c:476
22 0x00007ffff4b0950b in start_thread (arg=0x7fffc72ed700) at pthread_create.c:465
23 0x00007ffff484116f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Comment 26401

Date: 2018-04-21 16:47:23 +0200
From: MonetDB Mercurial Repository <>

Changeset 64f13600ec9e made by Pedro Ferreira pedro.ferreira@monetdbsolutions.com in the MonetDB repo, refers to this bug.

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

Changeset description:

Added test for bug #6589

Comment 26402

Date: 2018-04-22 11:54:17 +0200
From: MonetDB Mercurial Repository <>

Changeset 354f2d85e58b 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=354f2d85e58b

Changeset description:

fixes for bug #6589
@monetdb-team monetdb-team added bug Something isn't working minor 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 minor SQL
Projects
None yet
Development

No branches or pull requests

2 participants