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 in complex SQL query #6335

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

Sqlitelogictest crash in complex SQL query #6335

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-06-26 11:11:10 +0200
From: @PedroTadim
To: SQL devs <>
Version: -- development
CC: @njnes

Last updated: 2017-10-26 14:01:28 +0200

Comment 25394

Date: 2017-06-26 11:11:10 +0200
From: @PedroTadim

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

Mserver takes too long processing a single but complex SQL query. After a certain time, it receives a SIGKILL signal.

Reproducible: Always

Steps to Reproduce:

  1. SELECT DISTINCT 8 * + + CASE + NULLIF ( - - CASE - ( 52 ) WHEN + 18 - - COUNT ( * ) THEN + 4 WHEN + + 93 - - ( - 40 ) THEN - - 1 * 27 * MIN ( DISTINCT - 85 ) + - - 29 * - + CASE - CASE - 66 WHEN - + 87 / 51 THEN 25 * 78 END WHEN - 12 * - 38 / + - 64 * - - CASE - - 61 WHEN + - 84 + 83 + + 36 * NULLIF ( - 46, - 21 ) * 21 + - 18 + - 21 THEN + 8 * 45 WHEN + 40 THEN NULL END * 7 THEN NULL WHEN - 8 THEN SUM ( + 62 ) * 44 WHEN - ( - ( + ( 6 ) ) ) THEN + 91 + + 38 ELSE NULL END END, + 57 ) WHEN - CAST ( NULL AS INTEGER ) THEN ( 46 ) ELSE NULL END * - 77;

Actual Results:

The server receives a SIGKILL signal after a while.

Expected Results:

A single NULL value.

The merovingian.log only shows the SIGKILL line:

2017-06-26 10:49:42 MSG merovingian[2946]: database 'db' (26839) was killed by signal SIGKILL

Comment 25529

Date: 2017-07-31 09:58:36 +0200
From: @sjoerdmullender

Something goes seiously wrong in the SQL optimizer. I stopped the execution at a point where the MAL variable stack was 3853412 entries big and still growing. That seems excessive for this query.

Comment 25589

Date: 2017-08-18 13:37:33 +0200
From: MonetDB Mercurial Repository <>

Changeset 484ca02b0773 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=484ca02b0773

Changeset description:

Added test for Bug #6335

Comment 25637

Date: 2017-09-17 09:26:27 +0200
From: @njnes

fixed crash, we now rewrite large expressions into smaller onces (which solves
the explosion when rewriting for division by zero and similar problems)

Comment 25641

Date: 2017-09-17 18:01:40 +0200
From: MonetDB Mercurial Repository <>

Changeset 9ccae5c8d830 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=9ccae5c8d830

Changeset description:

re-implemented declared tables, to solve the side-effect bug #6397.

also lots of fixes for the sqllitelogistest_case bug #6335 (doesn't
crash (or run out of memory) anymore).

Comment 25662

Date: 2017-09-20 12:20:31 +0200
From: @PedroTadim

The crash does not happen anymore, but a MAL error occurs:

!TypeException:user.main[236]:'calc.' undefined in: X_26992:sht := calc.(X_26990:int, X_26991:bte);

So I guess the calc operations are not implemented across numeric data types.

Comment 25724

Date: 2017-10-15 18:57:27 +0200
From: @njnes

The function type problem was caused in the inplace type casting code.

Comment 25725

Date: 2017-10-15 20:25:51 +0200
From: MonetDB Mercurial Repository <>

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

Changeset description:

fixed bug #6335, ie don't do inplace conversions on shared atoms
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