Bug #65845 DROP DATABASE might crash MySQL
Submitted: 8 Jul 2012 16:17 Modified: 24 Feb 2015 18:46
Reporter: Frederic Steinfels Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:5.6.6-labs-june-2012 OS:Any
Assigned to: CPU Architecture:Any
Tags: drop database, server crash

[8 Jul 2012 16:17] Frederic Steinfels
Description:
Dropping a database might crash the whole server.

120708 18:04:18  InnoDB: Assertion failure in thread 140428900665088 in file row0mysql.cc line 4262
InnoDB: Failing assertion: !table->can_be_evicted || table->ibd_file_missing
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
16:04:18 UTC - mysqld got signal 6 ;
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.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

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

Thread pointer: 0x3528ae0
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 = 7fb826bd7e50 thread_stack 0x100000
/usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x8729ae]
/usr/sbin/mysqld(handle_fatal_signal+0x481)[0x65eba1]
/lib64/libpthread.so.0[0x375ae0efe0]
/lib64/libc.so.6(gsignal+0x35)[0x375aa35965]
/lib64/libc.so.6(abort+0x148)[0x375aa37118]
/usr/sbin/mysqld[0x994b22]
/usr/sbin/mysqld[0x907f33]
/usr/sbin/mysqld[0x5c0b0f]
/usr/sbin/mysqld(_Z24plugin_foreach_with_maskP3THDPFcS0_P13st_plugin_intPvEijS3_+0x11d)[0x6ef08d]
/usr/sbin/mysqld(_Z11mysql_rm_dbP3THDPcbb+0x2a3)[0x6a42b3]
/usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x1b34)[0x6ddde4]
/usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x338)[0x6e09d8]
/usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0xd23)[0x6e1783]
/usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x13f)[0x6a190f]
/usr/sbin/mysqld(handle_one_connection+0x47)[0x6a19b7]
/lib64/libpthread.so.0[0x375ae07d14]
/lib64/libc.so.6(clone+0x6d)[0x375aaf199d]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7fb72c004b70): is an invalid pointer
Connection ID (thread ID): 1
Status: NOT_KILLED

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.
120708 18:04:18 mysqld_safe Number of processes running now: 0
120708 18:04:18 mysqld_safe mysqld restarted
120708 18:04:18 [Warning] option 'slow_query_log': boolean value '/var/log/mysqlslow.log' wasn't recognized. Set to OFF.
120708 18:04:18 [Note] Plugin 'FEDERATED' is disabled.
120708 18:04:18 [ERROR] Function 'archive' already exists
120708 18:04:18 [ERROR] Couldn't load plugin named 'archive' with soname 'ha_archive.so'.
120708 18:04:18 InnoDB: The InnoDB memory heap is disabled
120708 18:04:18 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120708 18:04:18 InnoDB: Compressed tables use zlib 1.2.3
120708 18:04:18 InnoDB: Using Linux native AIO
120708 18:04:18 InnoDB: CPU supports crc32 instructions
120708 18:04:18 InnoDB: Initializing buffer pool, size = 128.0M
120708 18:04:18 InnoDB: Completed initialization of buffer pool
120708 18:04:18 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
120708 18:04:18  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
120708 18:04:18 InnoDB: 128 rollback segment(s) are active.
120708 18:04:18 InnoDB: Waiting for the background threads to start
120708 18:04:18 InnoDB: 1.2.6 started; log sequence number 48376370999
120708 18:04:18 [Note] Server hostname (bind-address): '::'; port: 3306
120708 18:04:18 [Note]   - '::' resolves to '::';
120708 18:04:18 [Note] Server socket created on IP: '::'.
120708 18:04:18 [Note] Event Scheduler: Loaded 0 events
120708 18:04:18 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.6.6-labs-june-2012'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL)

How to repeat:
Enter DROP DATABASE

Suggested fix:
Dont crash
[8 Jul 2012 16:22] Valeriy Kravchuk
Thank you for the problem report. Please, send my.cnf file used and the output of:

free
uname -a
mount
df -k

OS commands.
[9 Jul 2012 5:40] MySQL Verification Team
I already hit this problem and filed a bug internally.
Bug 14268779 - FAILING ASSERTION: !TABLE->CAN_BE_EVICTED || TABLE->IBD_FILE_MISSING
[9 Jul 2012 5:43] Valeriy Kravchuk
I still do not see my.cnf file content.
[12 Dec 2012 9:59] Jeroen van Heugten
We are experiencing the same problem for some time now. A fix would be appreciated. We are using Percona db 5.5 (5.5.22-55). I will upload our my.cnf
[30 Dec 2012 6:55] MySQL Verification Team
duplicate of an internally filed bug
BUG 16043216 - ASSERTION FAILURE IN THREAD 140175050151680 IN FILE ROW0MYSQL.CC LINE 4511
[2 Jan 2013 14:00] Vojtech Kurka
Does here appear any notice, when the internal bug is fixed? I need to know when it's fixed. Thanks.
[24 Feb 2015 18:46] Sveta Smirnova
Fixed in versions 5.6.12, 5.7.2