[debian-mysql] Bug#1050416: mariadb-server fails during installation if akonadi is running

Jonas Andradas j.andradas at gmail.com
Thu Aug 24 11:13:24 BST 2023


Package: mariadb-server
Version: 1:10.11.4-1
Severity: minor
X-Debbugs-Cc: j.andradas at gmail.com

Dear Maintainer,

When installing mariadb-server via apt (apt install mariadb-server), during the
package configuration it looks if other mysqld (or mariadb, I suppose) binaries
are running and attempts to stop them.

When akonadi runs, it uses a mysqld binary to keep its settings, but the start
and stop of this daemon is not managed by a systemd mysql.service or
mariadb.service, but rather by akonadi itself (it could be stopped issuing
`akonadictl stop` for example).

During the installation of mariadb-server, it finds a mysqld binary and
attempts to stop it issuing systemd instructions via mysql.service or
mariadb.service. However, if this is the first installation of mariadb-server,
this fails as there is neither a mariadb.service nor a mysql.service, which
results in the installation, with the error message:

~~~
Preparing to unpack .../mariadb-server_1%3a10.11.4-1_amd64.deb ...
Failed to stop mariadb.service: Unit mariadb.service not loaded.
invoke-rc.d: initscript mariadb, action "stop" failed.
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
Attempt to stop MariaDB/MySQL server returned exitcode 5
There is a MariaDB/MySQL server running, but we failed in our attempts to stop
it.
Stop it yourself and try again!
~~~

The conflicting process was:

~~~
/usr/sbin/mysqld --defaults-file=/home/USER/.local/share/akonadi/mysql.conf
--datadir=/home/USER/.local/share/akonadi/db_data/
--socket=/run/user/1000/akonadi/mysql.socket --pid-
file=/run/user/1000/akonadi/mysql.pid
~~~

Since akonadi might be fairly common if people use KDE or any akonadi
application, it might make sense to either propose stopping and starting
akonadi during the install process (which might have its own complications as
it could interfere with the akonadi applications running, and each interactive
user would have its own process), or suggest how to stop it (if we want to make
it easy for users that might not know akonadi is spawning a mysqld process).

Given that instructions are given (e.g. "Stop it yourself and try again!") and
that it might not be easy to action the stop/start of akonadi reliably during
the installation process, I am raising this with 'minor' severity.

Thanks in advance,
Jonas.


-- System Information:
Debian Release: trixie/sid
  APT prefers stable-security
  APT policy: (500, 'stable-security'), (500, 'unstable'), (500, 'stable')
merged-usr: no
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.4.0-3-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages mariadb-server depends on:
ii  adduser                3.137
ii  debconf [debconf-2.0]  1.5.82
ii  galera-4               26.4.13-1
ii  gawk                   1:5.2.1-2
ii  iproute2               6.4.0-1
ii  libc6                  2.37-7
ii  libdbi-perl            1.643-4
ii  libpam0g               1.5.2-7
ii  libssl3                3.0.10-1
ii  libstdc++6             13.2.0-2
ii  lsof                   4.95.0-1
ii  mariadb-client         1:10.11.4-1
ii  mariadb-common         1:10.11.4-1
ii  mariadb-server-core    1:10.11.4-1
ii  passwd                 1:4.13+dfsg1-1+b1
ii  perl                   5.36.0-8
ii  procps                 2:4.0.3-1
ii  psmisc                 23.6-1
ii  rsync                  3.2.7-1
ii  socat                  1.7.4.4-2
ii  zlib1g                 1:1.2.13.dfsg-3

Versions of packages mariadb-server recommends:
ii  libhtml-template-perl           2.97-2
ii  mariadb-plugin-provider-bzip2   1:10.11.4-1
ii  mariadb-plugin-provider-lz4     1:10.11.4-1
ii  mariadb-plugin-provider-lzma    1:10.11.4-1
ii  mariadb-plugin-provider-lzo     1:10.11.4-1
ii  mariadb-plugin-provider-snappy  1:10.11.4-1
ii  pv                              1.7.24-1

Versions of packages mariadb-server suggests:
ii  mailutils [mailx]  1:3.16-1
pn  mariadb-test       <none>
ii  netcat-openbsd     1.225-1

-- debconf information:
  mariadb-server/postrm_remove_databases: false
  mariadb-server/nis_warning:
  mariadb-server/old_data_directory_saved:



More information about the pkg-mysql-maint mailing list