Hello all

 

We have stumbled at a very strange issue with our software that uses ICS as
core for sockets.

 

This is not the first time that it happens and has happened in different
customers but it is kind of rare.. What happens is that ASyncReceive routine
from TCustomWSocket hangs in Ics_ioctlsocket routine.

 

We have installed a debug in our customers and got the following:

 

|Running Thread: ID=4276; Parent=2992; Priority=0
|

|Class=TServiceThread; Name= (Vcl.SvcMgr.TServiceThread.Execute)
|

|DeadLock=0; Wait Chain=
|

|Comment=
|

|---------------------------------------------------------------------------
----------------------------------------------------------------------------
-----------------------------------------------------|

|7FFFFFFE|03     |00000000|76F1F911|ntdll.dll     |0001F911|ntdll
|                                                   |ZwDeviceIoControlFile
|          |

|00000020|03     |05EFF7A4|767830A1|WS2_32.dll    |000030A1|WS2_32
|                                                   |ioctlsocket
|          |

|00000020|04     |05EFF7D0|00810CC7|Server.exe
|00410CC7|OverbyteIcsWinsock     |
|Ics_ioctlsocket                                           |1177[3]   |

|00000020|04     |05EFF7F0|008241B4|Server.exe
|004241B4|OverbyteIcsWSocket     |TCustomWSocket
|ASyncReceive                                              |7071[30]  |

|00000020|03     |05EFF84C|75E20810|KERNELBASE.dll|00010810|KERNELBASE
|                                                   |WaitForSingleObjectEx
|          |

|00000020|04     |05EFFC2C|00824292|Server.exe
|00424292|OverbyteIcsWSocket     |TCustomWSocket
|Do_FD_READ                                                |7104[5]   |

|00000020|04     |05EFFC3C|0082442F|Server.exe
|0042442F|OverbyteIcsWSocket     |TCustomWSocket
|WMASyncSelect                                             |7254[20]  |

|00000020|04     |05EFFC50|00822D1A|Server.exe
|00422D1A|OverbyteIcsWSocket     |TCustomWSocket
|WndProc                                                   |6181[4]   |

|00000020|04     |05EFFC74|00832A00|Server.exe
|00432A00|OverbyteIcsWSocket     |TCustomHttpTunnelWSocket
|WndProc                                                   |19157[9]  |

|00000020|04     |05EFFC8C|0082EF5C|Server.exe
|0042EF5C|OverbyteIcsWSocket     |TCustomLineWSocket
|WndProc                                                   |10944[12] |

|00000020|04     |05EFFCA4|0081A9CA|Server.exe
|0041A9CA|OverbyteIcsWndControl  |TIcsWndHandler
|WndProc                                                   |1133[6]   |

|00000020|04     |05EFFCCC|00819C82|Server.exe
|00419C82|OverbyteIcsWndControl  |
|WndControlWindowsProc                                     |466[30]   |

|00000020|03     |05EFFD1C|76146D35|USER32.dll    |00016D35|USER32
|                                                   |(possible
GetThreadDesktop+210)                           |          |

|00000020|03     |05EFFD94|761477BF|USER32.dll    |000177BF|USER32
|                                                   |(possible
CharPrevW+307)                                  |          |

|00000020|03     |05EFFDF4|76147885|USER32.dll    |00017885|USER32
|                                                   |DispatchMessageW
|          |

|00000020|03     |05EFFE04|00641F04|Server.exe    |00241F04|Vcl.SvcMgr
|TServiceThread                                     |ProcessRequests
|          |

|00000020|03     |05EFFE68|00641BB5|Server.exe    |00241BB5|Vcl.SvcMgr
|TServiceThread                                     |Execute
|          |

|00000020|03     |05EFFEEC|004CDC9E|Server.exe    |000CDC9E|System.Classes
|                                                   |ThreadProc
|          |

|00000020|03     |05EFFF1C|0040A008|Server.exe    |0000A008|System
|                                                   |ThreadWrapper
|          |

|00000020|04     |05EFFF30|00650AA2|Server.exe
|00250AA2|EExceptionManager      |
|DefaultThreadHandleException                              |2852[5]   |

|00000020|04     |05EFFF78|00553423|Server.exe    |00153423|EThreadsManager
|                                                   |ThreadWrapper
|611[11]   |

|00000020|03     |05EFFF8C|75FD33C8|kernel32.dll  |000133C8|kernel32
|                                                   |BaseThreadInitThunk
|          |

|7FFFFFFE|03     |00000000|00641AA8|Server.exe    |00241AA8|Vcl.SvcMgr
|TServiceThread                                     |Create
|          |

|---------------------------------------------------------------------------
----------------------------------------------------------------------------
-----------------------------------------------------|

 

What I can see from here is that it is hang in ZwDeviceIoControlFile routine
from ntdll that was called from ioctlsocket which was called by ICS.

 

In this debug that was captured, the main thread is hang because that is
where this specific socket is running, but we have found this issue in
another part of our system that actually runs the socket in a separated
thread, then, just that thread would hang…

 

>From what I could tell, that must be something related to Operating System,
maybe a faulty driver or update that was done because our software was
running for over 2 years in 2 different servers and suddenly on December
15/16 it started crashing (hanging), but BOTH servers started doing it..
which could make me eliminate a hardware issue with the server…

 

 

Does anybody has any ideas on why on earth ioctlsocket would hang when
passing FIONREAD parameter that is what ASyncReceive does??

 

The recent customer who reported this error is running Windows 7
Professional

 

Thanks!!

Eric Fleming Bonilha

Digifort

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to