[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] MEMP_TCP_SEG leak
From: |
Per-Henrik Lundblom |
Subject: |
Re: [lwip-users] MEMP_TCP_SEG leak |
Date: |
Mon, 11 Nov 2013 11:32:20 +0100 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
* Per-Henrik Lundblom <address@hidden> [131105 15:02]:
> I'm using a pretty old lwIP version and identified a problem with
> leaking MEMP_TCP_SEGs. Reading the lwIP mailing list achives I found at
> least two other threads regarding this issue but the only fixes in the
> latest code versions are the addition of a few asserts for the fault
> conditions.
>
> Problem arises for me with TCP on bad WLAN links. The end result is that
> I get an incoming TCP packet through tcp_input(), (recv_flags &
> TF_CLOSED) is true, tcp_pcb_remove() is called. In turn tcp_pcb_purge()
> is called but at this point, (pcb->state == CLOSED) and the pcb->unsent
> and pcb->unacked queues are not freed. End result is that these segments
> are lost.
>
> The asserts added a couple of years ago can be found in tcp_pcb_remove()
> but I see no real cure for the problem. Analyzing the code I have a hard
> time to understand why the unsent and unacked queues aren't freed in
> tcp_pcb_purge() when in state CLOSED.
>
> Any input on this?
Is this something that should have been sent to the devel list instead?
/PH
--
Per-Henrik Lundblom email: address@hidden
phone: +46 733 207126 webpage: www.whatever.nu