[MCOL-1579] ColumnStore as root crashes processes using shm Created: 2018-07-23  Updated: 2018-08-08  Resolved: 2018-08-08

Status: Closed
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: None
Fix Version/s: 1.1.6

Type: Bug Priority: Major
Reporter: Andrew Hutchings (Inactive) Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Sprint: 2018-15, 2018-16

 Description   

When ColumnStore is run as root it sets /dev/shm to 755 (I believe in ProcMon). If you are running any non-root process that is not ColumnStore that requires /dev/shm then it will instantly crash when ColumnStore starts and not be able to start again.

An example on a dev machine would be running a web browser at the same time. But third party system monitoring / deployment systems could be affected too.



 Comments   
Comment by Andrew Hutchings (Inactive) [ 2018-07-23 ]

I don't think we need to change the permissions of the path at all. It should be 777 by default but there was a CentOS 7 bug which was fixed last year which accidentally set it as 755.

Comment by Andrew Hutchings (Inactive) [ 2018-07-23 ]

For QA:

You can run something that uses mmap() with MAP_SHARED such as a web browser as an unprivileged user whilst ColumnStore runs as root with this patch.

Comment by Daniel Lee (Inactive) [ 2018-08-08 ]

Build verified: 1.1.6-1 source

/root/columnstore/mariadb-columnstore-server
commit 513775738f72ec990d055a5d47e2511e3c0e34dd
Merge: 3c37210 9236098
Author: Andrew Hutchings <andrew@linuxjedi.co.uk>
Date: Wed Jul 18 09:37:17 2018 +0100

Merge pull request #123 from drrtuy/MCOL-970

MCOL-970 Slow query log now contains original query even in vtable mode

/root/columnstore/mariadb-columnstore-server/mariadb-columnstore-engine
commit ee40c3ac050ad7b64302673fc4ab08640f64892f
Merge: 0df1b92 979d00a
Author: benthompson15 <ben.thompson@mariadb.com>
Date: Mon Aug 6 13:02:08 2018 -0500

Merge pull request #523 from mariadb-corporation/MCOL-1579

MCOL-1579 Remove chmod of /dev/shm

Reproduced the issue in 1.1.5-1, /dev/shm is only writable by root. In 1.1.6-1, it is now also writable by group and world.

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