mysql-server-5.7: after upgrade apparmor and invalidargument errors

Bug #1746620 reported by pnuke
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mysql-5.7 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

applied latest update on Ubuntu 16.04.3 LTS

The following packages are currently pending an upgrade:
[...]
 mysql-client 5.7.21-0ubuntu0.16.04.1
 mysql-client-5.7 5.7.21-0ubuntu0.16.04.1
 mysql-client-core-5.7 5.7.21-0ubuntu0.16.04.1
 mysql-common 5.7.21-0ubuntu0.16.04.1
 mysql-server 5.7.21-0ubuntu0.16.04.1
 mysql-server-5.7 5.7.21-0ubuntu0.16.04.1
 mysql-server-core-5.7 5.7.21-0ubuntu0.16.04.1
[...]

but upgrade failed. journalctl -xe revealed some file access problems of apparmor. Added
  /proc/*/status r,
  /sys/devices/system/node/ r,
  /sys/devices/system/node/node0/meminfo r,

to the apparmor conf of mysql. After restarting apparmor (and finally the server), mysql cannot start because of some status=2/INVALIDARGUMENT

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: mysql-server-5.7 5.7.21-0ubuntu0.16.04.1
ProcVersionSignature: Ubuntu 4.4.0-112.135-generic 4.4.98
Uname: Linux 4.4.0-112-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.15
Architecture: amd64
Date: Thu Feb 1 00:14:22 2018
InstallationDate: Installed on 2016-05-24 (617 days ago)
InstallationMedia: Ubuntu-Server 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.3)
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
MySQLConf.etc.mysql.mysql.conf.d.mysqld_safe_syslog.cnf:
 [mysqld_safe]
 syslog
MySQLVarLibDirListing: ['ibdata1', 'efr_altium', 'mysql_upgrade_info', 'dlsponsor', 'debian-5.7.flag', 'ibtmp1', 'berwerbung', 'wikidb', 'auto.cnf', 'sys', 'ib_logfile0', 'sponsor', 'owncloud', 'opencart', 'qdpm', 'ib_buffer_pool', 'performance_schema', 'ib_logfile1', 'mysql']
SourcePackage: mysql-5.7
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.apparmor.d.usr.sbin.mysqld: [modified]
modified.conffile..etc.mysql.mysql.cnf: [modified]
modified.conffile..etc.mysql.mysql.conf.d.mysqld.cnf: [modified]
mtime.conffile..etc.apparmor.d.usr.sbin.mysqld: 2018-02-01T00:10:04.227751
mtime.conffile..etc.mysql.mysql.cnf: 2016-09-08T10:37:21.751768
mtime.conffile..etc.mysql.mysql.conf.d.mysqld.cnf: 2016-09-08T10:40:10.806650

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

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

Changed in mysql-5.7 (Ubuntu):
status: New → Confirmed
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi Pnuke,
there is no dmesg attache, but since you added rules I assume you have no denies anymore (can only guess).

Your log holds some warnigns which could be misconfiguration:
2018-01-31T23:14:55.066207Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2018-01-31T23:14:55.066271Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
2018-01-31T23:14:55.217858Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

But not sure about that.
Further down the log then comes this:
23:14:55 UTC - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
Attempting to collect some information that could help diagnose the problem.
As this is a crash and something is definitely wrong, the information
collection process might fail.

key_buffer_size=16777216
read_buffer_size=131072
max_used_connections=0
max_threads=151
thread_count=0
connection_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 76385 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0 thread_stack 0x30000
/usr/sbin/mysqld(my_print_stacktrace+0x3b)[0xe8f29b]
/usr/sbin/mysqld(handle_fatal_signal+0x489)[0x787029]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7feb9edd5390]
/lib/x86_64-linux-gnu/libc.so.6(+0x14e045)[0x7feb9e2a7045]
/usr/sbin/mysqld(_Z22find_or_create_programP10PFS_thread16enum_object_typePKcjS3_j+0x439)[0x11ccee9]
/usr/lib/mysql/plugin/auth_pam.so(+0x238b)[0x7feb8430938b]
/usr/sbin/mysqld[0xc70134]
/usr/sbin/mysqld[0xc766ef]
/usr/sbin/mysqld(_Z36plugin_register_dynamic_and_init_allPiPPci+0xf6)[0xc782e6]
/usr/sbin/mysqld[0x77f4bb]
/usr/sbin/mysqld(_Z11mysqld_mainiPPc+0xa29)[0x780e49]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7feb9e179830]
/usr/sbin/mysqld(_start+0x29)[0x7772d9]
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.

This is mysql crashing hard on something.
It has plugin registration in the stack, so you might disable all of them [1] and switch them on one by one to spot the failing one.
Could be e.g. a manually built plugin which no more matches the upgraded version

Also in general more details about your configuration might be interesting to understand what is failing.

[1]: https://dev.mysql.com/doc/refman/5.7/en/mysql-plugin.html

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

Thank you for taking the time to report this bug and helping to make Ubuntu better.

Since it seems likely to me that this is a local configuration problem, rather than a bug in Ubuntu, I'm marking this bug as Incomplete.

If indeed this is a local configuration problem, you can find pointers to get help for this sort of problem here: http://www.ubuntu.com/support/community

Or if you believe that this is really a bug, then you may find it helpful to read "How to report bugs effectively" http://www.chiark.greenend.org.uk/~sgtatham/bugs.html. We'd be grateful if you would then provide a more complete description of the problem, explain why you believe this is a bug in Ubuntu rather than a problem specific to your system, and then change the bug status back to New.

Changed in mysql-5.7 (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in mysql-5.7 (Ubuntu):
status: Incomplete → Expired
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.