← Back to team overview

maria-discuss team mailing list archive

Unable to DROP table, Data Dict problem


Hi Folks,

We run a very large infra on MariaDB/RHEL6.x/RHEV/NetApp; thousands of
VMs, each running MariaDB and very busy. MariaDB is 5.5.32.

We recently had some NFS problems which led to minor DB corruption.
Luckily, the corruption was isolated to a table holding cache data,
and in fact one that is empty in most of our instances. That's the
good news.

The bad news is that the data dict is really unhappy about that table.

 - Cannot drop it, we get a nasty stack trace at [1]

 - Stopping MariaDB, removing the table by hand, restarting MariaDB,
attempting to re-create the table hits a data dict error [2]. On disk
I can see it created an ibd file, but no frm file. Following the
instructions at
does not help.

I have straced the process, and it does not seem to even try to create
the frm file, so it really looks like it's internal state (data dict),
not errors from further down the stack. OS / kernel logs are clean.

Is there any reasonable method to cure this "in place" with minimal
disruption? (These are large DBs, dump restore is more than awkward.)

Oh and careful with NFSv4 :-/

thank you!


1 - Stack trace when trying to drop table

Version: '5.5.32-MariaDB-log'  socket: '/var/lib/mysql/mysql.sock'
port: 3306  MariaDB Server
InnoDB: Error: tablespace id is 47073 in the data dictionary
InnoDB: but in file ./moodle_sand/mdl_tag_correlation.ibd it is 48463!
150119 17:14:45  InnoDB: Assertion failure in thread 140045886629632
in file fil0fil.c line 778
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.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
150119 17:14:45 [ERROR] 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.

To report this bug, see http://kb.askmonty.org/en/reporting-bugs

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.

Server version: 5.5.32-MariaDB-log
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads =
182265 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x0xa92ee60
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 = 0x7f5ef9531d78 thread_stack 0x48000
??:0(ha_innobase::delete_table(char const*))[0x8424e3]
??:0(ha_delete_table(THD*, handlerton*, char const*, char const*, char
const*, bool))[0x6d5233]
??:0(mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool,
??:0(mysql_rm_table(THD*, TABLE_LIST*, char, char))[0x60001d]
??:0(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x58e369]
??:0(dispatch_command(enum_server_command, THD*, char*, unsigned int))[0x58f790]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7f5db800afa8): is an invalid pointer
Connection ID (thread ID): 2

Optimizer switch:

2 - Error when attempting to recreate table
150119 17:15:22  InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
InnoDB: If you are installing InnoDB, remember that you must create
InnoDB: directories yourself, InnoDB does not create them.
150119 17:15:22  InnoDB: Error: trying to open a table, but could not
InnoDB: open the tablespace file './moodle_sand/mdl_tag_correlation.ibd'!
InnoDB: Have you moved InnoDB .ibd files around without using the
InnoDB: It is also possible that this is a temporary table #sql...,
InnoDB: and MySQL removed the .ibd file for this.
InnoDB: Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/innodb-troubleshooting-datadict.html
InnoDB: for how to resolve the issue.

 -  ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 ~ http://docs.moodle.org/en/User:Martin_Langhoff

Follow ups