Bug #17746 shutdown takes 8 minutes and 99% of CPU
Submitted: 27 Feb 2006 17:48 Modified: 28 Feb 2006 19:59
Reporter: Daniel Minder Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.18 OS:Windows (Win XP SP2)
Assigned to: CPU Architecture:Any

[27 Feb 2006 17:48] Daniel Minder
Description:
A freshly built mysqld 5.0.18 takes approx. 8 minutes to shutdown on cygwin. During that time it consumes 99% of CPU time.

The .err file says nothing unusual - but note the time!
060227 18:04:17 [Note] /usr/local/mysql/libexec/mysqld: Normal shutdown
060227 18:04:17  InnoDB: Starting shutdown...
060227 18:12:41  InnoDB: Shutdown completed; log sequence number 0 43655
060227 18:12:41 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete
060227 18:26:39  mysqld ended

With SysUtils processexplorer, I found that almost all the time is spent in the ntdll's function RtlConvertUiListToApiList+0x276. The memory consumption and I/O bytes do not increase during that time.

How to repeat:
bin/mysqld_safe &

bin/mysqladmin --protocol=tcp -u root shutdown

(I have to use the -u switch since I'm not the user with name root, but I have Administator priviledges on the machine. The --protocol switch is necessary since mysqladmin cannot conntect to mysqld using the socket - I do not know why. mysql can without problems)
[28 Feb 2006 19:59] MySQL Verification Team
Thank you for the bug report. I was unable to repeat the behavior
reported on XP Pro SP2:

miguel@light ~/mysql/bin
$ ./mysqld --standalone --console
060228 16:53:38  InnoDB: Started; log sequence number 0 48439
060228 16:53:43 [Note] c:\cygwin\home\miguel\mysql\bin\mysqld.exe: ready for con
nections.
Version: '5.0.18'  socket: ''  port: 3306  MySQL Community Edition (GPL)
060228 16:54:17 [Note] c:\cygwin\home\miguel\mysql\bin\mysqld.exe: Normal shutdo
wn

060228 16:54:17  InnoDB: Starting shutdown...
060228 16:54:19  InnoDB: Shutdown completed; log sequence number 0 48439
060228 16:54:19 [Note] c:\cygwin\home\miguel\mysql\bin\mysqld.exe: Shutdown comp
lete

miguel@light ~/mysql/bin
$ uname -a
CYGWIN_NT-5.1 light 1.5.19(0.150/4/2) 2006-01-20 13:28 i686 Cygwin

miguel@light ~/mysql/bin