[MDEV-28640] dpkg: warning: old mariadb-server-10.6 package pre-removal script subprocess returned error exit status 1 Created: 2022-05-21 Updated: 2024-01-29 |
|
| Status: | In Testing |
| Project: | MariaDB Server |
| Component/s: | Server, Upgrades |
| Affects Version/s: | 10.6, 10.7 |
| Fix Version/s: | 10.6 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Eric X | Assignee: | Otto Kekäläinen |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Debian 11.3 with sysvinit |
||
| Issue Links: |
|
||||||||
| Description |
|
When I try to upgrade my mariadb packages as part of a routine apt-get dist-upgrade or apt full-upgrade, it fails with the following messages:
This can then be fixed with apt --fix-broken install, but it's a nuisance and causes enough downtime to have to take the server out of production to upgrade.
I am using mariadb's repository.
|
| Comments |
| Comment by Elena Stepanova [ 2022-05-21 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks for the report. Reproducible on 10.6 and 10.7, I didn't try 10.8 but it's probably the same. The problem appears to be specific to sysvinit. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eric X [ 2022-05-22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thank you for addressing this promptly. Sorry about all the extra edits to make it readable. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Tuukka Pasanen [ 2022-05-22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
SysV init it's not obvious init system on Debian now-a-days. I have to see how to enable it that I can test this. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eric X [ 2022-05-22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Devuan uses it by default. It's easy to switch to on debian: apt-get install --purge -y sysvinit-core should do the trick. You may also want to pin systemd's init system while running with sysvinit: echo -e 'Package: systemd-sysv\nPin: release *\nPin-Priority: -1\n' > /etc/apt/preferences.d/systemd I hope that helps. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Tuukka Pasanen [ 2022-05-23 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks for clarification. Is this tested on Debian where SysV init is in use or Devuan? Just asking which enviroment I should use to test this. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eric X [ 2022-05-23 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I imagine it would be the same either way, but I'm using Debian with sysvinit. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Tuukka Pasanen [ 2022-05-23 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Actually this is reproachable with systemd also. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2022-05-23 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Do you have a log of such an occurrence? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Tuukka Pasanen [ 2022-05-23 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
For example this Salsa-CI task when installing 10.6 MariaDB official tree over git-pulled tree builded with autobake.sh. At least it seems to be the same. It does not happen any other combination. It's just my testing build with OpenSSL 3.x backporting. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2022-05-24 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Exactly the same, which is the problem. I don't know whether it's because of the build or because of the test being run in docker or something else, but your installation doesn't seem to be using systemd (which you apparently expect it to). For example this:
It is the init script logging, isn't it? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Tuukka Pasanen [ 2022-05-27 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yes are correct it's executed under Docker (I think) and there is no systemd available in that test as it's not mentioned in YAML. It happens when new version is installed over MariaDB 10.6 official build. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Tuukka Pasanen [ 2022-05-30 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Strange I can't get same behaviour with Docker locally than it's making on Salsa-CI. I give up and install Devuan to make sure that my env is correct. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Tuukka Pasanen [ 2022-08-30 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
herrnoel do you have capability to test current MariaDB 10.6 git? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Otto Kekäläinen [ 2022-10-22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I encountered this in Salsa-CI after removing allow_failure: true from the step mariadb.org-10.6 to mariadb-10.6 upgrade: which had been there since the inception of 10.6 series, as the way uring was used broke the 10.6 upgrades completely. Because this test was ignored, the commit that introduced this bug was not caught.. It is easily reproducible by copy-pasting the commands in salsa-ci.yml into a Debian Sid Docker session. The error starts actually here:
This leads to the command mariadb-admin (and the symlink mysqladmin to be missing from the system at the time /etc/init.d/mariadb stop runs. When that script has set -x on the error is rather clear:
I will fix this now and post a PR soon. Assigning to myself. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Otto Kekäläinen [ 2022-10-22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
After failed install apt shows the problem, but is not very verbose..
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Otto Kekäläinen [ 2022-10-23 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I am trying to fix this for 10.6 in https://github.com/MariaDB/server/pull/2300 It is a hard one, none of these errors seem to be affected no matter what changes I do in debian/control (or directly in Packages file in repository while debugging):
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eric X [ 2023-05-12 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Just went to update 10.6 to the latest and the results are still bad but with different errors:
Something is wrong with this jira platform. I had to manually type in all the line feeds just to make this readable. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Otto Kekäläinen [ 2023-05-14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Related downstream Debian bug report with further discussion: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1035949 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eric X [ 2023-08-20 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
seems resolved now but the init.d script has a small bug on line 98 if [ ! -d "$datadir"] change to if [ ! -d "$datadir" ] and the bash error goes away |