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 hit in the MAL optimiser on a complex query #6119

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

Assertion hit in the MAL optimiser on a complex query #6119

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

Comments

@monetdb-team
Copy link

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

Date: 2016-11-10 16:19:27 +0100
From: Dean De Leo <>
To: SQL devs <>
Version: -- development
CC: martin.van.dinther, @mlkersten, @njnes, @drstmane

Last updated: 2016-12-21 13:07:09 +0100

Comment 24679

Date: 2016-11-10 16:19:27 +0100
From: Dean De Leo <>

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

An assertion in the code is hit with a complex query somewhere in the MAL optimiser. As consequence the DBMS aborts its execution.

On Linux, tip of the default branch, debug build, empty tables, schema attached.

Reproducible: Always

Steps to Reproduce:

  1. Load the attached schema
  2. Issue the attached query
  3. Boom

Actual Results:

The server hits an assertion in the code and aborts, see the attached backtrace.

Comment 24680

Date: 2016-11-10 16:19:58 +0100
From: Dean De Leo <>

Created attachment 503
schema.sql

Attached file: schema.sql (application/sql, 7731 bytes)
Description: schema.sql

Comment 24681

Date: 2016-11-10 16:20:21 +0100
From: Dean De Leo <>

Created attachment 504
query5.sql

Attached file: query5.sql (application/sql, 1028 bytes)
Description: query5.sql

Comment 24682

Date: 2016-11-10 16:20:43 +0100
From: Dean De Leo <>

Created attachment 505
backtrace.txt

Attached file: backtrace5.txt (text/plain, 3293 bytes)
Description: backtrace.txt

Comment 24694

Date: 2016-11-16 18:00:46 +0100
From: Dean De Leo <>

Simpler repro (or related crash):

 DROP TABLE subt;
 DROP TABLE t;
 
 CREATE TABLE subt (A1 BIGINT);
 CREATE TABLE t (B BIGINT);
 
 SELECT (B IN (SELECT A1 FROM subt)) FROM t;
 

Comment 24695

Date: 2016-11-16 18:05:39 +0100
From: @drstmane

The last comment is the same kind of query (and hence problem?) as reported in bug #6121 !??

Comment 24696

Date: 2016-11-17 12:40:00 +0100
From: Martin van Dinther <<martin.van.dinther>>

in default branch (MonetDB 5 server v11.26.0) I get assertion (on mserver5 console):
could not find t.b
L4.L3
mserver5: ../../../dev/monetdb5/optimizer/opt_garbageCollector.c:104: OPTgarbageCollectorImplementation: Assertion `p->token == ENDsymbol' failed.

in Dec2016 branch (MonetDB 5 server v11.25.0) I get assertion (on mserver5 console):
could not find t.b
L4.L3
mserver5: ../../../../dev/sql/backends/monet5/rel_bin.c:2402: rel2bin_project: Assertion `0' failed.

in Jun2016 branch (MonetDB 5 server v11.23.14) I get assertion (on mserver5 console):
could not find t.b
L2.L1
mserver5: ../../../../dev/sql/backends/monet5/rel_bin.c:2391: rel2bin_project: Assertion `0' failed.

Comment 24719

Date: 2016-11-24 18:27:47 +0100
From: MonetDB Mercurial Repository <>

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

Changeset description:

Add test script for bug #6119

Comment 24755

Date: 2016-12-03 15:03:04 +0100
From: @njnes

very hard problem in the apply handling (ie nested subqueries). Fixed by reimplementation of apply

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