Login  
Search All Forums
Dart Home | C++ Professional Toolkit | Custom Development Reply | C++ Professional Toolkit Topics | Forums   
AuthorForum: C++ Professional Toolkit
Topic: PowerTCP C++ class libraries hang in CPowerTelnet Constructor
busybill

From: Salt Lake City, UT USA
Posts: 6
Member Since: 09/06/01
posted December 14, 2011 12:35 PM

After extended use a call to instantiate CPowerTelnet will hang.
Here is the stack trace:
ChildEBP RetAddr Caller, Callee
0012e33c 7c90df5a ntdll!NtWaitForSingleObject+0xc
0012e340 7c919b23 ntdll!RtlpWaitForCriticalSection+0x132, calling ntdll!ZwWaitForSingleObject
0012e368 7c911ac1 ntdll!LdrpAccessResourceDataNoMultipleLanguage+0x124, calling ntdll!_SEH_epilog
0012e378 7c910323 ntdll!RtlpImageNtHeader+0x56, calling ntdll!_SEH_epilog
0012e3b4 7c911ac1 ntdll!LdrpAccessResourceDataNoMultipleLanguage+0x124, calling ntdll!_SEH_epilog
0012e3c8 7c901046 ntdll!RtlEnterCriticalSection+0x46, calling ntdll!RtlpWaitForCriticalSection
0012e3d0 063028e2 PctDll!CWinsock::Lock+0x2e, calling ntdll!RtlEnterCriticalSection
0012e3dc 06302768 PctDll!CWinsock::CWinsock+0x3e, calling PctDll!CWinsock::Lock
0012e3f0 78ab0269 *** ERROR: Symbol file could not be found. Defaulted to export symbols for msvcr100.dll -
msvcr100!malloc+0x36, calling ntdll!RtlAllocateHeap
0012e410 78ab02d1 msvcr100!operator new+0x10, calling msvcr100!malloc
0012e41c 063017ca PctDll!CTcp::CTcp+0xc, calling PctDll!CWinsock::CWinsock
0012e428 06301730 PctDll!CPowerTcp::CPowerTcp+0x1e, calling PctDll!CTcp::CTcp
0012e438 0630128f PctDll!CPowerTelnet::CPowerTelnet+0xc, calling PctDll!CPowerTcp::CPowerTcp
0012e444 062bf857 PctDll!CCommBuff::CCommBuff+0x37, calling PctDll!CPowerTelnet::CPowerTelnet

Any ideas on the reason for this thread deadlock?

-Bill Peters
Intermountain Healthcare
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted December 15, 2011 12:10 PM

Hi. I can't really tell what's going on from the stack trace. Can you please tell me the exact steps I need to take to duplicate the problem? If possible please send a bare bones sample program that causes the behavior you describe. If you can do that, please send the source code to support@dart.com

Thanks
busybill

From: Salt Lake City, UT USA
Posts: 6
Member Since: 09/06/01
posted December 15, 2011 12:56 PM

While I could provide the source code, I'm not sure how much good it would do. This issue occurs only after 5-6 hours of running with multiple concurrent telnet sessions with occasional connects and disconnects. The code that uses the CPowerTelnet class is in an ActiveX Control which in turn is hosted in another application.
The software connects to hosts using a proprietary protocol (not VTxxx) which wouldn't work on hosts that you would have available.

I was just wondering if there is any clue in the source code for your CWinsock::Lock method that would give a clue as to how it could hang. Exhausted limited resources? Memory Leak? System Resource contention?

-Bill
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted December 15, 2011 5:00 PM

It appears that somewhere in our code we are attempting to enter a critical section before we have left a previously entered critcal section.

In order to find the cause we will need to setup extensive testing to see if we can find first duplicate the problem and second make changes to the library.

It's been quite a while since this code has been touched and since no one has reported this problem in the years since then it will likely require a great deal of time to get to the bottom of the issue.

Please contact Jamie Powell ( jamie.powell@dart.com ) if you would like to discuss the options that are available.

Reply | C++ Professional Toolkit Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX