diff options
author | Vladislav Vaintroub <vvaintroub@mysql.com> | 2009-11-02 23:19:58 +0100 |
---|---|---|
committer | Vladislav Vaintroub <vvaintroub@mysql.com> | 2009-11-02 23:19:58 +0100 |
commit | 84301e8b9d8e3e8a658ecfed9d7f1ceb7a9f05fe (patch) | |
tree | 3622409abc8428690224f7377acc78c817842320 /vio/vio_priv.h | |
parent | bf711a743ec1d049a65ce3dda47c1e0a88581ab1 (diff) | |
download | mariadb-git-84301e8b9d8e3e8a658ecfed9d7f1ceb7a9f05fe.tar.gz |
Bug#47571: idle named pipe connection is unkillable
Bug#31621: Windows server hanging during shutdown using named pipes
and idle connection
Problem: when idle pipe connection is forcefully closed with KILL
statement or when the server goes down, thread that is closing connection
would hang infinitely in CloseHandle(). The reason for the hang is that
named pipe operations are performed synchronously. In this mode all IOs
on pipe are serialized, that is CloseHandle() will not abort ReadFile()
in another thread, but wait for ReadFile() to complete.
The fix implements asynchrnous mode for named pipes, where operation of file
are not synchronized. Read/Write operation would fire an async IO and wait for
either IO completion or timeout.
Note, that with this patch timeouts are properly handled for named pipes.
Post-review: Win32 timeout code has been fixed for named pipes and shared
memory. We do not store pointer to NET in vio structure, only the read and
write timeouts.
Diffstat (limited to 'vio/vio_priv.h')
-rw-r--r-- | vio/vio_priv.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vio/vio_priv.h b/vio/vio_priv.h index b9f5dd0c9c4..b662a616eef 100644 --- a/vio/vio_priv.h +++ b/vio/vio_priv.h @@ -22,7 +22,10 @@ #include <m_string.h> #include <violite.h> -void vio_ignore_timeout(Vio *vio, uint which, uint timeout); +#ifdef _WIN32 +void vio_win32_timeout(Vio *vio, uint which, uint timeout); +#endif + void vio_timeout(Vio *vio,uint which, uint timeout); #ifdef HAVE_OPENSSL |