Bug #47424 mysql server does not detect dead clients, if they use shared memory protocol
Submitted: 17 Sep 2009 22:50 Modified: 2 Dec 2012 17:43
Reporter: Vladislav Vaintroub Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Windows Severity:S3 (Non-critical)
Version:5.1.38 OS:Windows
Assigned to: CPU Architecture:Any

[17 Sep 2009 22:50] Vladislav Vaintroub
Description:
I start mysql server with enabled shared memory protocol (use "shared-memory"
in my.ini file).
Then I start command line client with
mysql -uroot --protocol=memory

Then I kill command line client with 
taskkill /im mysql.exe /f

I attach debugger to mysqld.exe and see a thread that stucks (forever) in 
vio_read_shared_memory().

I start another shared memory client and kill it. Now there are 2 threads that stuck (forever) in vio_read_shared_memory().
In addition, process explorer , shows server opens a number of event and section objects that are never released.

How to repeat:
Follow the steps in description.

Suggested fix:
Currently, server does not have an ability to track whether client is alive. 
Just an idea: if client could pass its PID when connecting, then server would be able to check if process is still alive.
[18 Sep 2009 7:13] Valeriy Kravchuk
Thank you for the problem report. Verified just as described with 5.1.38 on XP.
[2 Dec 2012 17:43] Vladislav Vaintroub
No more interested in having it fixed