Navigation Menu

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 #6294

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

Sqlitelogictest crash #6294

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

Comments

@monetdb-team
Copy link

Date: 2017-04-24 10:51:46 +0200
From: @PedroTadim
To: SQL devs <>
Version: 11.25.15 (Dec2016-SP3)
CC: @njnes

Last updated: 2017-06-12 15:14:51 +0200

Comment 25266

Date: 2017-04-24 10:51:46 +0200
From: @PedroTadim

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

One more sqllitelogictest crash on the SQL layer.

Reproducible: Always

Steps to Reproduce:

  1. CREATE TABLE tab0(pk INTEGER PRIMARY KEY, col0 INTEGER, col1 FLOAT, col2 TEXT, col3 INTEGER, col4 FLOAT, col5 TEXT);
  2. SELECT + 86 / - + 59 + + - col1 + - - 40 FROM tab0 WHERE NOT + col2 IS NOT NULL;

Actual Results:

The server gets a SIGSEGV in a exp_simplify_math function call.

Expected Results:

An empty result set.

The backtrace is bellow. The rewrite function is called recursively many many times.

0 0x00007fffe8d70d3d in exp_simplify_math (sql=0x0, e=0x0, changes=0x0) at rel_optimizer.c:2678
1 0x00007fffe8d7215f in exp_simplify_math (sql=0x7fffb000cf50, e=0x7fffb00ba0e0, changes=0x7fffc47ef874) at rel_optimizer.c:2941
2 0x00007fffe8d721bb in exp_simplify_math (sql=0x7fffb000cf50, e=0x7fffb00ba140, changes=0x7fffc47ef874) at rel_optimizer.c:2944
3 0x00007fffe8d7215f in exp_simplify_math (sql=0x7fffb000cf50, e=0x7fffb00ba3f0, changes=0x7fffc47ef874) at rel_optimizer.c:2941
4 0x00007fffe8d71b82 in exp_simplify_math (sql=0x7fffb000cf50, e=0x7fffb00ba4b0, changes=0x7fffc47ef874) at rel_optimizer.c:2846
5 0x00007fffe8d7234d in rel_simplify_math (changes=0x7fffc47ef874, sql=0x7fffb000cf50, rel=0x7fffb00b8b10) at rel_optimizer.c:2969
6 0x00007fffe8d8afbc in rewrite (sql=0x7fffb000cf50, rel=0x7fffb00b8b10, rewriter=0x7fffe8d721ee <rel_simplify_math>, has_changes=0x7fffc49ed978) at rel_optimizer.c:8637
7 0x00007fffe8d8afee in rewrite (sql=0x7fffb000cf50, rel=0x7fffb00b8b10, rewriter=0x7fffe8d721ee <rel_simplify_math>, has_changes=0x7fffc49ed978) at rel_optimizer.c:8640
8 0x00007fffe8d8afee in rewrite (sql=0x7fffb000cf50, rel=0x7fffb00b8b10, rewriter=0x7fffe8d721ee <rel_simplify_math>, has_changes=0x7fffc49ed978) at rel_optimizer.c:8640
9 0x00007fffe8d8afee in rewrite (sql=0x7fffb000cf50, rel=0x7fffb00b8b10, rewriter=0x7fffe8d721ee <rel_simplify_math>, has_changes=0x7fffc49ed978) at rel_optimizer.c:8640
10 0x00007fffe8d8afee in rewrite (sql=0x7fffb000cf50, rel=0x7fffb00b8b10, rewriter=0x7fffe8d721ee <rel_simplify_math>, has_changes=0x7fffc49ed978) at rel_optimizer.c:8640
11 0x00007fffe8d8afee in rewrite (sql=0x7fffb000cf50, rel=0x7fffb00b8b10, rewriter=0x7fffe8d721ee <rel_simplify_math>, has_changes=0x7fffc49ed978) at rel_optimizer.c:8640
12 0x00007fffe8d8afee in rewrite (sql=0x7fffb000cf50, rel=0x7fffb00b8b10, rewriter=0x7fffe8d721ee <rel_simplify_math>, has_changes=0x7fffc49ed978) at rel_optimizer.c:8640

.....

32648 0x00007fffe8d8afee in rewrite (sql=0x7fffb000cf50, rel=0x7fffb00b8b10, rewriter=0x7fffe8d721ee <rel_simplify_math>, has_changes=0x7fffc49ed978) at rel_optimizer.c:8640
32649 0x00007fffe8d8afee in rewrite (sql=0x7fffb000cf50, rel=0x7fffb00b8b10, rewriter=0x7fffe8d721ee <rel_simplify_math>, has_changes=0x7fffc49ed978) at rel_optimizer.c:8640
32650 0x00007fffe8d8b386 in _rel_optimizer (sql=0x7fffb000cf50, rel=0x7fffb00b8b10, level=0) at rel_optimizer.c:8723
32651 0x00007fffe8d8bc3a in rel_optimizer (sql=0x7fffb000cf50, rel=0x7fffb00b8b10) at rel_optimizer.c:8875
32652 0x00007fffe8c72c94 in sql_symbol2relation (c=0x7fffb000cf50, sym=0x7fffb00b78a0) at sql.c:121
32653 0x00007fffe8c9830c in SQLparser (c=0x7fffea362328) at sql_scenario.c:1091
32654 0x00007ffff79a7f0a in runPhase (c=0x7fffea362328, phase=1) at mal_scenario.c:517
32655 0x00007ffff79a804e in runScenarioBody (c=0x7fffea362328) at mal_scenario.c:550
32656 0x00007ffff79a81f1 in runScenario (c=0x7fffea362328) at mal_scenario.c:579
32657 0x00007ffff79a9d37 in MSserveClient (dummy=0x7fffea362328) at mal_session.c:448
32658 0x00007ffff79a97e1 in MSscheduleClient (command=0x7fffb00008d0 "0", challenge=0x7fffc49eddf0 "r1C1YGQwcK2", fin=0x7fffb0002980, fout=0x7fffbc002b60) at mal_session.c:339
32659 0x00007ffff7a49858 in doChallenge (data=0x7fffbc0008d0) at mal_mapi.c:197
32660 0x00007ffff7633bca in thread_starter (arg=0x7fffbc004c50) at gdk_system.c:485
32661 0x00007ffff4e936ca in start_thread () from /lib64/libpthread.so.0
32662 0x00007ffff4bcdf7f in clone () from /lib64/libc.so.6

Comment 25280

Date: 2017-04-30 23:30:04 +0200
From: MonetDB Mercurial Repository <>

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

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

Changeset description:

fixes for the bugs 6297, 6296, 6294, 6291 and 6291
problems were in various relational optimizers

Comment 25281

Date: 2017-05-02 10:11:02 +0200
From: @PedroTadim

This bug still persists on my machine with the latest changeset of the Dec2016 branch.

Comment 25293

Date: 2017-05-11 14:56:07 +0200
From: MonetDB Mercurial Repository <>

Changeset 7e3ef5acacd0 made by Martin van Dinther martin.van.dinther@monetdbsolutions.com in the MonetDB repo, refers to this bug.

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

Changeset description:

Add test for Bug #6294
@monetdb-team monetdb-team added bug Something isn't working normal 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 normal SQL
Projects
None yet
Development

No branches or pull requests

2 participants