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

Bug #1901708 reported by Steph

This bug report was converted into a question: question #702675: package mysql-server-8.0 8.0.22-0ubuntu0.20.04.2 failed to install/upgrade: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1.

216
This bug affects 49 people
Affects Status Importance Assigned to Milestone
mysql-8.0 (Ubuntu)
Invalid
Undecided
arun kumar

Bug Description

I don't know.

ProblemType: Package
DistroRelease: Ubuntu 20.04
Package: mysql-server-8.0 8.0.22-0ubuntu0.20.04.2
ProcVersionSignature: Ubuntu 5.4.0-52.57-generic 5.4.65
Uname: Linux 5.4.0-52-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.10
Architecture: amd64
CasperMD5CheckResult: skip
Date: Tue Oct 27 15:01:44 2020
ErrorMessage: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
InstallationDate: Installed on 2020-05-25 (154 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
Logs.var.log.daemon.log:

MySQLConf.etc.mysql.conf.d.mysql.cnf: [mysql]
MySQLConf.etc.mysql.conf.d.mysqldump.cnf:
 [mysqldump]
 quick
 quote-names
 max_allowed_packet = 16M
ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-5.4.0-52-generic root=UUID=2790b107-00e4-43d7-b98f-e1ff68a842a1 ro quiet splash vt.handoff=7
Python3Details: /usr/bin/python3.8, Python 3.8.5, python3-minimal, 3.8.2-0ubuntu2
PythonDetails: N/A
RelatedPackageVersions:
 dpkg 1.19.7ubuntu3
 apt 2.0.2ubuntu0.1
SourcePackage: mysql-8.0
Title: package mysql-server-8.0 8.0.22-0ubuntu0.20.04.2 failed to install/upgrade: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Steph (paterna) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mysql-8.0 (Ubuntu):
status: New → Confirmed
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thanks for taking the time to report this bug and make Ubuntu better.

Even though I am not able to reproduce the bug in a simple environment, this seems like a real problem indeed.

Basically, what you (or your system, rather) tried to do was to upgrade to the latest version of mysql-server (from 8.0.21-0ubuntu0.20.04.4 to 8.0.22-0ubuntu0.20.04.2). This requires a "server upgrade" operation to be done by mysql, which in turn can take several minutes to complete, as can be seen in your logs:

2020-10-27T13:55:29.166278Z 4 [System] [MY-013381] [Server] Server upgrade from '80021' to '80022' started.
2020-10-27T13:59:53.420927Z 4 [System] [MY-013381] [Server] Server upgrade from '80021' to '80022' completed.

In your case, the operation took almost 5 minutes to complete. A similar bug (LP 1901711) was reported, in which we can also verify this behaviour:

2020-10-27T14:28:40.467183Z 4 [System] [MY-013381] [Server] Server upgrade from '80021' to '80022' started.
2020-10-27T14:35:31.474308Z 4 [System] [MY-013381] [Server] Server upgrade from '80021' to '80022' completed.

Almost 7 minutes to complete the internal upgrade. As I said above, I could not reproduce the bug here (my server upgrade took about 30 seconds), but I think it's because I don't have a big MySQL database populated here.

My guess (without investigating much further) is that some timeout is being reached, which is preventing the apt upgrade process to finish. But based on the mysql error.log, it seems that everything succeeded and you might be able to run an "apt upgrade" again just to finish what was left.

I'm subscribing Ubuntu Server to the bug; we will investigate more when we have more time available. Thanks.

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

It just occurred to me that I would like to confirm whether my suspicion is correct. Can you confirm that you have a somewhat large MySQL database there, please? I am marking this bug as Incomplete for now, but that's just because I'm waiting on your answer. When you reply, feel free to move the bug back to Confirmed.

Changed in mysql-8.0 (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Steph (paterna) wrote : Re: [Bug 1901708] Re: package mysql-server-8.0 8.0.22-0ubuntu0.20.04.2 failed to install/upgrade: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
Download full text (3.2 KiB)

<span style="font-family:arial,helvetica,sans-serif; font-size:12px">‌</span><span style="font-family:arial,helvetica,sans-serif; font-size:12px">Hi !<br>
I effectively have a MySQL database, but it's not a large one.<br>
I did a "sudo‌ apt upgrade" and it seems to work.&nbsp;<br>
Thanx.&nbsp;&nbsp;</span>

<div class="gl_quote" style="margin-top: 20px; padding-top: 5px;">De : "Sergio Durigan Junior" &lt;<email address hidden>&gt;<br>
A : <email address hidden><br>
Envoyé: mercredi 28 octobre 2020 20:25<br>
Objet : [Bug 1901708] Re: package mysql-server-8.0 8.0.22-0ubuntu0.20.04.2 failed to install/upgrade: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1<br>
&nbsp;
<div class="gl_quoted">It just occurred to me that I would like to confirm whether my suspicion<br>
is correct. Can you confirm that you have a somewhat large MySQL<br>
database there, please? I am marking this bug as Incomplete for now,<br>
but that's just because I'm waiting on your answer. When you reply,<br>
feel free to move the bug back to Confirmed.<br>
<br>
** Changed in: mysql-8.0 (Ubuntu)<br>
Status: Confirmed =&gt; Incomplete<br>
<br>
--<br>
You received this bug notification because you are subscribed to the bug<br>
report.<br>
https://bugs.launchpad.net/bugs/1901708<br>
<br>
Title:<br>
package mysql-server-8.0 8.0.22-0ubuntu0.20.04.2 failed to<br>
install/upgrade: installed mysql-server-8.0 package post-installation<br>
script subprocess returned error exit status 1<br>
<br>
Status in mysql-8.0 package in Ubuntu:<br>
Incomplete<br>
<br>
Bug description:<br>
I don't know.<br>
<br>
ProblemType: Package<br>
DistroRelease: Ubuntu 20.04<br>
Package: mysql-server-8.0 8.0.22-0ubuntu0.20.04.2<br>
ProcVersionSignature: Ubuntu 5.4.0-52.57-generic 5.4.65<br>
Uname: Linux 5.4.0-52-generic x86_64<br>
ApportVersion: 2.20.11-0ubuntu27.10<br>
Architecture: amd64<br>
CasperMD5CheckResult: skip<br>
Date: Tue Oct 27 15:01:44 2020<br>
ErrorMessage: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1<br>
InstallationDate: Installed on 2020-05-25 (154 days ago)<br>
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)<br>
Logs.var.log.daemon.log:<br>
<br>
MySQLConf.etc.mysql.conf.d.mysql.cnf: [mysql]<br>
MySQLConf.etc.mysql.conf.d.mysqldump.cnf:<br>
[mysqldump]<br>
quick<br>
quote-names<br>
max_allowed_packet = 16M<br>
ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-5.4.0-52-generic root=UUID=2790b107-00e4-43d7-b98f-e1ff68a842a1 ro quiet splash vt.handoff=7<br>
Python3Details: /usr/bin/python3.8, Python 3.8.5, python3-minimal, 3.8.2-0ubuntu2<br>
PythonDetails: N/A<br>
RelatedPackageVersions:<br>
dpkg 1.19.7ubuntu3<br>
apt 2.0.2ubuntu0.1<br>
SourcePackage: mysql-8.0<br>
Title: package mysql-server-8.0 8.0.22-0ubuntu0.20.04.2 failed to install/upgrade: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1<br>
UpgradeStatus: No upgrade log present (probably fresh install)<br>
<br>
To manage notifications about this bug go to:<br>
https://bugs.launchpad.net/ubuntu/+source/mysql-8.0/+bug/1901708/+subscriptions</div>

<div class="gl_q...

Read more...

Revision history for this message
Paride Legovini (paride) wrote :

Similar to LP: #1882527 but apparently not caused by a big database in this case. I'm leaving this to Incomplete as without further information it will be difficult to act on it. As Sergio wrote this can't be reproduced from a fresh install.

@Steph any idea on what could have cause the upgrade operation to take such a long time? Was perhaps the system load very high for any reason?

Revision history for this message
Steph (paterna) wrote :

@Paride : nope, no idea. My computer is a little bit slow and I was coding in the same time but I have no idea of why it took such a long time. Sorry. Envoyé depuis mon smartphone Samsung Galaxy.
-------- Message d'origine --------De : Paride Legovini <email address hidden> Date : 29/10/2020 14:40 (GMT+01:00) À : <email address hidden> Objet : [Bug 1901708] Re: package mysql-server-8.0 8.0.22-0ubuntu0.20.04.2 failed to install/upgrade: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1 Similar to LP: #1882527 but apparently not caused by a big database inthis case. I'm leaving this to Incomplete as without further informationit will be difficult to act on it. As Sergio wrote this can't bereproduced from a fresh install.@Steph any idea on what could have cause the upgrade operation to takesuch a long time? Was perhaps the system load very high for any reason?-- You received this bug notification because you are subscribed to the bugreport.https://bugs.launchpad.net/bugs/1901708Title:  package mysql-server-8.0 8.0.22-0ubuntu0.20.04.2 failed to  install/upgrade: installed mysql-server-8.0 package post-installation  script subprocess returned error exit status 1Status in mysql-8.0 package in Ubuntu:  IncompleteBug description:  I don't know.  ProblemType: Package  DistroRelease: Ubuntu 20.04  Package: mysql-server-8.0 8.0.22-0ubuntu0.20.04.2  ProcVersionSignature: Ubuntu 5.4.0-52.57-generic 5.4.65  Uname: Linux 5.4.0-52-generic x86_64  ApportVersion: 2.20.11-0ubuntu27.10  Architecture: amd64  CasperMD5CheckResult: skip  Date: Tue Oct 27 15:01:44 2020  ErrorMessage: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1  InstallationDate: Installed on 2020-05-25 (154 days ago)  InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)  Logs.var.log.daemon.log:     MySQLConf.etc.mysql.conf.d.mysql.cnf: [mysql]  MySQLConf.etc.mysql.conf.d.mysqldump.cnf:   [mysqldump]   quick   quote-names   max_allowed_packet = 16M  ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-5.4.0-52-generic root=UUID=2790b107-00e4-43d7-b98f-e1ff68a842a1 ro quiet splash vt.handoff=7  Python3Details: /usr/bin/python3.8, Python 3.8.5, python3-minimal, 3.8.2-0ubuntu2  PythonDetails: N/A  RelatedPackageVersions:   dpkg 1.19.7ubuntu3   apt  2.0.2ubuntu0.1  SourcePackage: mysql-8.0  Title: package mysql-server-8.0 8.0.22-0ubuntu0.20.04.2 failed to install/upgrade: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1  UpgradeStatus: No upgrade log present (probably fresh install)To manage notifications about this bug go to:https://bugs.launchpad.net/ubuntu/+source/mysql-8.0/+bug/1901708/+subscriptions

