package mysql-server-8.0 8.0.37-0ubuntu0.24.04.1 failed to install/upgrade: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1

Bug #2069080 reported by Cesar Augusto Calad Hernandez

This bug report will be marked for expiration in 56 days if no further activity occurs. (find out why)

10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mysql-8.0 (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up mysql-server-8.0 (8.0.37-0ubuntu0.24.04.1) ...
mysqld will log errors to /var/log/mysql/error.log
mysqld is running as pid 37410
/var/lib/dpkg/info/mysql-server-8.0.postinst: line 56: kill: (37410) - Permission denied

ProblemType: Package
DistroRelease: Ubuntu 24.04
Package: mysql-server-8.0 8.0.37-0ubuntu0.24.04.1
ProcVersionSignature: Ubuntu 6.8.0-1005.5-raspi 6.8.4
Uname: Linux 6.8.0-1005-raspi aarch64
ApportVersion: 2.28.1-0ubuntu3
Architecture: arm64
CasperMD5CheckResult: unknown
CloudArchitecture: aarch64
CloudID: none
CloudName: none
CloudPlatform: none
CloudSubPlatform: config
Date: Tue Jun 11 13:33:26 2024
ErrorMessage: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
Logs.var.log.daemon.log:

MySQLConf.etc.mysql.conf.d.mysql.cnf:
 [mysqld]
 sql-mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
 max_connections=32
 innodb_buffer_pool_size=1G
MySQLConf.etc.mysql.conf.d.mysqldump.cnf:
 [mysqldump]
 quick
 quote-names
 max_allowed_packet = 16M
MySQLConf.etc.mysql.my.cnf: my.cnf links to /etc/mysql/mysql.cnf
ProcCmdline: reboot=w coherent_pool=1M 8250.nr_uarts=1 pci=pcie_bus_safe snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 smsc95xx.macaddr=D8:3A:DD:C8:F3:97 vc_mem.mem_base=0x3fc00000 vc_mem.mem_size=0x40000000 zswap.enabled=1 zswap.zpool=z3fold zswap.compressor=zstd multipath=off dwc_otg.lpm_enable=0 console=tty1 root=LABEL=writable rootfstype=ext4 rootwait fixrtc quiet splash
Python3Details: /usr/bin/python3.12, Python 3.12.3, python3-minimal, 3.12.3-0ubuntu1
PythonDetails: N/A
RelatedPackageVersions:
 dpkg 1.22.6ubuntu6
 apt 2.7.14build2
SourcePackage: mysql-8.0
Title: package mysql-server-8.0 8.0.37-0ubuntu0.24.04.1 failed to install/upgrade: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
UpgradeStatus: Upgraded to noble on 2024-06-08 (3 days ago)
modified.conffile..etc.mysql.mysql.conf.d.mysqld.cnf: [modified]
mtime.conffile..etc.mysql.mysql.conf.d.mysqld.cnf: 2024-02-02T14:54:10.140255

Revision history for this message
Cesar Augusto Calad Hernandez (sgi1e) wrote :
Revision history for this message
Cesar Augusto Calad Hernandez (sgi1e) wrote :

/var/lib/dpkg/info/mysql-server-8.0.postinst: line 56: kill: (37410) - Permission denied

It stays completely still, until I kill process ID 37410, the following result comes out

dpkg: error processing package mysql-server-8.0 (--configure):
 installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-8.0; however:
  Package mysql-server-8.0 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 mysql-server-8.0
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thank you for taking the time to file a bug report.

From DpkgTerminalLog.txt, it is indeed clear that the problem happens when the postinst script attempts to kill mysqld. My initial suspicion was that apparmor could be involved (since we're seeing a kill being denied even when it's executed by root), so I checked your dmesg log and:

[ 1455.760969] audit: type=1400 audit(1718130651.639:278): apparmor="DENIED" operation="signal" class="signal" profile="/usr/sbin/mysqld" pid=31903 comm="mysql-server-8." requested_mask="receive" denied_mask="receive" signal=term peer="vscode"

I don't understand how you were able to kill the process afterwards, though. Maybe there's a setup time when apparmor won't allow the process to receive a kill signal, and the postinst script was unlucky to be executed during this time frame?

Are you able to reproduce the issue if you reinstall mysql?

I couldn't reproduce the problem here, so I'm afraid we will need more details about your setup.

Thanks.

Changed in mysql-8.0 (Ubuntu):
status: New → Incomplete
Revision history for this message
Cesar Augusto Calad Hernandez (sgi1e) wrote :

Yesterday, the problem occurred. But recently I was going to reproduce the problem, and when I did sudo apt update but this time the update of the MySQL8.0 package worked.

$ mysql --version
mysql Ver 8.0.37-0ubuntu0.24.04.1 for Linux on aarch64 ((Ubuntu))

Changed in mysql-8.0 (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
Mitchell Dzurick (mitchdz) wrote :

Thanks Cesar, I'll change this to incomplete in-case other people are encountering similar issues. Please comment on this bug again if it becomes an issue, although with that said I don't know how often you would be reinstalling mysql for fun.

Changed in mysql-8.0 (Ubuntu):
status: Fix Released → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.