FS#58971 - [percona-server-clients] mysql_upgrade still segfaults

Attached to Project: Community Packages
Opened by Michael Taboada (lilmike) - Monday, 11 June 2018, 18:27 GMT
Last edited by Massimiliano Torromeo (mtorromeo) - Tuesday, 12 June 2018, 13:10 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

When running mysql_upgrade -u root -p for the last several percona versions, it gets to "running queries to upgrade mysql database" and then segfaults. I've built percona with debugging symbols, and the info is below.

Additional info:
* package version(s) 5.7.22_22-1
* config and/or log files etc. Trace from gdb:

PID: 26366 (mysql_upgrade)
UID: 0 (root)
GID: 0 (root)
Signal: 11 (SEGV)
Timestamp: Mon 2018-06-11 18:18:05 UTC (1min 8s ago)
Command Line: mysql_upgrade -u root -p
Executable: /usr/bin/mysql_upgrade
Control Group: /user.slice/user-1000.slice/session-c10.scope
Unit: session-c10.scope
Slice: user-1000.slice
Session: c10
Owner UID: 1000 (lilmike)
Boot ID: 67911b5b5ea14075a856d8bb4e01e496
Machine ID: 9bac809773d440bb8024c75a4a4174d3
Hostname: mtserver
Storage: /var/lib/systemd/coredump/core.mysql_upgrade.0.67911b5b5ea14075a856d8bb4e01e496.26366.1528741085000000.lz4
Message: Process 26366 (mysql_upgrade) of user 0 dumped core.

Stack trace of thread 26366:
#0 0x0000000000000000 n/a (n/a)
#1 0x000055f5c67729b4 _ZN5Mysql5Tools4Base18Mysql_query_runner19run_query_unguardedENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE (mysql_upgrade)
#2 0x000055f5c6772d11 _ZN5Mysql5Tools4Base18Mysql_query_runner9run_queryENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE (mysql_upgrade)
#3 0x000055f5c6710af3 _ZN5Mysql5Tools7Upgrade7Program28run_sql_fix_privilege_tablesEv (mysql_upgrade)
#4 0x000055f5c676f5dd _ZN5Mysql5Tools4Base16Abstract_program3runEiPPc (mysql_upgrade)
#5 0x000055f5c670d946 main (mysql_upgrade)
#6 0x00007f7216a9306b __libc_start_main (libc.so.6)
#7 0x000055f5c670dcfa _start (mysql_upgrade)

GNU gdb (GDB) 8.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/mysql_upgrade...done.
[New LWP 26366]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `mysql_upgrade -u root -p'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x0000000000000000 in ?? ()
(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x000055f5c6771bfa in Mysql::Tools::Base::Mysql_query_runner::get_message_type_from_severity(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) () at /usr/include/c++/8.1.1/bits/basic_string.h:2271
#2 0x000055f5c67729b4 in Mysql::Tools::Base::Mysql_query_runner::run_query_unguarded(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) ()
at /usr/src/debug/percona-server-5.7.22-22/client/base/mysql_query_runner.cc:199
#3 0x000055f5c6772d11 in Mysql::Tools::Base::Mysql_query_runner::run_query(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) () at /usr/include/c++/8.1.1/bits/char_traits.h:285
#4 0x000055f5c6710af3 in Mysql::Tools::Upgrade::Program::run_sql_fix_privilege_tables (this=0x55f5c6d2ab20 <program>) at /usr/include/c++/8.1.1/bits/char_traits.h:285
#5 Mysql::Tools::Upgrade::Program::execute (this=this@entry=0x55f5c6d2ab20 <program>, positional_options=std::vector of length 0, capacity 0) at /usr/src/debug/percona-server-5.7.22-22/client/upgrade/program.cc:293
#6 0x000055f5c676f5dd in Mysql::Tools::Base::Abstract_program::run(int, char**) () at /usr/include/c++/8.1.1/bits/char_traits.h:350
#7 0x000055f5c670d946 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/percona-server-5.7.22-22/client/upgrade/program.cc:1071
(gdb) quit

Steps to reproduce:

1. Install percona-server and related clients
2. run sudo mysql_upgrade -u root -p and enter the password
3. It will segfault
This task depends upon

Closed by  Massimiliano Torromeo (mtorromeo)
Tuesday, 12 June 2018, 13:10 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#58458 
Comment by Massimiliano Torromeo (mtorromeo) - Tuesday, 12 June 2018, 13:09 GMT
Thanks for the info but I still don't know what's causing this.
Anyway I'm closing this as there's already a bug report about this.

Loading...