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 aggregation query #6586

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

Sqlitelogictest crash on complex aggregation query #6586

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

Comments

@monetdb-team
Copy link

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

Date: 2018-04-20 10:43:01 +0200
From: @PedroTadim
To: SQL devs <>
Version: -- development
CC: martin.van.dinther, @njnes

Last updated: 2018-08-31 13:23:15 +0200

Comment 26387

Date: 2018-04-20 10:43: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 on rel_bin.c. This bug only happens on default branch.

Reproducible: Always

Steps to Reproduce:

  1. SELECT - 59 + - 66, - 66 * + - COUNT ( ALL COALESCE ( NULLIF ( 90, + COALESCE ( - 67, 72 + - 30 ) + 17 ), 90 + 96, + 63 ) ) AS col1;

Actual Results:

mserver5: rel_bin.c:605: exp_bin: Assertion `s' failed.

Expected Results:

A single row with values -125 and 66

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=0x7fffe84fda58 "s", file=file@entry=0x7fffe84fd9e8 "rel_bin.c",
line=line@entry=605, function=function@entry=0x7fffe84fe228 <PRETTY_FUNCTION.18631> "exp_bin") at assert.c:92
3 0x00007ffff4778ff2 in __GI___assert_fail (assertion=0x7fffe84fda58 "s", file=0x7fffe84fd9e8 "rel_bin.c", line=605, function=0x7fffe84fe228 <PRETTY_FUNCTION.18631> "exp_bin") at assert.c:101
4 0x00007fffe8382226 in exp_bin (be=0x7fffb0002b60, e=0x7fffb02348b0, left=0x0, right=0x7fffb0375e10, grp=0x0, ext=0x0, cnt=0x0, sel=0x0) at rel_bin.c:605
5 0x00007fffe8381612 in exp_bin (be=0x7fffb0002b60, e=0x7fffb0234c90, left=0x0, right=0x7fffb0375e10, grp=0x0, ext=0x0, cnt=0x0, sel=0x0) at rel_bin.c:480
6 0x00007fffe838b536 in rel2bin_project (be=0x7fffb0002b60, rel=0x7fffb0230670, refs=0x7fffb0375cc0, topn=0x0) at rel_bin.c:2510
7 0x00007fffe8397120 in subrel_bin (be=0x7fffb0002b60, rel=0x7fffb0230670, refs=0x7fffb0375cc0) at rel_bin.c:5097
8 0x00007fffe838b463 in rel2bin_project (be=0x7fffb0002b60, rel=0x7fffb0232a40, refs=0x7fffb0375cc0, topn=0x0) at rel_bin.c:2498
9 0x00007fffe8397120 in subrel_bin (be=0x7fffb0002b60, rel=0x7fffb0232a40, refs=0x7fffb0375cc0) at rel_bin.c:5097
10 0x00007fffe838c3f1 in rel2bin_groupby (be=0x7fffb0002b60, rel=0x7fffb02303c0, refs=0x7fffb0375cc0) at rel_bin.c:2715
11 0x00007fffe839717c in subrel_bin (be=0x7fffb0002b60, rel=0x7fffb02303c0, refs=0x7fffb0375cc0) at rel_bin.c:5105
12 0x00007fffe838b463 in rel2bin_project (be=0x7fffb0002b60, rel=0x7fffb0229d00, refs=0x7fffb0375cc0, topn=0x0) at rel_bin.c:2498
13 0x00007fffe8397120 in subrel_bin (be=0x7fffb0002b60, rel=0x7fffb0229d00, refs=0x7fffb0375cc0) at rel_bin.c:5097
14 0x00007fffe838b463 in rel2bin_project (be=0x7fffb0002b60, rel=0x7fffb022a890, refs=0x7fffb0375cc0, topn=0x0) at rel_bin.c:2498
15 0x00007fffe8397120 in subrel_bin (be=0x7fffb0002b60, rel=0x7fffb022a890, refs=0x7fffb0375cc0) at rel_bin.c:5097
16 0x00007fffe838b463 in rel2bin_project (be=0x7fffb0002b60, rel=0x7fffb02375a0, refs=0x7fffb0375cc0, topn=0x0) at rel_bin.c:2498
17 0x00007fffe8397120 in subrel_bin (be=0x7fffb0002b60, rel=0x7fffb02375a0, refs=0x7fffb0375cc0) at rel_bin.c:5097
18 0x00007fffe8397413 in _subrel_bin (be=0x7fffb0002b60, rel=0x7fffb02375a0, refs=0x7fffb0375cc0) at rel_bin.c:5160
19 0x00007fffe8397526 in output_rel_bin (be=0x7fffb0002b60, rel=0x7fffb02375a0) at rel_bin.c:5183
20 0x00007fffe83b42c0 in sql_relation2stmt (be=0x7fffb0002b60, r=0x7fffb02375a0) at sql_gencode.c:608
21 0x00007fffe83b44b3 in backend_dumpstmt (be=0x7fffb0002b60, mb=0x7fffb00691c0, r=0x7fffb02375a0, top=1, add_end=0,
query=0x1a73a30 "select - 59 + - 66, - 66 * + - count ( all coalesce ( nullif ( 90, + coalesce ( - 67, 72 + - 30 ) + 17 ), 90 + 96, + 63 ) ) as col1;") at sql_gencode.c:648
22 0x00007fffe83754f4 in SQLparser (c=0x7fffe973c368) at sql_scenario.c:1195
23 0x00007ffff7a0d9eb in runPhase (c=0x7fffe973c368, phase=1) at mal_scenario.c:510
24 0x00007ffff7a0daf4 in runScenarioBody (c=0x7fffe973c368, once=0) at mal_scenario.c:532
25 0x00007ffff7a0ddad in runScenario (c=0x7fffe973c368, once=0) at mal_scenario.c:569
26 0x00007ffff7a0fcdf in MSserveClient (dummy=0x7fffe973c368) at mal_session.c:519
27 0x00007ffff7a0f7d4 in MSscheduleClient (command=0x7fffb0000b30 "0", challenge=0x7fffc72ecd9b "6LXsnZvzFMe", fin=0x1801b50, fout=0x7fffc0002d90, protocol=PROTOCOL_9, blocksize=8190, compute_column_widths=0)
at mal_session.c:397
28 0x00007ffff7ab150e in doChallenge (data=0x1801b60) at mal_mapi.c:279
29 0x00007ffff769787c in thread_starter (arg=0x9afa40) at gdk_system.c:476
30 0x00007ffff4b0950b in start_thread (arg=0x7fffc72ed700) at pthread_create.c:465
31 0x00007ffff484116f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Comment 26389

Date: 2018-04-20 11:07:40 +0200
From: MonetDB Mercurial Repository <>

Changeset bddfde338d15 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=bddfde338d15

Changeset description:

Added test for bug #6586

Comment 26390

Date: 2018-04-20 15:56:08 +0200
From: MonetDB Mercurial Repository <>

Changeset 7c2cd5b6f4bf 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=7c2cd5b6f4bf

Changeset description:

fixes for bug #6586 (also fixed div by zero problems)
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