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 after adding an ordered index on sys.statistics column and querying sys.statistics #6251

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-03-23 17:33:25 +0100
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <>
Version: 11.25.9 (Dec2016-SP2)
CC: @njnes

Last updated: 2019-09-27 15:08:41 +0200

Comment 25174

Date: 2017-03-23 17:33:25 +0100
From: Martin van Dinther <<martin.van.dinther>>

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

Segmentation fault in mserver5 process after creating an ordered index on system table statistics and querying the sys.statistics table.

Also should we allow users to add an ordered indexes on any system table?
Probably not. If not allowed, we should check and return an error in the create ordered index code.

Reproducible: Always

Steps to Reproduce:

ANALYZE sys.statistics;
SELECT * FROM sys.statistics;

-- update the values for sample, count, unique, nils, minval, maxval, sorted, revsorted of sys.statistics
ANALYZE sys.statistics;
SELECT * FROM sys.statistics;

CREATE ORDERED INDEX stat_oidx ON sys.statistics (width);
SELECT * FROM sys.statistics;
-- now mserver5 is crashed !!

Expected Results:

No segmentation fault & crash of mserver5 process.

Comment 25175

Date: 2017-03-23 17:57:04 +0100
From: MonetDB Mercurial Repository <>

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

Changeset description:

Add test for Bug #6251 (Crash after adding an ordered index on sys.statistics column and querying sys.statistics)

Comment 25176

Date: 2017-03-23 18:10:02 +0100
From: Martin van Dinther <<martin.van.dinther>>

Restarting the mserver5 again after the crash causes the server to crash automatically again after some 5 seconds (without making any connections)!

The only way to resolve that problem is to make a connection with mclient and issue a command to remove the ordered index (DROP INDEX stat_oidx;) within that 5 seconds time-window the server is up.

Comment 25182

Date: 2017-03-29 11:17:19 +0200
From: @njnes

was fixed (made sure we do not run storage functions on indices without storaged data)

Comment 27331

Date: 2019-09-27 15:08:41 +0200
From: MonetDB Mercurial Repository <>

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

Changeset description:

Don't output the row with type value timestamp from bug #6251 test.

On Windows the timestamp precision is less tan on UNIX, so the output values of stamp column are the same, causing wrong output. At the same time, there is a probability for all values of stamp column to generated with the same timestamp, making the test non-deterministic.

Also backported recent bugfixes from Nov2019 branch.
@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