Bug #37987 shutdown hangs after server was started with innodb_force_recovery set
Submitted: 9 Jul 2008 11:30 Modified: 28 Apr 2009 17:56
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:5.0.58 OS:Any
Assigned to: CPU Architecture:Any
Tags: innodb_force_recovery

[9 Jul 2008 11:30] Shane Bester
Description:
after killing mysqld to recover from a runaway rollback and starting with innodb_force_recovery=3 , then dropping the table, mysqld hangs during the next shutdown.  another kill -9 is needed to shutdown the process.

How to repeat:
create table t1(id int)engine=innodb;
<kill mysqld>
mysqld --innodb_force_recovery=3
drop table t1;
mysqladmin shutdown
[9 Jul 2008 11:44] MySQL Verification Team
i'll try get a stack trace of the hanging thread.
[9 Jul 2008 18:00] Valeriy Kravchuk
I can not repeat the behaviour described with MySQL 5.0.62 on Windows, for example. Server was shutted down without any problems:

080709 20:53:36  InnoDB: Started; log sequence number 1 2827972647
InnoDB: !!! innodb_force_recovery is set to 3 !!!
080709 20:53:36 [Warning] Neither --relay-log nor --relay-log-index were used; s
o replication may break when this MySQL server acts as a slave and has his hostn
ame changed!! Please use '--relay-log=toshiba-user-relay-bin' to avoid this prob
lem.
080709 20:53:36 [Note] C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt: re
ady for connections.
Version: '5.0.62-enterprise-gpl-nt'  socket: ''  port: 3308  MySQL Enterprise Se
rver (GPL)
080709 20:54:14 [Note] C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt: No
rmal shutdown

080709 20:54:14  InnoDB: Starting shutdown...
080709 20:54:15  InnoDB: Shutdown completed; log sequence number 1 2827973254
080709 20:54:15 [Note] C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt: Sh
utdown complete
[10 Jul 2008 13:33] MySQL Verification Team
my how to repeat was too simple. you really have to have a large rollback happening, then drop the table. i'll try again to repeat it.  If I remember correctly it was looping in logs_empty_and_mark_files_at_shutdown()
[9 Apr 2009 5:39] MySQL Verification Team
this is tentatively a duplicate of bug #44176