lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] TCP - "last_unsent->oversize_left >= oversize_used" ass


From: Sylvain Rochet
Subject: Re: [lwip-users] TCP - "last_unsent->oversize_left >= oversize_used" asserts
Date: Sun, 1 Jul 2012 20:20:23 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hi,

On Sat, Jun 30, 2012 at 06:43:43PM +0200, Krzysztof Wesolowski wrote:
> > "last_unsent->oversize_left >= oversize_used
> > unsent_oversize mismatch (pcb->unsent is NULL)"
> >
> I have encounter same assert line while streaming big chunks of data
> using netconn API, so this is rather OVERSIZE related issue.

Actually, as expected, it was my fault :-)

I was calling the tcp_write() function in my telnet input handler 
(called through tcp_recv() callback) AND in my shell command handler 
through a telnet output stream callback.

tcp_write() is not thread safe, well, it is thread safe related to the 
lwIP thread, but it is not re-entrant, in other words it can be called 
outside of the lwIP thread but not by multiple threads at the same time.

I added a data loopback in my apps so that I am sending the raw telnet 
data from the lwIP thread to my shell thread which then call the telnet 
parse/negotiation functions, so that I only call tcp_write() from the 
shell thread, and it works like a charm.

Sylvain

Attachment: signature.asc
Description: Digital signature


reply via email to

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