Revision history for this message
A (askwho) wrote :

I have a large database in my case. It is around 1Mb when exported.

But I had it for months now, and this is the first time this problem started to happen. It has been happening for a few days now.
I read in the report that it depends on gcc and python, which I upgraded a few weeks ago. Could that be related?

Sometimes it happened while using the app that is connected to the database. It showed an exception that the connection/signal was lost, and I had to restart it.

Thanks for your time.

Revision history for this message
A (askwho) wrote :

I would add that I am having a really weird internet problem, where sometimes the browser can't open any page, then a moment later I would just refresh and they would load just fine.

Revision history for this message
A (askwho) wrote :

Sorry, the DB is around 12Mb when exported

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

@A, without the logs there is not way to know whether you're facing the same issue as Steph.

For the record, I tried generating random data (two tables, 10k lines each) and inserting into MySQL, and then performing the upgrade using a container with very limited resources, but even in this scenario the upgrade worked. I was thinking that this problem might be caused by a high system load during the upgrade, but now I'm not so sure.

I have to think about what to try next.

Revision history for this message
Mamadou Moctar Ba (bmaxtar) wrote :

dpkg: erreur de traitement du paquet mysql-server-8.0 (--configure) :
 installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
Aucun rapport « apport » n'a été créé car le message d'erreur indique une erreur consécutive à un échec p
récédent.
         dpkg: des problèmes de dépendances empêchent la configuration de mysql-server :
 mysql-server dépend de mysql-server-8.0 ; cependant :
 Le paquet mysql-server-8.0 n'est pas encore configuré.

