[MCOL-4330] MDB hangs asking data from I_S.columnstore_extents or I_S.columnstore_files Created: 2020-09-29  Updated: 2020-11-12  Resolved: 2020-10-06

Status: Closed
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: 1.4.3-5, 1.5.3
Fix Version/s: 5.4.1

Type: Bug Priority: Major
Reporter: Roman Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 1
Labels: None

Sprint: 2020-8

 Description   

The problem happens when MCS is restarted but MDB isn't. This causes MDB to point to the deleted BRM segments in shmem b/c MCS recreates them.
4QA To reproduce run MDB+MCS, restart MCS but not MDB and then run this bash snippet to fill ExtentMap

for e in $(seq 0 50); do mysql -e 'create table cs1(i bigint, i2 bigint, i3 bigint, i4 bigint)engine=columnstore' test; mysql -e 'drop table cs1' test; done

Then try to query from information_schema.columnstore_extents. MDB must hang after this.



 Comments   
Comment by David Hall (Inactive) [ 2020-10-01 ]

QA: This is tricky to reproduce. The secret is to:
1) execute select * from information_schema.columnstore_extents; // This sets the reference to shared memory in mysqld
2) restart columnstore "systemctl stop mariadb-columnstore", "systemctl start mariadb-columnstore" // This causes the shared memory reference to be invalidated
3) do something to change the extentmap // This will only be reflected in Other columnstore processes, not mysqld, which has an invalid reference
4) execute select * from information_schema.columnstore_extents; // Access the invalid reference
This last select will not reflect any changes made or may hang or crash.

Here's a concrete example:

Start with no columnstore tables and the system running.
MariaDB [mysql]> select * from  information_schema.columnstore_extents;
Empty set (0.094 sec)

(In another console)
systemctl stop mariadb-columnstore
systemctl start mariadb-columnstore

Run test000.sh to fill up the extent map

MariaDB [mysql]> select * from  information_schema.columnstore_extents;
Empty set (0.094 sec)

(In another console)
systemctl stop mariadb
systemctl start mariadb
Will cause a refresh of the shared memory reference

select * from  information_schema.columnstore_extents;
.
.
.
984 rows in set (0.150 sec)

Comment by Daniel Lee (Inactive) [ 2020-10-06 ]

Build verified: 5.4.1-1 (Drone #870)

Reproduced the issue in 1.5.3-1 and verified the fixed in 5.4.1-1.

For additional data extents, cpimported 10g lineitem source data.

Generated at Thu Feb 08 02:49:32 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.