EldoS | Feel safer!

Software components for data protection, secure storage and transfer

TCP transport hanging on Windows 2000

Also by EldoS: SecureBlackbox
200+ components and classes for digital security, signing, encryption and secure networking.
#1472
Posted: 10/19/2006 16:18:31
by Christopher Zielinski (Basic support level)
Joined: 04/16/2006
Posts: 28

Using MsgConnect on Windows 2000, I can get a lockup when I disable the TCP transport like this:

TCP.Active := False;

On Windows XP, we almost never get this type of lockup (we almost have to force it to happen).

What is so different about these two operating systems. More importantly, how do I prevent the lockup from occurring on Windows 2000?

Using TCPView (from SysInternals.com), I can see that the connection in question remains in an ESTABLISHED state for a little while and then is released. Unfortunately, if the connection is not released immediately, the application will hang up and will not un-hang when the connection does eventually get released.

Any and all help is most welcome and appreciated.
#1477
Posted: 10/20/2006 02:35:40
by Eugene Mayevski (EldoS Corp.)

Is this reproducible with any sample test? We did all development of MsgConnect on Win2K and did extensive tests on this platform. There's no platform-specific code there that could cause a problem of this kind.


Sincerely yours
Eugene Mayevski
#1487
Posted: 10/20/2006 08:48:44
by Christopher Zielinski (Basic support level)
Joined: 04/16/2006
Posts: 28

I am working on a sample test. Because it is a timing issue, it may be difficult to produce without some sort of "load" activity.

What I have found on Win2K and not on WinXP, is that making the transport inactive (even by freeing all MsgConnect components), will cause a hang. Under some conditions that have yet to be identified -- the hang can occur the first time, but usually it is after 3 to 20 iterations of going from disconnected to connected to disconnected again.

Unfortunately, it happens very easily at our customer's site, so we can take very little comfort in the fact that it is more difficult for us to produce this issue.

I have yet to be able to produce this issue on WinXP, but have been informed (from a relyable source), that it can be done if they really, really try to force it to occur... so I am not concerned at all about WinXP.
#1494
Posted: 10/20/2006 16:52:30
by Christopher Zielinski (Basic support level)
Joined: 04/16/2006
Posts: 28

While working on customer RFE's (Request For Enhancements), I have observed the following unexpected results with MsgConnect:

1. The TMCSocketTransport, OnDisconnected event never gets an event. Using TCPView (freeware from www.sysinternals.com), I verified that a TCP connection between to separate MsgConnect processes was established and was subsequently disconnected/broken, but I did not get an OnDisconnected event. The MsgConnect documentation says "InetTransport.OnDisconnected: This event is used to notify the application that a connection with given peer has been closed.", so I expected this event to occur under these circumstances.

Under what circumstances does the InetTransport.OnDisconnected event get an event?



2. Again using TCPView (freeware from www.sysinternals.com), I am observing the accumulation of open UDP port allocations. Each time I activate and deactive my applications MsgConnect transports (UDP and TCP), I observe that 4 UDP ports remain open (and I do not know why they were opened to begin with). For example:

LanCteClient.exe:3252 TCP ulysses:9031 ulysses:0 LISTENING
LanCteClient.exe:3252 TCP ulysses:3089 localhost:9030 ESTABLISHED
LanCteClient.exe:3252 UDP ulysses:3086 *:*
LanCteClient.exe:3252 UDP ulysses:3093 *:*
LanCteClient.exe:3252 UDP ulysses:3094 *:*
LanCteClient.exe:3252 UDP ulysses:3085 *:*
LanCteClient.exe:3252 UDP ulysses:3092 *:*
LanCteClient.exe:3252 UDP ulysses:3087 *:*
LanCteClient.exe:3252 UDP ulysses:3088 *:*
LanCteClient.exe:3252 UDP ulysses:9031 *:*

In the above, the TCP port allocations look fine, as does the open 9031 UDP and one other UDP to send MsgConnect UDP messages on. When I deactive the port, the 4 port allocations that I would expect, terminate as I would expect, but the 4 unexpected UDP ports remain open:

LanCteClient.exe:3252 UDP ulysses:3086 *:*
LanCteClient.exe:3252 UDP ulysses:3092 *:*
LanCteClient.exe:3252 UDP ulysses:3087 *:*
LanCteClient.exe:3252 UDP ulysses:3110 *:*

I perform the exact same test again, and I get the same results:

After activating transports
================================================================
LanCteClient.exe:3252 UDP ulysses:3086 *:*
LanCteClient.exe:3252 UDP ulysses:3092 *:*
LanCteClient.exe:3252 UDP ulysses:3087 *:*
LanCteClient.exe:3252 UDP ulysses:3110 *:*
LanCteClient.exe:3252 TCP ulysses:9031 ulysses:0 LISTENING
LanCteClient.exe:3252 TCP ulysses:3120 localhost:9030 ESTABLISHED
LanCteClient.exe:3252 UDP ulysses:3124 *:*
LanCteClient.exe:3252 UDP ulysses:3117 *:*
LanCteClient.exe:3252 UDP ulysses:3116 *:*
LanCteClient.exe:3252 UDP ulysses:3125 *:*
LanCteClient.exe:3252 UDP ulysses:3118 *:*
LanCteClient.exe:3252 UDP ulysses:3123 *:*
LanCteClient.exe:3252 UDP ulysses:3119 *:*
LanCteClient.exe:3252 UDP ulysses:9031 *:*

