[MDEV-3955] mysqld signal 6 when killing ALTER TABLE ADD FULLTEXT Created: 2012-12-21 Updated: 2013-06-03 Resolved: 2013-06-03 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 5.5.28a |
| Fix Version/s: | 5.5.32 |
| Type: | Bug | Priority: | Major |
| Reporter: | Sean Pringle | Assignee: | Sergei Golubchik |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Ubuntu Server 10.04 LTS i686 glibc 2.11.1 |
||
| Description |
|
I ran an ALTER TABLE ... ADD FULLTEXT (...) statement on a ~900M MyISAM table in MariaDB 5.5.28a. Issuing a "KILL <id>" via the MySQL client resulted in a "*** glibc detected *** mysqld free() invalid pointer" trace in the syslog and mysqld got signal 6. Additionally, mysqld hung trying to gather a stack trace of its own and needed a sig9, which made it a bit nasty. Nothing except the generic sig6 message in the error log. I havn't been able to reproduce it yet. I'm filing this bug in case someone more informed can suggest how to repeat it other than using brute force and luck...
Using objdump on the mysqld binary and the return addresses in the trace, I think the problem is mi_repair_by_sort() blindly freeing sort_info pointers after some lower layer detected the kill, specifically here in the 5.5.28a source:
Objdump excerpt:
Or rather, some lower layer is leaving sort_info in a bad state after a kill. Obviously this is MyISAM and the FULLTEXT focus may be on Aria now, but fwiw the code in ma_check.c and maria_repair_by_sort() looks very similar. |
| Comments |
| Comment by Sergei Golubchik [ 2012-12-21 ] |
|
what mariadb binaries were you using? to make use of the addresses in the backtrace I need to have exactly the same binary. |
| Comment by Sean Pringle [ 2012-12-21 ] |
|
mariadb-5.5.28a-linux-i686.tar.gz from downloads.mariadb.org. $ md5sum mariadb-5.5.28a-linux-i686.tar.gz $ md5sum 5.5.28/bin/mysqld |
| Comment by Sergei Golubchik [ 2012-12-21 ] |
|
Thanks, that helped. Just for the reference (and as a note to myself), the backtrace with addr2line information: 0xb7504591 libc.so.6[+0x6b591] |
| Comment by Sergei Golubchik [ 2013-06-03 ] |
|
I've never was able to reproduce it. And adding lots of debug checks in the code where the 'killed' flag is checked did not reveal anything. |