lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Hanging in tcp_slowtmr


From: Kieran Mansley
Subject: Re: [lwip-users] Hanging in tcp_slowtmr
Date: Tue, 14 Nov 2006 14:09:02 +0000

On Tue, 2006-11-14 at 15:00 +0100, Jan Wester wrote:
> But if I now start the server program, the client polls the server two
> times successfully and then hangs. It hangs in the module tcp.c in
> function tcp_slowtmr in the section at the end of the function that
> starts with the comment:
> 
> /* Steps through all of the TIME-WAIT PCBs. */ Line 620
> 
> I am no expert on tcp/ip communication, so maybe I am not doing
> something right when a connection attempt fails.
> 
> What is the proper way to deal with an unsuccessful connection
> attempt?

Hard to say without more detail.  Two things spring to mind as possible:
 - you're leaking some resource on each unsuccessful connection attempt
that causes it to later lock up.
 - you haven't properly protected the stack from multiple threads
accessing it.  Timers are often implemented as a separate thread, and so
that would tie-up.

Both of these might be entirely wrong, but they fit with the sort of
thing that you're talking about.

For it to hang in that loop suggests that the list of PCBs has become
corrupt and (for example) has the same PCB on it twice, so if you try
and iterate it you loop indefinitely.

Kieran





reply via email to

[Prev in Thread] Current Thread [Next in Thread]