After de-activating transports
================================================================
LanCteClient.exe:3252 UDP ulysses:3086 *:*
LanCteClient.exe:3252 UDP ulysses:3092 *:*
LanCteClient.exe:3252 UDP ulysses:3087 *:*
LanCteClient.exe:3252 UDP ulysses:3110 *:*
LanCteClient.exe:3252 UDP ulysses:3117 *:*
LanCteClient.exe:3252 UDP ulysses:3118 *:*
LanCteClient.exe:3252 UDP ulysses:3123 *:*
LanCteClient.exe:3252 UDP ulysses:3133 *:*

Do you believe that this accumulation of open UDP ports may be a contributing factor to my "hanging" issue?


3. I have observed some possible memory leaks in MsgConnect. These possible MsgConnect memory leaks do not appear to impact the overall application that much. This is what I observed with MemChk (freeware from http://v.mahon.free.fr/pro/freeware/memcheck/), and I wonder if any of these possible memory leaks may be contributing to my "hanging" issue:


MemCheck version 2.73

Total leak: 4920 bytes


*** MEMCHK: Blocks STILL allocated ***

Leak #0 User allocated memory (GetMem)
Size: 512
1 Occurence
call stack - 0 : Module MCUtils.pas Routine @Mcutils@MCMemAlloc Line 130 Find error: 0051727A
call stack - 1 : Module MCSock.pas Routine @Mcsock@TMCSocket@Create Line 554 Find error: 006172EF
call stack - 2 : Module MCSock.pas Routine @Mcsock@TMCStdSocket@Create Line 734 Find error: 00617750
call stack - 3 : Module MCUDPSocket.pas Routine @Mcudpsocket@TMCUDPThread@Initialize Line 1356 Find error: 0061CA21
call stack - 4 : Module MCUDPSocket.pas Routine @Mcudpsocket@TMCUDPSenderThread@Initialize Line 563 Find error: 0061B084
call stack - 5 : Module MCUDPSocket.pas Routine @Mcudpsocket@TMCUDPTransport@DoSetActive Line 321 Find error: 0061A885
call stack - 6 : Module MCBase.pas Routine @Mcbase@TMCBaseTransport@SetActive Line 3203 Find error: 0051B995
call stack - 7 : Module dmComm.pas Routine @Dmcomm@TdmRsiComm@fSetActive Line 143 Find error: 00626979
call stack - 8 : Module dmCommCnt.pas Routine @Dmcommcnt@TdmRsiCommCnt@SignIn Line 161 Find error: 0063D97A
call stack - 9 : Module frmSignIn.pas Routine @Frmsignin@TfrmRsiSignIn@wizipgSigninFinishButtonClick Line 203 Find error: 0066EF58
call stack - 10 : Routine @Jvwizard@TJvWizardFinishButton@ButtonClick Find error: 00664049
call stack - 11 : Routine @Controls@TWinControl@WndProc Find error: 004A3CC4
call stack - 12 : Routine @Controls@DoControlMsg Find error: 004A3DFC
call stack - 13 : Routine @Controls@TWinControl@WndProc Find error: 004A3CC4
call stack - 14 : Routine @Controls@TWinControl@MainWndProc Find error: 004A393F
call stack - 15 : Routine @Classes@StdWndProc Find error: 0042C72A
call stack - 16 : (no debug info) Find error: 77D48730
call stack - 17 : (no debug info) Find error: 77D48812
call stack - 18 : (no debug info) Find error: 77D4B4BC
call stack - 19 : (no debug info) Find error: 77D4B508
call stack - 20 : (no debug info) Find error: 7C90EADF
call stack - 21 : (no debug info) Find error: 77D4B8FF
call stack - 22 : (no debug info) Find error: 773F7340
call stack - 23 : (no debug info) Find error: 773F7422
call stack - 24 : (no debug info) Find error: 773F9727
call stack - 25 : (no debug info) Find error: 77D48730
call stack - 26 : (no debug info) Find error: 77D48812

Leak #1 Instance of TMCStdSocket
Size: 634
1 Occurence
call stack - 0 : Module MCUDPSocket.pas Routine @Mcudpsocket@TMCUDPThread@Initialize Line 1356 Find error: 0061CA21
call stack - 1 : Module MCUDPSocket.pas Routine @Mcudpsocket@TMCUDPSenderThread@Initialize Line 563 Find error: 0061B084
call stack - 2 : Module MCUDPSocket.pas Routine @Mcudpsocket@TMCUDPTransport@DoSetActive Line 321 Find error: 0061A885
call stack - 3 : Module MCBase.pas Routine @Mcbase@TMCBaseTransport@SetActive Line 3203 Find error: 0051B995
call stack - 4 : Module dmComm.pas Routine @Dmcomm@TdmRsiComm@fSetActive Line 143 Find error: 00626979
call stack - 5 : Module dmCommCnt.pas Routine @Dmcommcnt@TdmRsiCommCnt@SignIn Line 161 Find error: 0063D97A
call stack - 6 : Module frmSignIn.pas Routine @Frmsignin@TfrmRsiSignIn@wizipgSigninFinishButtonClick Line 203 Find error: 0066EF58
call stack - 7 : Routine @Jvwizard@TJvWizardFinishButton@ButtonClick Find error: 00664049
call stack - 8 : Routine @Controls@TWinControl@WndProc Find error: 004A3CC4
call stack - 9 : Routine @Controls@DoControlMsg Find error: 004A3DFC
call stack - 10 : Routine @Controls@TWinControl@WndProc Find error: 004A3CC4
call stack - 11 : Routine @Controls@TWinControl@MainWndProc Find error: 004A393F
call stack - 12 : Routine @Classes@StdWndProc Find error: 0042C72A
call stack - 13 : (no debug info) Find error: 77D48730
call stack - 14 : (no debug info) Find error: 77D48812
call stack - 15 : (no debug info) Find error: 77D4B4BC
call stack - 16 : (no debug info) Find error: 77D4B508
call stack - 17 : (no debug info) Find error: 7C90EADF
call stack - 18 : (no debug info) Find error: 77D4B8FF
call stack - 19 : (no debug info) Find error: 773F7340
call stack - 20 : (no debug info) Find error: 773F7422
call stack - 21 : (no debug info) Find error: 773F9727
call stack - 22 : (no debug info) Find error: 77D48730
call stack - 23 : (no debug info) Find error: 77D48812
call stack - 24 : (no debug info) Find error: 77D4C63B
call stack - 25 : (no debug info) Find error: 77D4E901
call stack - 26 : Routine @Controls@TWinControl@DefaultHandler Find error: 004A3DA8

Leak #2 User allocated memory (GetMem)
Size: 512
1 Occurence
call stack - 0 : Module MCUtils.pas Routine @Mcutils@MCMemAlloc Line 130 Find error: 0051727A
call stack - 1 : Module MCSock.pas Routine @Mcsock@TMCSocket@Create Line 554 Find error: 006172EF
call stack - 2 : Module MCSock.pas Routine @Mcsock@TMCStdSocket@Create Line 734 Find error: 00617750
call stack - 3 : Module MCUDPSocket.pas Routine @Mcudpsocket@TMCUDPThread@Initialize Line 1351 Find error: 0061C9CC
call stack - 4 : Module MCUDPSocket.pas Routine @Mcudpsocket@TMCUDPSenderThread@Initialize Line 563 Find error: 0061B084
call stack - 5 : Module MCUDPSocket.pas Routine @Mcudpsocket@TMCUDPTransport@DoSetActive Line 321 Find error: 0061A885
call stack - 6 : Module MCBase.pas Routine @Mcbase@TMCBaseTransport@SetActive Line 3203 Find error: 0051B995
call stack - 7 : Module dmComm.pas Routine @Dmcomm@TdmRsiComm@fSetActive Line 143 Find error: 00626979
call stack - 8 : Module dmCommCnt.pas Routine @Dmcommcnt@TdmRsiCommCnt@SignIn Line 161 Find error: 0063D97A
call stack - 9 : Module frmSignIn.pas Routine @Frmsignin@TfrmRsiSignIn@wizipgSigninFinishButtonClick Line 203 Find error: 0066EF58
call stack - 10 : Routine @Jvwizard@TJvWizardFinishButton@ButtonClick Find error: 00664049
call stack - 11 : Routine @Controls@TWinControl@WndProc Find error: 004A3CC4
call stack - 12 : Routine @Controls@DoControlMsg Find error: 004A3DFC
call stack - 13 : Routine @Controls@TWinControl@WndProc Find error: 004A3CC4
call stack - 14 : Routine @Controls@TWinControl@MainWndProc Find error: 004A393F
call stack - 15 : Routine @Classes@StdWndProc Find error: 0042C72A
call stack - 16 : (no debug info) Find error: 77D48730
call stack - 17 : (no debug info) Find error: 77D48812
call stack - 18 : (no debug info) Find error: 77D4B4BC
call stack - 19 : (no debug info) Find error: 77D4B508
call stack - 20 : (no debug info) Find error: 7C90EADF
call stack - 21 : (no debug info) Find error: 77D4B8FF
call stack - 22 : (no debug info) Find error: 773F7340
call stack - 23 : (no debug info) Find error: 773F7422
call stack - 24 : (no debug info) Find error: 773F9727
call stack - 25 : (no debug info) Find error: 77D48730
call stack - 26 : (no debug info) Find error: 77D48812

Leak #3 Instance of TMCStdSocket
Size: 634
1 Occurence
call stack - 0 : Module MCUDPSocket.pas Routine @Mcudpsocket@TMCUDPThread@Initialize Line 1351 Find error: 0061C9CC
call stack - 1 : Module MCUDPSocket.pas Routine @Mcudpsocket@TMCUDPSenderThread@Initialize Line 563 Find error: 0061B084
call stack - 2 : Module MCUDPSocket.pas Routine @Mcudpsocket@TMCUDPTransport@DoSetActive Line 321 Find error: 0061A885
call stack - 3 : Module MCBase.pas Routine @Mcbase@TMCBaseTransport@SetActive Line 3203 Find error: 0051B995
call stack - 4 : Module dmComm.pas Routine @Dmcomm@TdmRsiComm@fSetActive Line 143 Find error: 00626979
call stack - 5 : Module dmCommCnt.pas Routine @Dmcommcnt@TdmRsiCommCnt@SignIn Line 161 Find error: 0063D97A
call stack - 6 : Module frmSignIn.pas Routine @Frmsignin@TfrmRsiSignIn@wizipgSigninFinishButtonClick Line 203 Find error: 0066EF58
call stack - 7 : Routine @Jvwizard@TJvWizardFinishButton@ButtonClick Find error: 00664049
call stack - 8 : Routine @Controls@TWinControl@WndProc Find error: 004A3CC4
call stack - 9 : Routine @Controls@DoControlMsg Find error: 004A3DFC
call stack - 10 : Routine @Controls@TWinControl@WndProc Find error: 004A3CC4
call stack - 11 : Routine @Controls@TWinControl@MainWndProc Find error: 004A393F
call stack - 12 : Routine @Classes@StdWndProc Find error: 0042C72A
call stack - 13 : (no debug info) Find error: 77D48730
call stack - 14 : (no debug info) Find error: 77D48812
call stack - 15 : (no debug info) Find error: 77D4B4BC
call stack - 16 : (no debug info) Find error: 77D4B508
call stack - 17 : (no debug info) Find error: 7C90EADF
call stack - 18 : (no debug info) Find error: 77D4B8FF
call stack - 19 : (no debug info) Find error: 773F7340
call stack - 20 : (no debug info) Find error: 773F7422
call stack - 21 : (no debug info) Find error: 773F9727
call stack - 22 : (no debug info) Find error: 77D48730
call stack - 23 : (no debug info) Find error: 77D48812
call stack - 24 : (no debug info) Find error: 77D4C63B
call stack - 25 : (no debug info) Find error: 77D4E901
call stack - 26 : Routine @Controls@TWinControl@DefaultHandler Find error: 004A3DA8

Leak #4 User allocated memory (GetMem)
Size: 512
1 Occurence
call stack - 0 : Module MCUtils.pas Routine @Mcutils@MCMemAlloc Line 130 Find error: 0051727A
call stack - 1 : Module MCSock.pas Routine @Mcsock@TMCSocket@Create Line 554 Find error: 006172EF
call stack - 2 : Module MCSock.pas Routine @Mcsock@TMCStdSocket@Create Line 734 Find error: 00617750
call stack - 3 : Module MCUDPSocket.pas Routine @Mcudpsocket@TMCUDPThread@Initialize Line 1356 Find error: 0061CA21
call stack - 4 : Module MCUDPSocket.pas Routine @Mcudpsocket@TMCUDPReceiverThread@Initialize Line 956 Find error: 0061BD64
call stack - 5 : Module MCUDPSocket.pas Routine @Mcudpsocket@TMCUDPTransport@DoSetActive Line 308 Find error: 0061A7FE
call stack - 6 : Module MCBase.pas Routine @Mcbase@TMCBaseTransport@SetActive Line 3203 Find error: 0051B995
call stack - 7 : Module dmComm.pas Routine @Dmcomm@TdmRsiComm@fSetActive Line 143 Find error: 00626979
call stack - 8 : Module dmCommCnt.pas Routine @Dmcommcnt@TdmRsiCommCnt@SignIn Line 161 Find error: 0063D97A
call stack - 9 : Module frmSignIn.pas Routine @Frmsignin@TfrmRsiSignIn@wizipgSigninFinishButtonClick Line 203 Find error: 0066EF58
call stack - 10 : Routine @Jvwizard@TJvWizardFinishButton@ButtonClick Find error: 00664049
call stack - 11 : Routine @Controls@TWinControl@WndProc Find error: 004A3CC4
call stack - 12 : Routine @Controls@DoControlMsg Find error: 004A3DFC
call stack - 13 : Routine @Controls@TWinControl@WndProc Find error: 004A3CC4
call stack - 14 : Routine @Controls@TWinControl@MainWndProc Find error: 004A393F
call stack - 15 : Routine @Classes@StdWndProc Find error: 0042C72A
call stack - 16 : (no debug info) Find error: 77D48730
call stack - 17 : (no debug info) Find error: 77D48812
call stack - 18 : (no debug info) Find error: 77D4B4BC
call stack - 19 : (no debug info) Find error: 77D4B508
call stack - 20 : (no debug info) Find error: 7C90EADF
call stack - 21 : (no debug info) Find error: 77D4B8FF
call stack - 22 : (no debug info) Find error: 773F7340
call stack - 23 : (no debug info) Find error: 773F7422
call stack - 24 : (no debug info) Find error: 773F9727
call stack - 25 : (no debug info) Find error: 77D48730
call stack - 26 : (no debug info) Find error: 77D48812

Leak #5 Instance of TMCStdSocket
Size: 634
1 Occurence
call stack - 0 : Module MCUDPSocket.pas Routine @Mcudpsocket@TMCUDPThread@Initialize Line 1356 Find error: 0061CA21
call stack - 1 : Module MCUDPSocket.pas Routine @Mcudpsocket@TMCUDPReceiverThread@Initialize Line 956 Find error: 0061BD64
call stack - 2 : Module MCUDPSocket.pas Routine @Mcudpsocket@TMCUDPTransport@DoSetActive Line 308 Find error: 0061A7FE
call stack - 3 : Module MCBase.pas Routine @Mcbase@TMCBaseTransport@SetActive Line 3203 Find error: 0051B995
call stack - 4 : Module dmComm.pas Routine @Dmcomm@TdmRsiComm@fSetActive Line 143 Find error: 00626979
call stack - 5 : Module dmCommCnt.pas Routine @Dmcommcnt@TdmRsiCommCnt@SignIn Line 161 Find error: 0063D97A
call stack - 6 : Module frmSignIn.pas Routine @Frmsignin@TfrmRsiSignIn@wizipgSigninFinishButtonClick Line 203 Find error: 0066EF58
call stack - 7 : Routine @Jvwizard@TJvWizardFinishButton@ButtonClick Find error: 00664049
call stack - 8 : Routine @Controls@TWinControl@WndProc Find error: 004A3CC4
call stack - 9 : Routine @Controls@DoControlMsg Find error: 004A3DFC
call stack - 10 : Routine @Controls@TWinControl@WndProc Find error: 004A3CC4
call stack - 11 : Routine @Controls@TWinControl@MainWndProc Find error: 004A393F
call stack - 12 : Routine @Classes@StdWndProc Find error: 0042C72A
call stack - 13 : (no debug info) Find error: 77D48730
call stack - 14 : (no debug info) Find error: 77D48812
call stack - 15 : (no debug info) Find error: 77D4B4BC
call stack - 16 : (no debug info) Find error: 77D4B508
call stack - 17 : (no debug info) Find error: 7C90EADF
call stack - 18 : (no debug info) Find error: 77D4B8FF
call stack - 19 : (no debug info) Find error: 773F7340
call stack - 20 : (no debug info) Find error: 773F7422
call stack - 21 : (no debug info) Find error: 773F9727
call stack - 22 : (no debug info) Find error: 77D48730
call stack - 23 : (no debug info) Find error: 77D48812
call stack - 24 : (no debug info) Find error: 77D4C63B
call stack - 25 : (no debug info) Find error: 77D4E901
call stack - 26 : Routine @Controls@TWinControl@DefaultHandler Find error: 004A3DA8

Leak #6 User allocated memory (GetMem)
Size: 512
1 Occurence
call stack - 0 : Module MCUtils.pas Routine @Mcutils@MCMemAlloc Line 130 Find error: 0051727A
call stack - 1 : Module MCSock.pas Routine @Mcsock@TMCSocket@Create Line 554 Find error: 006172EF
call stack - 2 : Module MCSock.pas Routine @Mcsock@TMCStdSocket@Create Line 734 Find error: 00617750
call stack - 3 : Module MCUDPSocket.pas Routine @Mcudpsocket@TMCUDPThread@Initialize Line 1351 Find error: 0061C9CC
call stack - 4 : Module MCUDPSocket.pas Routine @Mcudpsocket@TMCUDPReceiverThread@Initialize Line 956 Find error: 0061BD64
call stack - 5 : Module MCUDPSocket.pas Routine @Mcudpsocket@TMCUDPTransport@DoSetActive Line 308 Find error: 0061A7FE
call stack - 6 : Module MCBase.pas Routine @Mcbase@TMCBaseTransport@SetActive Line 3203 Find error: 0051B995
call stack - 7 : Module dmComm.pas Routine @Dmcomm@TdmRsiComm@fSetActive Line 143 Find error: 00626979
call stack - 8 : Module dmCommCnt.pas Routine @Dmcommcnt@TdmRsiCommCnt@SignIn Line 161 Find error: 0063D97A
call stack - 9 : Module frmSignIn.pas Routine @Frmsignin@TfrmRsiSignIn@wizipgSigninFinishButtonClick Line 203 Find error: 0066EF58
call stack - 10 : Routine @Jvwizard@TJvWizardFinishButton@ButtonClick Find error: 00664049
call stack - 11 : Routine @Controls@TWinControl@WndProc Find error: 004A3CC4
call stack - 12 : Routine @Controls@DoControlMsg Find error: 004A3DFC
call stack - 13 : Routine @Controls@TWinControl@WndProc Find error: 004A3CC4
call stack - 14 : Routine @Controls@TWinControl@MainWndProc Find error: 004A393F
call stack - 15 : Routine @Classes@StdWndProc Find error: 0042C72A
call stack - 16 : (no debug info) Find error: 77D48730
call stack - 17 : (no debug info) Find error: 77D48812
call stack - 18 : (no debug info) Find error: 77D4B4BC
call stack - 19 : (no debug info) Find error: 77D4B508
call stack - 20 : (no debug info) Find error: 7C90EADF
call stack - 21 : (no debug info) Find error: 77D4B8FF
call stack - 22 : (no debug info) Find error: 773F7340
call stack - 23 : (no debug info) Find error: 773F7422
call stack - 24 : (no debug info) Find error: 773F9727
call stack - 25 : (no debug info) Find error: 77D48730
call stack - 26 : (no debug info) Find error: 77D48812

Leak #7 Instance of TMCStdSocket
Size: 634
1 Occurence
call stack - 0 : Module MCUDPSocket.pas Routine @Mcudpsocket@TMCUDPThread@Initialize Line 1351 Find error: 0061C9CC
call stack - 1 : Module MCUDPSocket.pas Routine @Mcudpsocket@TMCUDPReceiverThread@Initialize Line 956 Find error: 0061BD64
call stack - 2 : Module MCUDPSocket.pas Routine @Mcudpsocket@TMCUDPTransport@DoSetActive Line 308 Find error: 0061A7FE
call stack - 3 : Module MCBase.pas Routine @Mcbase@TMCBaseTransport@SetActive Line 3203 Find error: 0051B995
call stack - 4 : Module dmComm.pas Routine @Dmcomm@TdmRsiComm@fSetActive Line 143 Find error: 00626979
call stack - 5 : Module dmCommCnt.pas Routine @Dmcommcnt@TdmRsiCommCnt@SignIn Line 161 Find error: 0063D97A
call stack - 6 : Module frmSignIn.pas Routine @Frmsignin@TfrmRsiSignIn@wizipgSigninFinishButtonClick Line 203 Find error: 0066EF58
call stack - 7 : Routine @Jvwizard@TJvWizardFinishButton@ButtonClick Find error: 00664049
call stack - 8 : Routine @Controls@TWinControl@WndProc Find error: 004A3CC4
call stack - 9 : Routine @Controls@DoControlMsg Find error: 004A3DFC
call stack - 10 : Routine @Controls@TWinControl@WndProc Find error: 004A3CC4
call stack - 11 : Routine @Controls@TWinControl@MainWndProc Find error: 004A393F
call stack - 12 : Routine @Classes@StdWndProc Find error: 0042C72A
call stack - 13 : (no debug info) Find error: 77D48730
call stack - 14 : (no debug info) Find error: 77D48812
call stack - 15 : (no debug info) Find error: 77D4B4BC
call stack - 16 : (no debug info) Find error: 77D4B508
call stack - 17 : (no debug info) Find error: 7C90EADF
call stack - 18 : (no debug info) Find error: 77D4B8FF
call stack - 19 : (no debug info) Find error: 773F7340
call stack - 20 : (no debug info) Find error: 773F7422
call stack - 21 : (no debug info) Find error: 773F9727
call stack - 22 : (no debug info) Find error: 77D48730
call stack - 23 : (no debug info) Find error: 77D48812
call stack - 24 : (no debug info) Find error: 77D4C63B
call stack - 25 : (no debug info) Find error: 77D4E901
call stack - 26 : Routine @Controls@TWinControl@DefaultHandler Find error: 004A3DA8

Leak #8 Instance of TMemoryStream
Size: 20
5 Occurences
call stack - 0 : Module dmAccess.pas Routine @Dmaccess@CzCallScriptingLength Line 133 Find error: 006448B3
call stack - 1 : Module dmAccess.pas Routine @Dmaccess@CzCallScriptingGet Line 145 Find error: 00644911
call stack - 2 : Module frmWinScriptHost.pas Routine __AddScriptCode Line 236 Find error: 00695ED8
call stack - 3 : Module frmWinScriptHost.pas(no debug info) Line 277 Find error: 00696110
call stack - 4 : Module frmWinScriptHost.pas Routine @Frmwinscripthost@TfrmCzWinScriptHost@FormCreate Line 88 Find error: 0069596D
call stack - 5 : Routine @Forms@TCustomForm@DoCreate Find error: 00488AEB
call stack - 6 : Routine @Forms@TCustomForm@AfterConstruction Find error: 004887CB
call stack - 7 : Module frmClient.pas Routine @Frmclient@TfrmRsiClient@Initialize Line 373 Find error: 0069DE8E
call stack - 8 : Module LanCteClient.dpr Routine initialization Line 163 Find error: 006AB96B
call stack - 9 : (no debug info) Find error: 7C816FD3
call stack - 10 : (no debug info) Find error: FFFFFFFC

Leak #9 Instance of TMemoryStream
Size: 20
5 Occurences
call stack - 0 : Module dmAccess.pas Routine @Dmaccess@CzCallScriptingLength Line 133 Find error: 006448B3
call stack - 1 : Module dmAccess.pas Routine @Dmaccess@CzCallScriptingGet Line 145 Find error: 00644911
call stack - 2 : Module frmWinScriptHost.pas Routine __AddScriptCode Line 236 Find error: 00695ED8
call stack - 3 : Module frmWinScriptHost.pas(no debug info) Line 276 Find error: 006960F6
call stack - 4 : Module frmWinScriptHost.pas Routine @Frmwinscripthost@TfrmCzWinScriptHost@FormCreate Line 88 Find error: 0069596D
call stack - 5 : Routine @Forms@TCustomForm@DoCreate Find error: 00488AEB
call stack - 6 : Routine @Forms@TCustomForm@AfterConstruction Find error: 004887CB
call stack - 7 : Module frmClient.pas Routine @Frmclient@TfrmRsiClient@Initialize Line 373 Find error: 0069DE8E
call stack - 8 : Module LanCteClient.dpr Routine initialization Line 163 Find error: 006AB96B
call stack - 9 : (no debug info) Find error: 7C816FD3
call stack - 10 : (no debug info) Find error: FFFFFFFC

Leak #10 Instance of TStringList
Size: 48
1 Occurence
call stack - 0 : Module frmClient.pas Routine @Frmclient@TfrmRsiClient@Initialize Line 339 Find error: 0069DC62
call stack - 1 : Module LanCteClient.dpr Routine initialization Line 163 Find error: 006AB96B
call stack - 2 : (no debug info) Find error: 7C816FD3
call stack - 3 : (no debug info) Find error: FFFFFFFC

Leak #11 Instance of TList
Size: 16
1 Occurence
call stack - 0 : Routine @Classes@TCollection@Create Find error: 00422DC1
call stack - 1 : Module frmClient.pas Routine @Frmclient@TfrmRsiClient@Initialize Line 332 Find error: 0069DC08
call stack - 2 : Module LanCteClient.dpr Routine initialization Line 163 Find error: 006AB96B
call stack - 3 : (no debug info) Find error: 7C816FD3
call stack - 4 : (no debug info) Find error: FFFFFFFC

Leak #12 Instance of TServerNodes
Size: 24
1 Occurence
call stack - 0 : Module frmClient.pas Routine @Frmclient@TfrmRsiClient@Initialize Line 332 Find error: 0069DC08
call stack - 1 : Module LanCteClient.dpr Routine initialization Line 163 Find error: 006AB96B
call stack - 2 : (no debug info) Find error: 7C816FD3
call stack - 3 : (no debug info) Find error: FFFFFFFC

Leak #13 Instance of TStringList
Size: 48
1 Occurence
call stack - 0 : Routine @Rmtabs3x@TrmTabSet@Create Find error: 0068CD9D
call stack - 1 : (no debug info) Find error: 004265D4
call stack - 2 : Routine @Classes@TReader@ReadComponent Find error: 00426805
call stack - 3 : Routine @Classes@TReader@ReadDataInner Find error: 00426AB2
call stack - 4 : Routine @Classes@TReader@ReadData Find error: 00426A20
call stack - 5 : Routine @Classes@TComponent@ReadState Find error: 0042B4DE
call stack - 6 : Routine @Classes@TReader@ReadComponent Find error: 00426898
call stack - 7 : Routine @Classes@TReader@ReadDataInner Find error: 00426AB2
call stack - 8 : Routine @Classes@TReader@ReadData Find error: 004269F1
call stack - 9 : Routine @Classes@TComponent@ReadState Find error: 0042B4DE
call stack - 10 : Routine @Forms@TCustomForm@ReadState Find error: 00488D48
call stack - 11 : Routine @Classes@TReader@ReadRootComponent Find error: 004277F0
call stack - 12 : Routine @Classes@TStream@ReadComponent Find error: 00424EE3
call stack - 13 : Routine @Classes@InternalReadComponentRes Find error: 00421228
call stack - 14 : (no debug info) Find error: 004213B2
call stack - 15 : Routine @Classes@InitInheritedComponent Find error: 00421443
call stack - 16 : Routine @Forms@TCustomForm@Create Find error: 004886CE
call stack - 17 : Routine @Forms@TApplication@CreateForm Find error: 00490088
call stack - 18 : Module LanCteClient.dpr Routine initialization Line 162 Find error: 006AB95F
call stack - 19 : (no debug info) Find error: 7C816FD3
call stack - 20 : (no debug info) Find error: FFFFFFFC

*** MEMCHK: End of allocated blocks ***


*** MEMCHK: Chronological leak information ***

* Instance of TStringList (Leak #13) Size: 48
* Instance of TServerNodes (Leak #12) Size: 24
* Instance of TList (Leak #11) Size: 16
* Instance of TStringList (Leak #10) Size: 48
* Instance of TMemoryStream (Leak #9) Size: 20
* Instance of TMemoryStream (Leak #9) Size: 20
* Instance of TMemoryStream (Leak #9) Size: 20
* Instance of TMemoryStream (Leak #9) Size: 20
* Instance of TMemoryStream (Leak #9) Size: 20
* Instance of TMemoryStream (Leak #8) Size: 20
* Instance of TMemoryStream (Leak #8) Size: 20
* Instance of TMemoryStream (Leak #8) Size: 20
* Instance of TMemoryStream (Leak #8) Size: 20
* Instance of TMemoryStream (Leak #8) Size: 20
* Instance of TMCStdSocket (Leak #7) Size: 634
* User allocated memory (GetMem) (Leak #6) Size: 512
* Instance of TMCStdSocket (Leak #5) Size: 634
* User allocated memory (GetMem) (Leak #4) Size: 512
* Instance of TMCStdSocket (Leak #3) Size: 634
* User allocated memory (GetMem) (Leak #2) Size: 512
* Instance of TMCStdSocket (Leak #1) Size: 634
* User allocated memory (GetMem) (Leak #0) Size: 512

*** MEMCHK: End of chronological leak information ***


*** MEMCHK: Blocks written to after destruction ***

Bad blocks count: 0


*** MEMCHK: End of blocks written to after destruction ***

#1495
Posted: 10/21/2006 13:54:15
by Christopher Zielinski (Basic support level)
Joined: 04/16/2006
Posts: 28

For your convenience, attached hereto is a demonstration of the reported issues and you can download the other freeware utilities from the aforementioned URLs.


[ Download ]
#1496
Posted: 10/22/2006 01:58:45
by Eugene Mayevski (EldoS Corp.)

Quote
Christopher Zielinski wrote:
1. The TMCSocketTransport, OnDisconnected event never gets an event. Using TCPView (freeware from www.sysinternals.com), I verified that a TCP connection between to separate MsgConnect processes was established and was subsequently disconnected/broken, but I did not get an OnDisconnected event. The MsgConnect documentation says "InetTransport.OnDisconnected: This event is used to notify the application that a connection with given peer has been closed.", so I expected this event to occur under these circumstances.

Under what circumstances does the InetTransport.OnDisconnected event get an event?


If you look at ClientExecute, you see the following code:

Code
        try
          //OutputDebugString('Socket started');
          PerformRecvSend(ErrorFlag, CloseConnection, Timeout);
          //OutputDebugString('Socket shut down');
        finally
          FinalizeConnection;
        end;


FinalizeConnection fires an event. I.e. if there was a connection established in a normal way, there must be OnDisconnected fired.

About UDP ports. This can be related to your problem. MsgConnect uses UDP ports for interthread communications, i.e. to notify the worker thread about some event (either presense of the message to be sent or required shutdown). Your blocking (and opened UDP ports) can mean that UDP fails on certain stage.

I will check your sample today.


Sincerely yours
Eugene Mayevski
#1532
Posted: 10/23/2006 12:37:17
by Eugene Mayevski (EldoS Corp.)

Can you please describe the test, and tell me how exactly I should use the test to reproduce the issue?


Sincerely yours
Eugene Mayevski
#1533
Posted: 10/23/2006 12:51:45
by Christopher Zielinski (Basic support level)
Joined: 04/16/2006
Posts: 28

Sure.

1. Started TCPView.
2. Started Server application (source code already provided in this forum).
3. Started Client application (source code already provided in this forum).
4. Clicked on the Client "Edit" button (this make the Client transports inactive).
5. Made the observations already noted above.

This was done on Windows 2000 and Windows XP and the same results were observed, although I could not get this Client to hang, it clearly demonstrates the accumulation of open UDP ports (that I believe is the underlying cause to the other issues we are encountering), and memory leak (one memory leak for each open UDP port artifact).

I am using MsgConnect - version 1.5.7.48 - Released June 22, 2006 with Delphi 7 Enterprise (Build 8.1), on Windows XP (Build 2600: Service Pack 2).

Note: I really like MsgConnect and hope that we will find a quick resolution to this/these issues
#1547
Posted: 10/25/2006 04:18:59
by Eugene Mayevski (EldoS Corp.)

UDP sockets which you see as orphan after turning off the client have some relationship to UDP transport. These are not MsgConnect's sockets, i.e. all sockets that MsgConnect creates, are closed correctly (I have just checked this). I continue to investigate the question.

Now about hanging on shutdown. Can you please do a small test - disable UDP transport and see how the test behaves on Win2K? I am trying to narrow the problem down to one of transports, and UDP seems to be the case.


Sincerely yours
Eugene Mayevski
#1548
Posted: 10/25/2006 06:02:58
by Eugene Mayevski (EldoS Corp.)

The problem with UDP sockets is solved, and new build will be available tomorrow. I think you need to try the new build in regards to Win2K hanging.


Sincerely yours
Eugene Mayevski
Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages

Reply

Statistics

Topic viewed 15873 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!