Date: 2016-04-05 15:00:32 +0200
From: Richard Hughes <<richard.monetdb>>
To: SQL devs <>
Version: 11.21.17 (Jul2015-SP3)
CC: @njnes
Last updated: 2016-06-23 10:24:21 +0200
Comment 22012
Date: 2016-04-05 15:00:32 +0200
From: Richard Hughes <<richard.monetdb>>
I spotted this when reading through the code, so I don't have a reproduction recipe or a clear idea of how to provoke it. Can I ask somebody to take a look and confirm my suspicions:
sql/storage/store.c:1639 (in current Jul2015):
while (store_nr_active) { /* find a moment to flush */
MT_lock_unset(&bs_lock, "store_manager");
MT_sleep_ms(50);
if (GDKexiting())
continue;
MT_lock_set(&bs_lock, "store_manager");
}
If GDKexiting() then it looks to me like you will double-unlock bs_lock, either at line 1640 (if store_nr_active!=0 still) or line 1652 (otherwise). Either way you'll go into undefined behaviour.
Date: 2016-04-05 15:00:32 +0200
From: Richard Hughes <<richard.monetdb>>
To: SQL devs <>
Version: 11.21.17 (Jul2015-SP3)
CC: @njnes
Last updated: 2016-06-23 10:24:21 +0200
Comment 22012
Date: 2016-04-05 15:00:32 +0200
From: Richard Hughes <<richard.monetdb>>
I spotted this when reading through the code, so I don't have a reproduction recipe or a clear idea of how to provoke it. Can I ask somebody to take a look and confirm my suspicions:
sql/storage/store.c:1639 (in current Jul2015):
while (store_nr_active) { /* find a moment to flush */
MT_lock_unset(&bs_lock, "store_manager");
MT_sleep_ms(50);
if (GDKexiting())
continue;
MT_lock_set(&bs_lock, "store_manager");
}
If GDKexiting() then it looks to me like you will double-unlock bs_lock, either at line 1640 (if store_nr_active!=0 still) or line 1652 (otherwise). Either way you'll go into undefined behaviour.
Comment 22013
Date: 2016-04-05 15:31:03 +0200
From: @sjoerdmullender
I think you're right. I think that continue should be a return. And I'm also not happy about the other continue.
I'll fix it.
Comment 22014
Date: 2016-04-05 15:33:26 +0200
From: MonetDB Mercurial Repository <>
Changeset e7474ae2fc10 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=e7474ae2fc10
Changeset description:
The text was updated successfully, but these errors were encountered: