Comment 2 for bug 1953243

Revision history for this message
Bryce Harrington (bryce) wrote : Re: package mysql-server-8.0 8.0.27-0ubuntu0.20.04.1 failed to install/upgrade: Unable to shut down server, could not get cache lock

Thanks for reporting this bug. Offhand it's not entirely clear what happened, however the error message "Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend" generally crops up when two apt processes collide, such as a user-requested apt operation while unattended-upgrade is running (or vice versa maybe). From the log files I can't identify if that was the case. The mysql error log shows a couple other errors:

2021-12-05T08:15:14.339858Z 0 [ERROR] [MY-011292] [Server] Plugin mysqlx reported: 'Preparation of I/O interfaces failed, X Protocol won't be accessible'
2021-12-05T08:15:14.339935Z 0 [ERROR] [MY-011300] [Server] Plugin mysqlx reported: 'Setup of socket: '/var/run/mysqld/mysqlx.sock' failed, can't create lock file /var/run/mysqld/mysqlx.sock.lock'
2021-12-05T08:17:19.168919Z 4 [System] [MY-013381] [Server] Server upgrade from '80026' to '80027' started.
2021-12-05T08:25:19.923278Z 4 [System] [MY-013381] [Server] Server upgrade from '80026' to '80027' completed.

Hopefully you've already resolved this problem, but if not there are many support articles on how to fix the locking situation in general, such as https://askubuntu.com/questions/1109982/e-could-not-get-lock-var-lib-dpkg-lock-frontend-open-11-resource-temporari

Feel free to add clarification if I've missed something. In particular, it would be super helpful to understand how to reproduce this particular broken condition.

I suspect whatever situation led to the locking issue is unrelated to mysql. However, we may want to adjust the mysql apport hook to not trigger bug reports for this type of issue.