[MDEV-8108] MariaDB 5.5.43 segfaults on startup Created: 2015-05-06 Updated: 2015-05-08 Resolved: 2015-05-08 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Admin statements, Views |
| Affects Version/s: | 5.5.43 |
| Fix Version/s: | 5.5.44, 10.0.19 |
| Type: | Bug | Priority: | Major |
| Reporter: | Arjen Lentz | Assignee: | Sergei Golubchik |
| Resolution: | Duplicate | Votes: | 1 |
| Labels: | None | ||
| Environment: |
Ubuntu 14.04 x64_64 |
||
| Issue Links: |
|
||||||||
| Description |
|
mysqld segfaults on startup.
|
| Comments |
| Comment by Elena Stepanova [ 2015-05-06 ] | |||||||||||||||||||||||||||
|
Hi Arjen, Do you have a datadir backup on which the crash can be reproduced? | |||||||||||||||||||||||||||
| Comment by Arjen Lentz [ 2015-05-07 ] | |||||||||||||||||||||||||||
|
Hi Elena No sorry. Unfortunately, time constraints and available infra at that time didn't allow us to create extra snapshots. | |||||||||||||||||||||||||||
| Comment by Daniel Black [ 2015-05-07 ] | |||||||||||||||||||||||||||
|
If debug packages where provided it would be quite easy to reverse this back to code ( Pulling the mysqld out of the deb package, doing an objdump -d mysqld, finding +0xcc from the start of _ZN22Repair_table_statement7executeEP3THD ( The segfault therefore happened at 0x46083C
So it happened just before the call to MDL_object_lock::~MDL_object_lock +0x970 which looks really odd to me because the destructor of MDL_object_lock is pretty empty. I suspect since mysql_admin_table doesn't show up in the disassemble this might be the call (its a static method) and it appears quite a few other times. What is clear is its after the call to check_table_access and before if (!res && !m_lex->no_write_to_binlog) in Repair_table_statement::execute which would make it before the any innodb code at all. Looking at {{ 46083c: 48 8b 43 08 mov 0x8(%rbx),%rax}} we see earlier in the code 4607d0: 48 8b 05 79 27 b5 00 mov 0xb52779(%rip),%rax # fb2f50 <my_charset_utf8mb4_handler+0x5670> Looking at the fb2f50
Which kind of puts the blame on:
We also see rbx is loaded from the stack which would point to the argument THD which kind of confirms the like of code. So thd not right? seem odd if its survived a check_table_access call. Anyway that's my few minutes worth of thoughts. | |||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2015-05-07 ] | |||||||||||||||||||||||||||
|
danblack, I've just downloaded mariadb-server-core-5.5_5.5.43+maria-1~trusty_amd64.deb, but disassembly there look different. where did you get yours from? | |||||||||||||||||||||||||||
| Comment by Daniel Black [ 2015-05-07 ] | |||||||||||||||||||||||||||
|
lucid my bad: This what you have? 0x456930 + 0xcc = 0x4569FC is mov %eax,%edx. Odd. So taking the result of the mysql_admin_table before it puts it into res.
| |||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2015-05-07 ] | |||||||||||||||||||||||||||
|
That's probably not "segfaults on startup" after all. There's a client connection that executes REPAIR. So that's probably mysql_upgrade (run automatically by Ubuntu?). And then it's | |||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2015-05-08 ] | |||||||||||||||||||||||||||
|
I'll assume it's |