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

querying a table with an ordered index on string/varchar column crashes server and makes server unrestartable! #6202

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

Comments

@monetdb-team
Copy link

Date: 2017-02-02 16:04:56 +0100
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <>
Version: 11.25.3 (Dec2016)

Last updated: 2017-03-03 10:24:45 +0100

Comment 24951

Date: 2017-02-02 16:04:56 +0100
From: Martin van Dinther <<martin.van.dinther>>

User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0
Build Identifier:

mserver5 crashes with a segmentation fault. (reproduced it on Linux and on windows).

Restarting the mserver5 again after the crash causes the server to crash automatically again after some 5 seconds (without making any connections).
Only way to resolve that problem is to make a connection and issue a command to remove the ordered index within that 5 seconds time window the server is up!

Reproducible: Always

Steps to Reproduce:

  1. start mserver5 (MonetDB 5 server v11.25.6)
  2. start mclient
  3. run SQL:
    create table test_oidx (c1 int, c2 string);
    insert into test_oidx (c1, c2) values (1, 'ccc'), (2, 'bbb'), (3, 'eee'), (4, 'aaa'), (5, 'ddd');
    select * from test_oidx order by c2, c1;

create ordered index test_oidx1 on test_oidx (c2);
select * from test_oidx order by c2, c1;

drop index test_oidx1;
drop table test_oidx;

Actual Results:

bash-4.3$ mclient -p41000
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.25.6 (unreleased), 'demo'
Type \q to quit, ? for a list of available commands
auto commit mode: on
sql>create table test_oidx (c1 int, c2 string);
operation successful (23.836ms)
sql>insert into test_oidx (c1, c2) values (1, 'ccc'), (2, 'bbb'), (3, 'eee'), (4, 'aaa'), (5, 'ddd');
5 affected rows (13.812ms)
sql>select * from test_oidx order by c2, c1;
+------+------+
| c1 | c2 |
+======+======+
| 4 | aaa |
| 2 | bbb |
| 1 | ccc |
| 5 | ddd |
| 3 | eee |
+------+------+
5 tuples (1.762ms)
sql>create ordered index test_oidx1 on test_oidx (c2);
operation successful (28.573ms)
sql>select * from test_oidx order by c2, c1;
bash-4.3$

Expected Results:

No crash of the mserver5 process

Potentially more datatypes besides string, such as char, varchar, clob, blob, url, inet, uuid, etc. are not yet supported by the ordered index code.
This requires additional tests for each of the MonetDB data types.

Comment 24953

Date: 2017-02-02 16:59:55 +0100
From: MonetDB Mercurial Repository <>

Changeset 62e0e4bcac1e 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=62e0e4bcac1e

Changeset description:

Check for errors.  That's better than crashing.
Fixes bug #6202.

Comment 25125

Date: 2017-03-03 10:24:45 +0100
From: @sjoerdmullender

Dec2016-SP2 has been released, incorporating the fix.

@monetdb-team monetdb-team added bug Something isn't working major 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 major SQL
Projects
None yet
Development

No branches or pull requests

2 participants