# Orphaned table space after optimize lock up

**URL:** <https://forums.percona.com/t/orphaned-table-space-after-optimize-lock-up/1886>\
**Category:** Other MySQL® Questions\
**Created:** [September 4, 2012, 4:24pm UTC](https://forums.percona.com/t/orphaned-table-space-after-optimize-lock-up/1886 "2012-09-04T16:24:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![williamt](https://avatars.discourse-cdn.com/v4/letter/w/977dab/32.png) [@williamt](https://forums.percona.com/u/williamt)\
**Post date:** [September 4, 2012, 4:24pm UTC](https://forums.percona.com/t/orphaned-table-space-after-optimize-lock-up/1886/1 "2012-09-04T16:24:53Z")

</div>

During a nightly OPTIMIZE TABLE mysql seemed to have got hung up while optimizing the table.  
Someone kill -9 mysqld and restarted the server. Now we have this stuck tablespace(?) that we  
can’t seem to get rid of. We have tried following instructions here: [http://dev.mysql.com/doc/refman/5.5/en/innodb-troubleshootin](http://dev.mysql.com/doc/refman/5.5/en/innodb-troubleshootin) g-datadict.html  
but nothing seems to work. I also tried dropping the database which caused MySQL to crash  
and restart. It generated a back trace and some other stuff in the logs:

Thread pointer: 0x92c3278  
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 = ffffffffa84ec36c thread\_stack 0x30000  
/usr/sbin/mysqld(my\_print\_stacktrace+0x33)[0x83f2923]  
/usr/sbin/mysqld(handle\_fatal\_signal+0x48c)[0x82bf4fc]  
[0x23b420]  
/lib/libc.so.6(abort+0x101)[0x2b9701]  
/usr/sbin/mysqld[0x84855ea]  
/usr/sbin/mysqld[0x846ca30]  
/usr/sbin/mysqld[0x82bf585]  
/usr/sbin/mysqld(_Z24plugin\_foreach\_with\_maskP3THDPFcS0\_P13s t\_plugin\_intPvEijS3_+0x19a)[0x81bde0a]  
/usr/sbin/mysqld(\_Z16ha\_drop\_databasePc+0x3f)[0x82c06cf]  
/usr/sbin/mysqld(\_Z11mysql\_rm\_dbP3THDPcbb+0x9bf)[0x819193f]  
/usr/sbin/mysqld(\_Z21mysql\_execute\_commandP3THD+0x3468)[0x81 b19e8]  
/usr/sbin/mysqld(\_Z11mysql\_parseP3THDPcjP12Parser\_state+0x36 9)[0x81b5059]  
/usr/sbin/mysqld(\_Z16dispatch\_command19enum\_server\_commandP3 THDPcj+0x1968)[0x81b6a58]  
/usr/sbin/mysqld(\_Z10do\_commandP3THD+0x131)[0x81b6f31]  
/usr/sbin/mysqld(\_Z24do\_handle\_one\_connectionP3THD+0xe5)[0x8 25b195]  
/usr/sbin/mysqld(handle\_one\_connection+0x50)[0x825b2f0]  
/lib/libpthread.so.0[0x3f8852]  
/lib/libc.so.6(clone+0x5e)[0x362a8e]

Trying to get some variables.  
Some pointers may be invalid and cause the dump to abort.  
Query (92c5758): drop database voicemail  
Connection ID (thread ID): 3  
Status: NOT\_KILLED

mysql\> select \* from INFORMATION\_SCHEMA.INNODB\_SYS\_TABLES WHERE name like ‘#%’;  
±---------±----------------±------------±-----±-------+ -------+  
| TABLE\_ID | SCHEMA | NAME | FLAG | N\_COLS | SPACE |  
±---------±----------------±------------±-----±-------+ -------+  
| 47 | voicemail | #sql2-af6-2 | 1 | 11 | 44 |  
±---------±----------------±------------±-----±-------+ -------+

This seems like a bug in some regards. The only think I can think of at this point to get  
rid of this orphan is to completly blow out mysql and restore from backups. We are using  
one file per table. Any help would be appreciated.

Running Percona-Server-server-55-5.5.27-rel28.0.291.rhel5

---

<div class="post-metadata">

**Author:** ![williamt](https://avatars.discourse-cdn.com/v4/letter/w/977dab/32.png) [@williamt](https://forums.percona.com/u/williamt)\
**Post date:** [September 10, 2012, 12:02pm UTC](https://forums.percona.com/t/orphaned-table-space-after-optimize-lock-up/1886/2 "2012-09-10T12:02:21Z")

</div>

Anyone?

Does this seem like a bug in mysql?

---

<div class="post-metadata">

**Author:** ![rprabhu](https://avatars.discourse-cdn.com/v4/letter/r/ce7236/32.png) [@rprabhu](https://forums.percona.com/u/rprabhu)\
**Post date:** [September 10, 2012, 11:18pm UTC](https://forums.percona.com/t/orphaned-table-space-after-optimize-lock-up/1886/3 "2012-09-10T23:18:33Z")

</div>

Do you have userstats enabled? If so, can you try disabling it? This is to rule out [URL][https://bugs.launchpad.net/percona-server/5.5/+bug/1011047[/URL]](https://bugs.launchpad.net/percona-server/5.5/+bug/1011047%5B/URL%5D)
