lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] tcp_tw_pcbs list corruption with rawapi. ideas?


From: Domen Puncer
Subject: Re: [lwip-users] tcp_tw_pcbs list corruption with rawapi. ideas?
Date: Wed, 28 Oct 2009 11:35:17 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

tl;dr: solved, thanks

On 26/10/09 14:46 +0000, Kieran Mansley wrote:
> On Mon, 2009-10-26 at 15:38 +0100, Domen Puncer wrote:
> 
> > I don't even see how this could happen, I've checked relevant code, and
> > it seems ok. So I'm asking for any tips, ideas, comments on how can I
> > track this down.
> 
> A bug in the application or driver results in two threads active in the
> lwIP stack at the same time.  They both try to modify the list and it
> results in the list being corrupted.

OK, I thought so, but strictly it was neither :-)

Description, in case someone cares.
I kept track of pcb in some of my structure and tcp_connect'ed two
different pcbs, but used the same structure, and then in connect
callback used the wrong pcb for tcp_write, which got me to:
"tcp_write() called in invalid state"

somewhere later that caused: "memp sanity" problems

and later that caused tcp_tw_pcbs/tcp_active_pcbs corruption - one got
linked into the other (and i'm guessing that happening twice caused the
"circular list").


Thanks!


        Domen




reply via email to

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