[debian-mysql] Bug#1035949: mariadb: upgrade issue: mariadb-server-10.5 fails to stop after all other -10.5 packages were removed

Andreas Beckmann anbe at debian.org
Thu May 11 15:46:43 BST 2023


Source: mariadb
Version: 1:10.11.2-1
Severity: serious
User: debian-qa at lists.debian.org
Usertags: piuparts
Control: affects -1 + zoph

Hi,

during a test with piuparts I noticed your package fails to upgrade from
'bullseye'.
It installed fine in 'bullseye', then the upgrade to 'bookworm' fails.

This failure is observable while testing the zoph package.
Since timing is unfortunate and upgrading zoph causes db accesses while
the db is temporarily down, I tried to first upgrade
default-mysql-server (as I usually do in this case) by running
  apt-get install default-mysql-server
immediately after switching sources.list to bookworm (and running
apt-get update to refresh the lists.)

>From the attached log (scroll to the bottom...):

  Upgrading early: default-mysql-server
...
  Starting 2 pkgProblemResolver with broken count: 0
  Done
  The following packages were automatically installed and are no longer required:
    libaio1 libsnappy1v5
  Use 'sudo apt autoremove' to remove them.
  The following additional packages will be installed:
    gcc-12-base libc-bin libc6 libdaxctl1 libkmod2 libndctl6 libpmem1 libssl3
    libstdc++6 liburing2 libzstd1 mariadb-client mariadb-client-core
    mariadb-common mariadb-server mariadb-server-core
  Suggested packages:
    glibc-doc libc-l10n locales libnss-nis libnss-nisplus mailx mariadb-test
    netcat-openbsd
  Recommended packages:
    manpages libdbd-mariadb-perl | libdbd-mysql-perl libterm-readkey-perl
    libhtml-template-perl mariadb-plugin-provider-bzip2
    mariadb-plugin-provider-lz4 mariadb-plugin-provider-lzma
    mariadb-plugin-provider-lzo mariadb-plugin-provider-snappy pv
  The following packages will be REMOVED:
    mariadb-client-10.5 mariadb-client-core-10.5 mariadb-server-10.5
    mariadb-server-core-10.5
  The following NEW packages will be installed:
    gcc-12-base libdaxctl1 libkmod2 libndctl6 libpmem1 libssl3 liburing2
    mariadb-client mariadb-client-core mariadb-server mariadb-server-core
  The following packages will be upgraded:
    default-mysql-server libc-bin libc6 libstdc++6 libzstd1 mariadb-common
  6 upgraded, 11 newly installed, 4 to remove and 189 not upgraded.
  Need to get 21.1 MB of archives.
...
  Preparing to unpack .../libc6_2.36-9_amd64.deb ...
  Unpacking libc6:amd64 (2.36-9) over (2.31-13+deb11u6) ...
  Setting up libc6:amd64 (2.36-9) ...
  Preparing to unpack .../libc-bin_2.36-9_amd64.deb ...
  Unpacking libc-bin (2.36-9) over (2.31-13+deb11u6) ...
  Setting up libc-bin (2.36-9) ...
  Preparing to unpack .../mariadb-common_1%3a10.11.2-1_all.deb ...
  Unpacking mariadb-common (1:10.11.2-1) over (1:10.5.19-0+deb11u2) ...
  Preparing to unpack .../default-mysql-server_1.1.0_all.deb ...
  Unpacking default-mysql-server (1.1.0) over (1.0.7) ...
  dpkg: mariadb-client-10.5: dependency problems, but removing anyway as you requested:
   mariadb-server-10.5 depends on mariadb-client-10.5 (>= 1:10.5.19-0+deb11u2).
   dbconfig-mysql depends on default-mysql-client | virtual-mysql-client; however:
    Package default-mysql-client is not installed.
    Package virtual-mysql-client is not installed.
    Package mariadb-client-10.5 which provides virtual-mysql-client is to be removed.

  Removing mariadb-client-10.5 (1:10.5.19-0+deb11u2) ...
  Removing mariadb-client-core-10.5 (1:10.5.19-0+deb11u2) ...
  dpkg: mariadb-server-10.5: dependency problems, but removing anyway as you requested:
   zoph depends on default-mysql-server | virtual-mysql-server; however:
    Package default-mysql-server is not configured yet.
    Package virtual-mysql-server is not installed.
    Package mariadb-server-10.5 which provides virtual-mysql-server is to be removed.

  Removing mariadb-server-10.5 (1:10.5.19-0+deb11u2) ...
  invoke-rc.d: could not determine current runlevel
  Stopping MariaDB database server: mariadbd [ESC][31mfailed![ESC][39;49m
  invoke-rc.d: initscript mariadb, action "stop" failed.
  dpkg: error processing package mariadb-server-10.5 (--remove):
   installed mariadb-server-10.5 package pre-removal script subprocess returned error exit status 1
  dpkg: too many errors, stopping
  Errors were encountered while processing:
   mariadb-server-10.5
  Processing was halted because there were too many errors.
  E: Sub-process /usr/bin/dpkg returned an error code (1)


Here apt choses a suboptimal removal order: mariadb-server-10.5 gets
removed (and therefore stopped, but that fails) only after
mariadb-client-10.5 and mariadb-client-core-10.5 are already gone.

I have tried the early upgrade scenario only with one other package that
needs it (icinga2-ido-mysql), and there it worked flawless.
Some bits from the log:

...
  Preparing to unpack .../mariadb-common_1%3a10.11.2-1_all.deb ...
  Unpacking mariadb-common (1:10.11.2-1) over (1:10.5.19-0+deb11u2) ...
  Preparing to unpack .../default-mysql-server_1.1.0_all.deb ...
  Unpacking default-mysql-server (1.1.0) over (1.0.7) ...
  Removing mariadb-server-10.5 (1:10.5.19-0+deb11u2) ...
  invoke-rc.d: could not determine current runlevel
  Stopping MariaDB database server: mariadbd.
  Removing mariadb-client-10.5 (1:10.5.19-0+deb11u2) ...
  Removing mariadb-client-core-10.5 (1:10.5.19-0+deb11u2) ...
  Removing mariadb-server-core-10.5 (1:10.5.19-0+deb11u2) ...
...


Do you have a test in you CI that does something equivalent to

* apt-get install default-mysql-server
* sed s/bullseye/bookworm/ sources.list
* apt-get install default-mysql-server # early upgrade
* apt-get dist-upgrade


cheers,

Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zoph_1.0.1-3.log.gz
Type: application/gzip
Size: 26864 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-mysql-maint/attachments/20230511/6eac8035/attachment-0001.gz>


More information about the pkg-mysql-maint mailing list