long hang apt install mariadb-server on Ubuntu 20.04 server

Bug #1899483 reported by Uwe Stelling
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
mariadb-10.3 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Ubuntu 20.04 server => no graphical user interface
MariaDb is functional: mysqlshow works, mysqladmin create xxx works
After 10 Minutes
  - the installation terminates
  - dbms terminates
Oct 12 12:38:19 host systemd[1]: Starting MariaDB 10.3.22 database server...
Oct 12 12:38:19 host mysqld[124254]: 2020-10-12 12:38:19 0 [Note] /usr/sbin/mysqld (mysqld 10.3.22-MariaDB-1ubuntu1) starting as process 124254 ...
Oct 12 12:53:19 host systemd[1]: mariadb.service: start operation timed out. Terminating.
Oct 12 12:53:20 host systemd[1]: mariadb.service: Failed with result 'timeout'.
Oct 12 12:53:20 host systemd[1]: Failed to start MariaDB 10.3.22 database server.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: apt 2.0.2ubuntu0.1
ProcVersionSignature: Ubuntu 5.4.0-48.52-generic 5.4.60
Uname: Linux 5.4.0-48-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.9
Architecture: amd64
CasperMD5CheckResult: skip
Date: Mon Oct 12 12:43:49 2020
ExecutablePath: /usr/bin/apt
InstallationDate: Installed on 2020-05-11 (154 days ago)
InstallationMedia: Ubuntu-Server 20.04 LTS "Focal Fossa" - Beta amd64 (20200402)
ProcEnviron:
 SHELL=/bin/bash
 LANG=en_US.UTF-8
 TERM=xterm-256color
 PATH=(custom, no user)
SourcePackage: apt
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Uwe Stelling (ustelling) wrote :
Revision history for this message
Uwe Stelling (ustelling) wrote :

After failed installation command 'service mysql start' hangs endless, but mysqlshow and mysql are working.

$ ps -f -t pts/4
UID PID PPID C STIME TTY TIME CMD
root 107880 107877 0 12:46 pts/4 00:00:00 -bash
root 125389 107880 0 13:01 pts/4 00:00:00 systemctl start mysql.service
root 125396 125389 0 13:01 pts/4 00:00:00 /bin/systemd-tty-ask-password-agent --watch

$ ps -f -u mysql
mysql 125461 1 0 13:01 ? 00:00:00 /usr/sbin/mysqld

Revision history for this message
Julian Andres Klode (juliank) wrote :

Reassigning to mariadb-10.3. Note that mariadb is in universe, and likely does not receive much if any support.

affects: apt (Ubuntu) → mariadb-10.3 (Ubuntu)
Revision history for this message
Faustin (fauust) wrote :

Hi Uwe!
Thanks for your report and your help making Ubuntu better.

Your report does not permit me to work on the problem as I am missing some information on how to try to reproduce the bug.

Could you please describe better the steps that leads to this?
Are you upgrading from a previous Ubuntu/MariaDB version?

Thanks,
Faustin

Changed in mariadb-10.3 (Ubuntu):
status: New → Incomplete
Revision history for this message
Uwe Stelling (ustelling) wrote :

Could you please describe better the steps that leads to this?

apt-get install mariadb-server

Reproduction:
dpkg --purge mariadb-server-10.3 mariadb-server-core-10.3 mariadb-server;
dpkg --purge mariadb-client-10.3 mariadb-client-core-10.3 mariadb-common;
dpkg --purge --force-depends mysql-common;
rm -r /var/lib/mysql /etc/mysql
apt --fix-broken install;
apt-get install mariadb-server

Are you upgrading from a previous Ubuntu/MariaDB version?
No
installation of ubuntu-20.04-beta-live-server-amd64.iso
upgrade to 20.04.1
installation, test and purge of mariadb, mysql, ...

Revision history for this message
Uwe Stelling (ustelling) wrote :

After install of ubuntu-20.04.1-live-server-amd64.iso
apt-get install mariadb-server is functional.

Revision history for this message
Harald Hannelius (harald-arcada) wrote :

I hade this same problem. Apparently an on apparmor profile left behind of an old mysql install. This fixed it for me;

    echo "/usr/sbin/mysqld { }" > /etc/apparmor.d/usr.sbin.mysqld
    apparmor_parser -v -R /etc/apparmor.d/usr.sbin.mysqld
    systemctl restart mariadb

Revision history for this message
Uwe Stelling (ustelling) wrote :

Thank you for the hint!
The following solved my problem:

    apt-get remove apparmor

Now, it is possible to install and deinstall mysql and mariadb several times.

Otto Kekäläinen (otto)
Changed in mariadb-10.3 (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Faustin (fauust) wrote :

As said by Harald Hannelius, this is not related to MariaDB, we do not provide an apparmor profile (it's commented).

Closing.

Changed in mariadb-10.3 (Ubuntu):
status: Confirmed → Invalid
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.