[debian-mysql] Bug#1032047: mariadb-server: Preinst fails if user has mariadb running while system service stopped.
Steven
steven.deherdt at gmail.com
Sun Feb 26 23:49:36 GMT 2023
Package: mariadb-server
Version: 1:10.11.2-1
Severity: normal
X-Debbugs-Cc: steven.deherdt at gmail.com
Dear Maintainer,
I tried to upgrade mariadb-server-10.6 to mariadb-server 10.11.2-1, but it
failed with these errors (part of aptitude's output):
"""
Preparing to unpack .../mysql-common_5.8+1.1.0_all.deb ...
Unpacking mysql-common (5.8+1.1.0) over (5.8+1.0.8) ...
Preparing to unpack .../mariadb-common_1%3a10.11.2-1_all.deb ...
Unpacking mariadb-common (1:10.11.2-1) over (1:10.6.11-2) ...
Preparing to unpack .../default-mysql-server_1.1.0_all.deb ...
Unpacking default-mysql-server (1.1.0) over (1.0.8) ...
(Reading database ... 331692 files and directories currently installed.)
Removing mariadb-server-10.6 (1:10.6.11-2) ...
dpkg: mariadb-server-core-10.6: dependency problems, but removing anyway as you requested:
akonadi-backend-mysql depends on default-mysql-server-core | virtual-mysql-server-core; however:
Package default-mysql-server-core is not installed.
Package virtual-mysql-server-core is not installed.
Package mariadb-server-core-10.6 which provides virtual-mysql-server-core is to be removed.
Removing mariadb-server-core-10.6 (1:10.6.11-2) ...
dpkg: warning: while removing mariadb-server-core-10.6, directory '/usr/share/mysql' not empty so not removed
Selecting previously unselected package mariadb-server-core.
(Reading database ... 331482 files and directories currently installed.)
Preparing to unpack .../mariadb-server-core_1%3a10.11.2-1_amd64.deb ...
Unpacking mariadb-server-core (1:10.11.2-1) ...
Preparing to unpack .../libmariadb3_1%3a10.11.2-1_amd64.deb ...
Unpacking libmariadb3:amd64 (1:10.11.2-1) over (1:10.6.11-2) ...
Preparing to unpack .../default-mysql-client_1.1.0_all.deb ...
Unpacking default-mysql-client (1.1.0) over (1.0.8) ...
dpkg: mariadb-client-10.6: dependency problems, but removing anyway as you requested:
wordpress depends on default-mysql-client | virtual-mysql-client; however:
Package default-mysql-client is not configured yet.
Package virtual-mysql-client is not installed.
Package mariadb-client-10.6 which provides virtual-mysql-client is to be removed.
Package mariadb-client-10.5 which provides virtual-mysql-client is not installed.
Package mariadb-client-10.3 which provides virtual-mysql-client is not installed.
dbconfig-mysql depends on default-mysql-client | virtual-mysql-client; however:
Package default-mysql-client is not configured yet.
Package virtual-mysql-client is not installed.
Package mariadb-client-10.6 which provides virtual-mysql-client is to be removed.
Package mariadb-client-10.5 which provides virtual-mysql-client is not installed.
Package mariadb-client-10.3 which provides virtual-mysql-client is not installed.
(Reading database ... 331590 files and directories currently installed.)
Removing mariadb-client-10.6 (1:10.6.11-2) ...
dpkg: mariadb-client-core-10.6: dependency problems, but removing anyway as you requested:
default-mysql-client-core depends on mariadb-client-core-10.6.
Removing mariadb-client-core-10.6 (1:10.6.11-2) ...
Selecting previously unselected package mariadb-client-core.
(Reading database ... 331476 files and directories currently installed.)
Preparing to unpack .../mariadb-client-core_1%3a10.11.2-1_amd64.deb ...
Unpacking mariadb-client-core (1:10.11.2-1) ...
Preparing to unpack .../default-mysql-client-core_1.1.0_all.deb ...
Unpacking default-mysql-client-core (1.1.0) over (1.0.8) ...
Selecting previously unselected package mariadb-client.
Preparing to unpack .../mariadb-client_1%3a10.11.2-1_amd64.deb ...
Unpacking mariadb-client (1:10.11.2-1) ...
Setting up mysql-common (5.8+1.1.0) ...
Setting up mariadb-common (1:10.11.2-1) ...
Selecting previously unselected package mariadb-server.
(Reading database ... 331590 files and directories currently installed.)
Preparing to unpack .../00-mariadb-server_1%3a10.11.2-1_amd64.deb ...
/var/lib/mysql: found previous version 10.6
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!
dpkg: error processing archive /tmp/apt-dpkg-install-qINyMU/00-mariadb-server_1%3a10.11.2-1_amd64.deb (--unpack):
new mariadb-server package pre-installation script subprocess returned error exit status 1
"""
So if I understand correctly, at the moment of unpacking the new mariadb-server,
there is no system-wide mariadb.service running or indeed any *.service file
present, but I did have akonadiserver running which spawns its own mysqld
process. Thus the stop_server function in preinst fails as it does detect a
mysql process but 'invoke-rc.d mariadb stop' gives an error.
When I manually stopped akonadi's mariadb process, the upgrade went smoothly.
Is this actually intended behaviour? If not this could be a more severe bug
than just 'normal'. Not sure how the upgrade process works exactly, but I
suppose that I didn't run into this problem before as I was just upgrading
the existing package mariadb-server-10.6, instead of removing it and
replacing it by the new mariadb-server.
Thanks for maintaining!
-Steven
-- System Information:
Debian Release: bookworm/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 6.1.0-3-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages mariadb-server depends on:
ii adduser 3.131
ii debconf [debconf-2.0] 1.5.82
ii galera-4 26.4.13-1
ii gawk 1:5.1.0-1
ii iproute2 6.1.0-1
ii libc6 2.36-8
ii libdbi-perl 1.643-4
ii libpam0g 1.5.2-6
ii libssl3 3.0.8-1
ii libstdc++6 12.2.0-14
ii lsof 4.95.0-1
ii mariadb-client 1:10.11.2-1
ii mariadb-common 1:10.11.2-1
ii mariadb-server-core 1:10.11.2-1
ii passwd 1:4.13+dfsg1-1
ii perl 5.36.0-7
ii procps 2:4.0.2-3
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-1
Versions of packages mariadb-server recommends:
ii libhtml-template-perl 2.97-2
ii mariadb-plugin-provider-bzip2 1:10.11.2-1
ii mariadb-plugin-provider-lz4 1:10.11.2-1
ii mariadb-plugin-provider-lzma 1:10.11.2-1
ii mariadb-plugin-provider-lzo 1:10.11.2-1
ii mariadb-plugin-provider-snappy 1:10.11.2-1
ii pv 1.6.20-1
Versions of packages mariadb-server suggests:
ii mailutils [mailx] 1:3.15-3+b2
pn mariadb-test <none>
ii netcat-openbsd 1.219-1
-- debconf information:
mariadb-server/postrm_remove_databases: false
mariadb-server/old_data_directory_saved:
mariadb-server/nis_warning:
More information about the pkg-mysql-maint
mailing list