Saturday, October 25, 2008

Crashes from Innodb long semaphore waits

In the unlikely case that there was a mysqld crash on servers that I use, a common cause was a long semaphore wait in InnoDB. MySQL bug 32149 has been open for this since November, 2007. We fixed this in our local branch, so this is rarely a problem for us now. The fixes are available in branches of MySQL 5.0 and 5.1 from Launchpad.
Does anyone else get this crash? The symptoms can be found in the database error log:
  • it contains the text long semaphore wait
  • it has text similar to the output SHOW INNODB STATUS
  • connections wait too long for the adaptive hash latch (from btr0sea.c)
  • a connection holds the adaptive hash latch -- search for holds adaptive hash latch

3 comments:

  1. Yes, I had a customer with four 8-core boxes and really high load. All those boxes were crashing once a week. As a final solution we decided to disable adaptive hash indexing back then.

    ReplyDelete
  2. Hi Mark,

    The "for 5.0" link is broken. It has an extra draft.blogger.com in the url.

    -Eric

    ReplyDelete

 
Creative Commons License
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.