dpkg: erreur de traitement du paquet mysql-server (--configure) :
 problèmes de dépendances - laissé non configuré
Traitement des actions différées (« triggers ») pour systemd (245.4-4ubuntu3.3) ...
Traitement des actions différées (« triggers ») pour man-db (2.9.1-1) ...
Traitement des actions différées (« triggers ») pour libc-bin (2.31-0ubuntu9.1) ...
Des erreurs ont été rencontrées pendant l'exécution :
 mysql-server-8.0
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

@Mamadou - FYI the same message do not imply this is the same issue as the details underneath might differ. To pist it here does IMHO not help- To explain - this is like saying "the house is burning" while to avoid it next time it is very important to understand "what started the fire".

I'd recommend to file a new bug for it, upon inspection of the logs it can then be marked as a duplicate (or not).
But before filing such a bug give the search function a chance, launchpad is full of such issues which are either "local misconfiguration" or "flaky, but working on a retry - no related condition fixable by the package"

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for mysql-8.0 (Ubuntu) because there has been no activity for 60 days.]

Changed in mysql-8.0 (Ubuntu):
status: Incomplete → Expired
Changed in mysql-8.0 (Ubuntu):
assignee: nobody → arun kumar (arunlinuxadmin)
status: Expired → Incomplete
status: Incomplete → Invalid
To post a comment you must log in.