lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] LWIP - TCP receive assert failed


From: Sylvain Rochet
Subject: Re: [lwip-users] LWIP - TCP receive assert failed
Date: Sat, 17 Jan 2015 12:43:31 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Hello Jackie,

On Fri, Jan 16, 2015 at 09:47:06PM +0100, address@hidden wrote:
> Jackie:
> > After stress test and debugging, more than 10 hours uploading
> > data, I found the PCB got corrupt in tcp_output(). The case is
> > that tcp_output() can be blocked by the lower-level function call
> > in tcp_output_segment(), in which somehow the buffer of
> > lower-layer protocol is full, so the upper-layer is pending, and
> > at the same time, tcp timer is running,  tcp_slowtmr() is also
> > calling tcp_output(), so this tcp_output() is called before the
> 
> There you got the bug: when lwIP's threading requirements are
> observed, this can't happen: tcp_output() can never be called twice
> and thus does not have to be designed reentrant.
> 
> What you describe tells us that timers are checked from a different
> execution thread (thread or ISR) than output. But for the core lwIP
> code, you have to ensure this doesn't happen. That's all.

Indeed…

Jackie: please discard my previous mail, however I told you to check 
first if threading requirements are respected ;-)  (I know this isn't 
easy to do on third-party software.)

This is sad that an insane amount of reported bugs are about threading 
issues, this made me cringe about the overall code quality in shipped 
embedded devices.

Sylvain

Attachment: signature.asc
Description: Digital signature


reply via email to

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