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

crash on select query from sqlitelogictests #6259

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

crash on select query from sqlitelogictests #6259

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-04-12 16:43:26 +0200
From: @PedroTadim
To: SQL devs <>
Version: 11.25.15 (Dec2016-SP3)
CC: @njnes

Last updated: 2017-05-01 13:45:01 +0200

Comment 25213

Date: 2017-04-12 16:43:26 +0200
From: @PedroTadim

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

The server crashes after performing a select query with a long where clause. The problem persists with and without parenthesis in the where clauses.

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 pk FROM tab0 WHERE (col1 < 94.60) AND (col0 < 90) AND col3 >= 40 AND (col0 > 89);

Actual Results:

The server gets an assertion error:
mserver5: gdk_select.c:900: BAT_scanselect: Assertion `!lval || !hval || (*cmp)(tl, th) <= 0' failed.

The backtrace:

0 0x00007ffff4afc91f in raise () from /lib64/libc.so.6
1 0x00007ffff4afe51a in abort () from /lib64/libc.so.6
2 0x00007ffff4af4da7 in __assert_fail_base () from /lib64/libc.so.6
3 0x00007ffff4af4e52 in __assert_fail () from /lib64/libc.so.6
4 0x00007ffff73a7170 in BAT_scanselect (b=0x627b80, s=0x7fff9c0031b0, bn=0x7fff9c003760, tl=0x7fffa7bfc760, th=0x7fffa7bfc770, li=1, hi=1, equi=0, anti=0, lval=1, hval=1, maximum=10, use_imprints=1)
at gdk_select.c:900
5 0x00007ffff73ad62d in BATselect (b=0x627b80, s=0x7fff9c0031b0, tl=0x7fffa7bfc760, th=0x7fffa7bfc770, li=1, hi=1, anti=0) at gdk_select.c:1843
6 0x00007ffff79f9f10 in ALGsubselect2 (result=0x7fffb0130380, bid=0x7fffb01302c0, sid=0x7fffb0130340, low=0x7fffb0130160, high=0x7fffb0130120, li=0x7fffb01303a0 "", hi=0x7fffb01303a0 "",
anti=0x7fffb01303a0 "") at algebra.c:257
7 0x00007ffff7981ca9 in malCommandCall (stk=0x7fffb0130040, pci=0x7fffb0129370) at mal_interpreter.c:117
8 0x00007ffff7984643 in runMALsequence (cntxt=0x7fffea363328, mb=0x7fffb011be00, startpc=14, stoppc=15, stk=0x7fffb0130040, env=0x0, pcicaller=0x0) at mal_interpreter.c:669
9 0x00007ffff79898de in DFLOWworker (T=0x7ffff7d34540 <workers+320>) at mal_dataflow.c:403
10 0x00007ffff4e946ca in start_thread () from /lib64/libpthread.so.0
11 0x00007ffff4bcef7f in clone () from /lib64/libc.so.6

Comment 25214

Date: 2017-04-12 17:02:31 +0200
From: @njnes

I'm unable to repeat the problem using your steps 1/2. Did you also insert some data?

Comment 25215

Date: 2017-04-12 18:02:40 +0200
From: @PedroTadim

Yes!

INSERT INTO tab0 VALUES(0,45,106.20,'qixrh',119,127.82,'lqafj')
INSERT INTO tab0 VALUES(1,47,107.11,'avveo',120,128.36,'tzjrc')
INSERT INTO tab0 VALUES(2,48,108.0,'htssi',121,132.69,'ablzu')
INSERT INTO tab0 VALUES(3,116,109.7,'hvapv',123,133.8,'azmay')
INSERT INTO tab0 VALUES(4,55,110.92,'wffzp',124,134.70,'qjqzu')
INSERT INTO tab0 VALUES(5,117,112.62,'hkmcc',126,135.82,'rfnvr')
INSERT INTO tab0 VALUES(6,119,113.87,'yofgi',127,136.86,'jgucx')
INSERT INTO tab0 VALUES(7,64,114.12,'clvcm',128,137.57,'bywfe')
INSERT INTO tab0 VALUES(8,67,5.69,'htdpm',129,138.11,'tqmqj')
INSERT INTO tab0 VALUES(9,121,115.87,'czgiu',130,139.21,'vqktb')

Comment 25216

Date: 2017-04-12 21:07:15 +0200
From: MonetDB Mercurial Repository <>

Changeset bd6083feb3f7 made by Sjoerd Mullender sjoerd@acm.org in the MonetDB repo, refers to this bug.

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

Changeset description:

After NORMALIZE, range can be empty.
This fixes bug #6259.
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