YOu will have to attach a debugger to the process to figure out what is
going wrong. It could be a whole host of things, and debugging the process
is the first step to getting a resolution on this.
Also, since you are not able to connect to the process using telnet, it
could mean that the machine is out of ports. Can you do a "netstat -n -P
TCP" to see what is the connection state on that machine?

Signature
feroze
-----------------
This posting is provided as-is. It offers no warranties and assigns no
rights.
See http://weblogs.asp.net/feroze_daud for System.Net related posts.
----------------
> Hi,
> I am diagnosing a strange problem in .NET service (written in C#,
[quoted text clipped - 34 lines]
> Regards,
> Goran
Goran Sliskovic - 27 Jun 2005 13:46 GMT
> YOu will have to attach a debugger to the process to figure out what is
> going wrong. It could be a whole host of things, and debugging the process
> is the first step to getting a resolution on this.
I know, but the problem is that this is remote installation which I have
limited access to and also this is not easily reproducible in lab. I am also
aware of the fact that there are lot of things which could lead to such
behaviour and I'm not claiming there is bug in .NET framework, rather I just
wanted to check whether somebody has noticed such deadlock (obviously, track
this bug will consume lot of time and effort).
> Also, since you are not able to connect to the process using telnet, it
> could mean that the machine is out of ports. Can you do a "netstat -n -P
> TCP" to see what is the connection state on that machine?
I did netstat, I connected with VNC and networking was functioning OK (I
mapped drive also). Only thing I noticed it that there are multiple idle
connections on remoting port (checked with TCPView also, CONNECTED state).
There were no suspicious connections (eg. LAST_ACK, CLOSE_WAIT state etc.).
It seems that when you disable/enable network connection, remoting opens new
connection and old one is never released, I have yet to check this. We had
lot of problems with remoting as there is no timeout on TCP channel. Timeout
on remoting call through TCP channel would be nice - we had to move some
calls to new thread and abort the thread on timeout which is bad to do.
Anyway, I have added one thread that will just touch one file every few
minutes. That thread does not acquire any locks, so it should not deadlock.
If it continues to work after rest is locked, I'll guess classical deadlock
in the app. I plan to remove all calls to lock(...) with my own lock
mechanisam that will throw on timeout, which should at least prevent
deadlock. Pitty that lock keyword does not support this...
Regards,
Goran
> > Hi,
> > I am diagnosing a strange problem in .NET service (written in C#,
[quoted text clipped - 34 lines]
> > Regards,
> > Goran
Goran Sliskovic - 28 Jun 2005 10:28 GMT
Hi,
Reproduced it in the debugger (started through DEV studio), but
unfortunatelly, IDE got totally locked also. Could not break execution (or
do anything else in the ide). All threads locked, even keepalive thread that
does not hold any locks. Very strange...
There were few sockets in CLOSE_WAIT state, few connected though other end
was shutdown.
Regards,
Goran
> YOu will have to attach a debugger to the process to figure out what is
> going wrong. It could be a whole host of things, and debugging the process
[quoted text clipped - 3 lines]
> could mean that the machine is out of ports. Can you do a "netstat -n -P
> TCP" to see what is the connection state on that machine?
gyurisc - 28 Jun 2005 19:14 GMT
You may try to use adplus (install with windbg) and try to take a hangdump
to figure it out why your service hangs.
How to use ADPlus to troubleshoot "hangs" and "crashes"
http://support.microsoft.com/default.aspx?scid=kb;en-us;286350
Cris
> Hi,
> Reproduced it in the debugger (started through DEV studio), but
[quoted text clipped - 17 lines]
>> could mean that the machine is out of ports. Can you do a "netstat -n -P
>> TCP" to see what is the connection state on that machine?
Goran Sliskovic - 29 Jun 2005 12:52 GMT
Thnx,
I have istalled new version of debugger but still I cannot attach to
process. It complains about other thread holding NT loader lock. I'll try
with adplus next hang, as unfortunatelly the process exited while I tried to
attach (obviously clicked wrong button). Though search on "NT loader lock"
returned some interesting articles which I have to check.
Regards,
Goran
> You may try to use adplus (install with windbg) and try to take a hangdump
> to figure it out why your service hangs.
...
Goran Sliskovic - 30 Jun 2005 18:16 GMT
Hi,
After few days of debugging and searching, it looks like
http://support.microsoft.com/?kbid=839343
could be my problem. It seems it is not included in SP1 (not listed on
http://support.microsoft.com/?kbid=867460).
Regards,
Goran
> YOu will have to attach a debugger to the process to figure out what is
> going wrong. It could be a whole host of things, and debugging the process
[quoted text clipped - 3 lines]
> could mean that the machine is out of ports. Can you do a "netstat -n -P
> TCP" to see what is the connection state on that machine?
...
Willy Denoyette [MVP] - 30 Jun 2005 21:31 GMT
Inline
Willy.
> Hi,
> After few days of debugging and searching, it looks like
[quoted text clipped - 3 lines]
> could be my problem. It seems it is not included in SP1 (not listed on
> http://support.microsoft.com/?kbid=867460).
The v1.1 SP1 build version is 2032, the fix has build number 1031, so these
fixes should be included.
Don't trust the list of SP1 fixes, not all fixes are included in the KB
lists.
> Regards,
> Goran
[quoted text clipped - 8 lines]
>> TCP" to see what is the connection state on that machine?
> ...