lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Lock in tcp_in


From: Kieran Mansley
Subject: Re: [lwip-users] Lock in tcp_in
Date: Mon, 07 Sep 2009 08:55:33 +0100

On Mon, 2009-09-07 at 09:48 +0200, Lou Cypher wrote:
> I'm using lwIP 1.3.1 and I had a couple of very infrequent locks happening.
> The problem (from what I know) arose only two times, over many packets and
> switch on/off of my embedded device, in a few months.
> Last time it happened I had the debugger active, so I could find where it
> happened, but since I was short in time for many reasons, I just take notes
> about it.
> 
> The system is running some services through TCP/IP, client and server, one of
> them is an HTTP server, and the flaw happened on local port 80.
> I had the code stuck in the for() loop starting on line 207 of tcp_in.c,
> ----------------------------------------------------------------------------
>     for(pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) {
> ----------------------------------------------------------------------------
> and it couldn't exit from there, since I had pcb->next == pcb, so there was no
> NULL pointer to stop it, but a rewind to itself.

Such bugs with corrupt PCB lists have always in the past been two
threads (e.g. interrupt, timer, or application) active in lwIP at the
same time.  This fits very well with your description.

Kieran





reply via email to

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