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

mserver crashes #2811

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

mserver crashes #2811

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

Comments

@monetdb-team
Copy link

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

Date: 2011-05-16 11:46:58 +0200
From: George Garbis <>
To: SQL devs <>
Version: 11.3.3 (Apr2011-SP1) [obsolete]
CC: charnik, @njnes

Last updated: 2015-05-08 10:28:47 +0200

Comment 15806

Date: 2011-05-16 11:46:58 +0200
From: George Garbis <>

User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.24 (KHTML, like Gecko) Ubuntu/10.10 Chromium/11.0.696.65 Chrome/11.0.696.65 Safari/534.24
Build Identifier:

Giving the query above mserver allocates the whole memory and it is killed by OS when both RAM and SAWP are full.
Even if query is prefixed with EXPLAIN or PLAN the problem still occurs

query.sql:
PLAN SELECT DISTINCT
h3.obj,
CASE
WHEN u_ENDPOINT.value IS NOT NULL THEN u_ENDPOINT.value
WHEN l_ENDPOINT.value IS NOT NULL THEN l_ENDPOINT.value
WHEN ll_ENDPOINT.value IS NOT NULL THEN ll_ENDPOINT.value
WHEN lu_ENDPOINT.value IS NOT NULL THEN lu_ENDPOINT.value
END
FROM
triples t0
INNER JOIN triples h1 ON (h1.pred = 21 AND h1.obj = 42 AND h1.subj = t0.subj)
INNER JOIN triples h2 ON (h2.pred = 5 AND h2.subj = t0.subj)
INNER JOIN triples h3 ON (h3.pred = 20 AND h3.subj = t0.subj)
INNER JOIN triples i4 ON (i4.pred = 28 AND i4.subj = h2.obj)
INNER JOIN triples c5 ON (c5.pred = 8 AND c5.subj = h2.obj)
INNER JOIN triples h6 ON (h6.pred = 11 AND h6.subj = c5.obj)
INNER JOIN triples h7 ON (h7.subj = 50 AND h7.pred = 11 )
LEFT JOIN uri_values u_PROPERTYTYPE ON (u_PROPERTYTYPE.id = i4.obj)
LEFT JOIN long_uri_values lu_PROPERTYTYPE ON (lu_PROPERTYTYPE.id = i4.obj)
LEFT JOIN label_values l_PROPERTYTYPE ON (l_PROPERTYTYPE.id = i4.obj)
LEFT JOIN long_label_values ll_PROPERTYTYPE ON (ll_PROPERTYTYPE.id = i4.obj)
LEFT JOIN geo_values l_SERVICEREGIONGEO ON (l_SERVICEREGIONGEO.id = h6.obj)
LEFT JOIN long_label_values ll_SERVICEREGIONGEO ON (ll_SERVICEREGIONGEO.id = h6.obj)
LEFT JOIN geo_values l_SOLENTGEO ON (l_SOLENTGEO.id = h7.obj)
LEFT JOIN long_label_values ll_SOLENTGEO ON (ll_SOLENTGEO.id = h7.obj)
LEFT JOIN uri_values u_ENDPOINT ON (u_ENDPOINT.id = h3.obj)
LEFT JOIN label_values l_ENDPOINT ON (l_ENDPOINT.id = h3.obj)
LEFT JOIN long_label_values ll_ENDPOINT ON (ll_ENDPOINT.id = h3.obj)
LEFT JOIN long_uri_values lu_ENDPOINT ON (lu_ENDPOINT.id = h3.obj)
WHERE
t0.pred = 2
AND t0.obj = 3
AND (
CASE WHEN NOT(u_PROPERTYTYPE.value IS NULL AND lu_PROPERTYTYPE.value IS NOT NULL AND lu_PROPERTYTYPE.value IS NULL ) AND NOT(u_PROPERTYTYPE.value IS NULL AND lu_PROPERTYTYPE.value IS NULL ) THEN
CASE WHEN u_PROPERTYTYPE.value IS NOT NULL THEN u_PROPERTYTYPE.value
WHEN lu_PROPERTYTYPE.value IS NOT NULL THEN lu_PROPERTYTYPE.value
END
WHEN NOT(l_PROPERTYTYPE.value IS NULL AND ll_PROPERTYTYPE.value IS NOT NULL AND ll_PROPERTYTYPE.value IS NULL ) AND NOT(l_PROPERTYTYPE.value IS NULL AND ll_PROPERTYTYPE.value IS NULL ) THEN
CASE WHEN l_PROPERTYTYPE.value IS NOT NULL THEN l_PROPERTYTYPE.value
WHEN ll_PROPERTYTYPE.value IS NOT NULL THEN ll_PROPERTYTYPE.value
END
END = 'example1'
OR
CASE WHEN NOT(u_PROPERTYTYPE.value IS NULL AND lu_PROPERTYTYPE.value IS NOT NULL AND lu_PROPERTYTYPE.value IS NULL ) AND NOT(u_PROPERTYTYPE.value IS NULL AND lu_PROPERTYTYPE.value IS NULL ) THEN
CASE WHEN u_PROPERTYTYPE.value IS NOT NULL THEN u_PROPERTYTYPE.value
WHEN lu_PROPERTYTYPE.value IS NOT NULL THEN lu_PROPERTYTYPE.value
END
WHEN NOT(l_PROPERTYTYPE.value IS NULL AND ll_PROPERTYTYPE.value IS NOT NULL AND ll_PROPERTYTYPE.value IS NULL ) AND NOT(l_PROPERTYTYPE.value IS NULL AND ll_PROPERTYTYPE.value IS NULL ) THEN
CASE WHEN l_PROPERTYTYPE.value IS NOT NULL THEN l_PROPERTYTYPE.value
WHEN ll_PROPERTYTYPE.value IS NOT NULL THEN ll_PROPERTYTYPE.value
END
END = 'example2'
)
AND (Within(l_SERVICEREGIONGEO.strdfgeo,l_SOLENTGEO.strdfgeo))
;

