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

recycler crashes with concurrent transactions #3649

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

recycler crashes with concurrent transactions #3649

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

Comments

@monetdb-team
Copy link

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

Date: 2015-01-14 23:41:36 +0100
From: sorear
To: MonetDB5 devs <>
Version: 11.19.7 (Oct2014-SP1)
CC: @mlkersten

Last updated: 2015-01-29 14:07:28 +0100

Comment 20556

Date: 2015-01-14 23:41:36 +0100
From: sorear

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36
Build Identifier:

There was a crash in RECYCLEdrop on a mserver5 instance today, and I noticed that it's checking that recycleBlk is not null, taking a lock, and then assuming that recycleBlk is still not null - it could have been nulled before the lock-take succeeds.

There appear to be other locking issues in the recycler as the code in the reproduction section crashes in many places.

Reproducible: Always

Steps to Reproduce:

Start and release a database (assumed "test" below), and:

for x in 1 2 ; do perl -MDBI -e 'my $db = DBI->connect("dbi:monetdb:database=test;host=localhost;port=50000", "monetdb", "monetdb"); for (1 .. 1000) { $db->do("SET OPTIMIZER=''recycler_pipe''"); $db->do("SELECT * FROM sys.schemas LIMIT 1"); $db->do("START TRANSACTION"); $db->do("COMMIT") }' & done

Actual Results:

Segfaults almost immediately, but in an unpredictable place.

Expected Results:

No segfaults.

Comment 20558

Date: 2015-01-15 15:01:36 +0100
From: @mlkersten

Thank you for reporting. The Recycler optimizer is alpha-release code and any real-life use case would help its further maturing.
Martin

Comment 20563

Date: 2015-01-20 14:18:36 +0100
From: @mlkersten

Applied the patch in RECYCLEDROP.

Comment 20565

Date: 2015-01-20 18:14:23 +0100
From: MonetDB Mercurial Repository <>

Changeset 22c1bf98c903 made by Martin Kersten mk@cwi.nl in the MonetDB repo, refers to this bug.

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

Changeset description:

Bug #3649 reported fix.
Don't assume variables won't change in a concurrent situation.

Comment 20597

Date: 2015-01-29 14:07:28 +0100
From: @sjoerdmullender

Oct2014-SP2 has been released.

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