[MDEV-11789] MariaDB fails to restart after 10.0.29-1.el7 update Created: 2017-01-14 Updated: 2017-03-11 Resolved: 2017-02-27 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Platform RedHat |
| Affects Version/s: | 10.0.29, 10.0.30 |
| Fix Version/s: | 5.5.55, 10.0.30, 10.1.22 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Jarrod Farncomb | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 2 |
| Labels: | None | ||
| Environment: |
CentOS 7.3 |
||
| Issue Links: |
|
||||||||
| Sprint: | 10.0.30 | ||||||||
| Description |
|
A few minutes ago, MariaDB updated on my CentOS 7.3 server as per the below from /var/log/yum.log.
The error when manually performing a restart is shown below:
After further investigation, I found the two SELinux errors from running 'sealert -a /var/log/audit/audit.log'.
For now I have fixed this by creating a local policy and restarting MariaDB, however it appears that by default SELinux prevents /usr/bin/mysqld_safe_helper making use of setuid and setgid which causes it to fail to start back up after the upgrade. I'm not sure if this is a MariaDB specific issue, or MySQL, or maybe even the SELinux policy has changed since the last MariaDB update. |
| Comments |
| Comment by Jarrod Farncomb [ 2017-01-14 ] | ||||||||||||
|
Also wanted to note that I tested a fresh install of 10.0.29 in a new CentOS 7.3 virtual machine, upon trying to start the service with SELinux in enforcing mode I receive the same error, so it appears to be reproducible. | ||||||||||||
| Comment by Hyral Sacai [ 2017-01-17 ] | ||||||||||||
|
Just wanted to chime in here and say that I've also ran into the exact same problem on my CentOS 7.3 server after performing 'yum update' and was able to resolve the issue by running the suggested commands the error logs brought up (with confidence, thanks to Jarrod's article on the issue) | ||||||||||||
| Comment by Kolbe Kegel (Inactive) [ 2017-01-23 ] | ||||||||||||
|
serg at a minimum, the work you did in | ||||||||||||
| Comment by Michael Newton [ 2017-01-24 ] | ||||||||||||
|
For the record, this is also affecting 10.1. I'm running Scientific Linux 6.8, and was impacted by this issue after updating from 10.1.14 to 10.1.21. Based on the logs, it appears in my case to only be denying setgid to the process, not setuid:
Edit: after allowing setgid, then it starts complaining about not being able to do setuid, as in the original report. | ||||||||||||
| Comment by Sergei Golubchik [ 2017-02-23 ] | ||||||||||||
|
kolbe, I took a conservative approach — while we compile and install the file with the policy everywhere, we only enable it on distributions that are known to have the issue. I believed that most distributions didn't restrict setuid/setgid in their policies and it was only CentOS/RHEL that did. May be a conservative approach should've been the opposite, assuming that all distributions restrict setuid/setgid and enable our policy everywhere... I'll do that. | ||||||||||||
| Comment by Jarrod Farncomb [ 2017-03-11 ] | ||||||||||||
|
I have tested MariaDB 10.0.30 on CentOS 7 and this same problem still happens so it does not seem that the bug has been resolved. | ||||||||||||
| Comment by Sergei Golubchik [ 2017-03-11 ] | ||||||||||||
|
Same problem — do you mean it's still "/usr/bin/mysqld_safe_helper: Cannot change uid/gid (errno: 1)" and "SELinux is preventing /usr/bin/mysqld_safe_helper from using the setuid capability." ? Is the new policy installed when you install a 10.0.30 rpm? The post-install script has
So I don't quite see how it could not have been installed. Do you have the /usr/sbin/semodule executable? | ||||||||||||
| Comment by Sergei Golubchik [ 2017-03-11 ] | ||||||||||||
|
Ok, ignore the question, please. I see you created |