schema.sql:
CREATE TABLE geo_values (
id integer NOT NULL,
strdfgeo geometry
);

CREATE TABLE label_values (
id integer NOT NULL,
value character varying(255) NOT NULL
);

CREATE TABLE long_label_values (
id integer NOT NULL,
value text NOT NULL
);

CREATE TABLE long_uri_values (
id integer NOT NULL,
value text NOT NULL
);

CREATE TABLE triples (
ctx integer NOT NULL,
subj integer NOT NULL,
pred integer NOT NULL,
obj integer NOT NULL,
expl boolean NOT NULL,
interval_start timestamp,
interval_end timestamp
);

CREATE TABLE uri_values (
id integer NOT NULL,
value character varying(255) NOT NULL
);

Reproducible: Always

Steps to Reproduce:

  1. Create a db (e.g. monetdb create testDB)
  2. Release the db (e.g. monetdb release testDB)
  3. Create the attached schema (e.g. mclient -d testDB < schema.sql)
  4. Run the attached query (e.g. mclient -d testDB < query.sql)

Actual Results:

MAPI = (monetdb) /tmp/.s.monetdb.50000
ACTION= read_line
QUERY = PLAN SELECT DISTINCT
h3.obj,
CASE
WHEN u_ENDPOINT.value IS NOT NULL THEN u_ENDPOINT.value
WHEN l_ENDPOINT.value IS NOT NULL THEN l_ENDPOINT.value
WHEN ll_ENDPOINT.value IS NOT NULL THEN ll_ENDPOINT.value
WHEN lu_ENDPOINT.value IS NOT NULL THEN lu_ENDPOINT.value
END
FROM
triples t0
INNER JOIN triples h1 ON (h1.pred = 21 AND h1.obj = 42 AND h1.subj = t0.subj)
INNER JOIN triples h2 ON (h2.pred = 5 AND h2.subj = t0.subj)
INNER JOIN triples h3 ON (h3.pred = 20 AND h3.subj = t0.subj)

ERROR = !Connection terminated

Expected Results:

The execution plan of the query

Comment 15818

Date: 2011-05-18 14:32:22 +0200
From: @njnes

Changeset 98aa97822a61 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=98aa97822a61

Changeset description:

improved handling of push_select_down / push_down_exp
We now only go through the tree once (topdown).

This solves bug #2811.

Comment 15819

Date: 2011-05-18 14:32:23 +0200
From: @njnes

Changeset 3cfb9218aa1c 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=3cfb9218aa1c

Changeset description:

added test for bug #2811

Comment 15999

Date: 2011-07-29 10:52:40 +0200
From: @sjoerdmullender

The Apr2011-SP2 bugfix release is out.

Comment 20854

Date: 2015-05-08 10:28:47 +0200
From: MonetDB Mercurial Repository <>

Changeset 4d8cbe4e597c made by Foteini Alvanaki foteini.alvanaki@monetdbsolutions.com in the MonetDB repo, refers to this bug.

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

Changeset description:

crash_in_push_exp_down.Bug-2811 updated
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