Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.5
-
None
-
None
-
CentOS 7
Description
I noticed this when doing an upgrade from 10.3 to 10.5 – if you try to view the "--help" output after installing 10.5 but prior to starting it, the command would migrate the ib logfiles. Since I was running "mysqld --help" as root, the new ib_logfile0 had root ownership, which prevented mariadb from starting.
The behavior started in 10.5 – 10.4 does not exhibit this.
It's not a major issue (seems very edge-case) – but it was not clear if it was an intentional change. I was advised to go ahead and file a JIRA case about this in the zulip chat.
Comparing the stderr from the help output on 10.3 vs 10.5 also shows that 10.5 tries to lock datadir files:
[root@redacted1 ~]# systemctl status mariadb.service
|
● mariadb.service - MariaDB 10.3.28 database server
|
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
|
Drop-In: /etc/systemd/system/mariadb.service.d
|
└─migrated-from-my.cnf-settings.conf
|
Active: active (running) since Tue 2021-04-06 10:10:57 CDT; 16min ago
|
Docs: man:mysqld(8)
|
https://mariadb.com/kb/en/library/systemd/
|
Main PID: 4887 (mysqld)
|
Status: "Taking your SQL requests now..."
|
CGroup: /system.slice/mariadb.service
|
└─4887 /usr/sbin/mysqld
|
|
Apr 06 10:10:56 redacted1 systemd[1]: Starting MariaDB 10.3.28 database server...
|
Apr 06 10:10:57 redacted1 mysqld[4887]: 2021-04-06 10:10:57 0 [Note] /usr/sbin/mysqld (mysqld 10.3.28-MariaDB) starting as process 4887 ...
|
Apr 06 10:10:57 redacted1 systemd[1]: Started MariaDB 10.3.28 database server.
|
[root@redacted1 ~]#
|
[root@redacted1 ~]# mysqld --defaults-file=/etc/my.cnf --help --verbose >/dev/null
|
2021-04-06 10:27:24 0 [Note] Plugin 'FEEDBACK' is disabled.
|
2021-04-06 10:27:24 0 [Warning] Could not open mysql.plugin table. Some options may be missing from the help text
|
[root@redacted2 ~]# systemctl status mariadb.service
|
● mariadb.service - MariaDB 10.5.9 database server
|
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
|
Drop-In: /etc/systemd/system/mariadb.service.d
|
└─migrated-from-my.cnf-settings.conf
|
Active: active (running) since Tue 2021-04-06 09:20:25 CDT; 1h 7min ago
|
Docs: man:mariadbd(8)
|
https://mariadb.com/kb/en/library/systemd/
|
Process: 6102 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
|
Process: 6061 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
|
Process: 6059 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
|
Main PID: 6087 (mariadbd)
|
Status: "Taking your SQL requests now..."
|
CGroup: /system.slice/mariadb.service
|
└─6087 /usr/sbin/mariadbd
|
|
Apr 06 09:20:25 redacted2 systemd[1]: Starting MariaDB 10.5.9 database server...
|
Apr 06 09:20:25 redacted2 mariadbd[6087]: 2021-04-06 9:20:25 0 [Note] /usr/sbin/mariadbd (mysqld 10.5.9-MariaDB) starting as process 6087 ...
|
Apr 06 09:20:25 redacted2 systemd[1]: Started MariaDB 10.5.9 database server.
|
[root@redacted2 ~]#
|
[root@redacted2 ~]# mysqld --defaults-file=/etc/my.cnf --help --verbose >/dev/null
|
2021-04-06 10:27:31 0 [ERROR] mysqld: Can't lock aria control file '/var/lib/mysql/aria_log_control' for exclusive use, error: 11. Will retry for 0 seconds
|
2021-04-06 10:27:31 0 [ERROR] Plugin 'Aria' init function returned error.
|
2021-04-06 10:27:31 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
|
2021-04-06 10:27:31 0 [Warning] Could not open mysql.plugin table: "Unknown storage engine 'Aria'". Some options may be missing from the help text
|
[root@redacted2 ~]#
|
I would not expect "mariadbd --help" to attempt to lock the aria log or change any files within the datadir.
I cannot think of anything in InnoDB that would have changed this. If there is a regression, it ought to be in the server core, which parses command line options and starts the storage engine plugins.