Bug #18297 CPU at 99.9% with corrupt database
Submitted: 17 Mar 2006 9:04 Modified: 18 Apr 2006 16:33
Reporter: Martin Unknown Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.19 OS:Windows (Windows server 2003 standard)
Assigned to: CPU Architecture:Any

[17 Mar 2006 9:04] Martin Unknown
Description:
Last night my dual processor MySQL server showed extreme CPU usage. Windows taskmanager showed that mysqld-nt.exe used 99.9% from both cpu's. After stopping the service the cpu usage was normal. I started the service again and after a few seconds it went off again.
I made a backup by copying the data files and then re-installed MySQL. With a clean install the server worked fine. After restoring all databases the problem occurred again. The problem was that one of the databases was (probably) corrupted. All is working fine now with one database less.
What was MySQL doing that caused the CPU usage to raise that high?
Is there any way to prevent such things from happening. Like telling MySQL that it shouldn't use more than 80% cpu?

How to repeat:
I don't know how my database got corrupted, but any extreme corruption would probably result in the same problem.

Suggested fix:
Drop the corrupted database. If it can't be done from the MySQL client, do it the hard way. Shutdown the MySQL service first ofcourse.
[17 Mar 2006 14:32] Heikki Tuuri
Martin,

are you using MyISAM or InnoDB tables?

If InnoDB, what did SHOW INNODB STATUS\G say during that 100 % CPU usage?

Regards,

Heikki
[17 Mar 2006 14:45] Martin Unknown
All databases are MyISAM. I have tried to run a maintenance check but it was just impossible because of the load. I still have the database so maybe i could run some checks on a developer machine.
[18 Mar 2006 16:33] Valeriy Kravchuk
Please, send the appropriate part of your error log, my.ini file and describe the CPUs you use.
[18 Apr 2006 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".