I did a few upgrades from 1:10.11.18+deb12u1 to 1:10.11.19+deb12u1. Most of these worked fine, but in one case, mariadb failed to stop. I think this was because mariadb was running under socket activation but there must have been other factors at play. I have not been able to determine what the critical factor was; the couple of others I checked were running under socket activation.
I did check for /var/run paths to the socket in the config, this was only found in my.cnf.fallback. debian.cnf contains (sans comments) [client] host = localhost user = root protocol = socket [mysql_upgrade] host = localhost user = root protocol = socket The upgrade started normally enough # apt upgrade Reading package lists... Done Building dependency tree... Done Reading state information... Done Calculating upgrade... Done The following packages will be upgraded: mariadb-backup mariadb-client mariadb-client-core mariadb-server mariadb-server-core 5 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 21.5 MB of archives. After this operation, 636 kB of additional disk space will be used. Do you want to continue? [Y/n] ... Fetched 21.5 MB in 3s (8,258 kB/s) Reading changelogs... Done Preconfiguring packages ... (Reading database ... 86799 files and directories currently installed.) Preparing to unpack .../mariadb-backup_1%3a10.11.19-0+deb12u1_amd64.deb ... Unpacking mariadb-backup (1:10.11.19-0+deb12u1) over (1:10.11.18-0+deb12u1) ... Preparing to unpack .../mariadb-server_1%3a10.11.19-0+deb12u1_amd64.deb ... Warning: Stopping mariadb.service, but it can still be activated by: mariadb.socket /var/lib/mysql: found previous version 10.11 at this point dpkg was stuck: # ps -fade|grep maria root 536865 536570 0 11:13 pts/4 00:00:00 /usr/bin/dpkg --status-fd 45 --no-triggers --unpack --auto-deconfigure /var/cache/apt/archives/mariadb-backup_1%3a10.11.19-0+deb12u1_amd64.deb /var/cache/apt/archives/mariadb-server_1%3a10.11.19-0+deb12u1_amd64.deb /var/cache/apt/archives/mariadb-server-core_1%3a10.11.19-0+deb12u1_amd64.deb /var/cache/apt/archives/mariadb-client-core_1%3a10.11.19-0+deb12u1_amd64.deb /var/cache/apt/archives/mariadb-client_1%3a10.11.19-0+deb12u1_amd64. mysql 537002 1 0 11:13 ? 00:00:01 /usr/sbin/mariadbd root 537018 537007 0 11:13 pts/4 00:00:00 /bin/sh /usr/sbin/invoke-rc.d mariadb stop root 537021 537018 0 11:13 pts/4 00:00:00 systemctl stop mariadb.service 'systemctl status mariadb' was showing Active: deactivating (final-sigterm) (Result: timeout) TriggeredBy: * mariadb.socket Eventually I killed the shell doing the restart (537018) and then dpkg (536570). /var/lib/dpkg/tmp.ci/preinst: line 36: 537018 Killed invoke-rc.d mariadb stop E: Sub-process /usr/bin/dpkg exited unexpectedly W: Operation was interrupted before it could finish The mariadb process sailed on, I could not access mysql. # /usr/bin/mysql <crickets> After reading this bug, I ran these commands # systemctl stop mariadb.socket. #no impact? # systemctl disable --now mariadb.socket # systemctl mask mariadb.socket 'systemctl status mariadb' then showed: Active: activating (auto-restart) (Result: resources) but was not properly restarting because a mariadb process was left running (this is why Result: was 'resources'). I waited for several minutes, then 'kill -9 <that process>' At this point I was able to start the service normally. # systemctl stop mariadb Active: inactive (dead) since ... # systemctl start mariadb # systemct status mariadb Active: active (running) <no TriggeredBy line> Kind regards

