[Top][All Lists]

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

Re: [lwip-users] Infinite hang in tcp_slowtmr()

From: Stephen Cowell
Subject: Re: [lwip-users] Infinite hang in tcp_slowtmr()
Date: Mon, 12 Oct 2015 16:59:19 -0500
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 10/12/2015 3:41 PM, Sylvain Rochet wrote:
Hi Stephen,

On Mon, Oct 12, 2015 at 02:51:14PM -0500, Stephen Cowell wrote:
I find that I sometimes get an infinite loop when stepping to
I didn't have to read further. As usual, it looks like a broken port or
usage which violate lwIP threading model.


- Do *NOT* call anything in interrupt context, nothing, never,
absolutely never, use your OS semaphore signaling to an
Ethernet/serial/… RX thread

I don't think I'm doing that, Sylvain... this is non-OS, so there
are no 'threads'.   Atmel wrote the port.  I'm running sntp and ftpd, they
hook in using their own _init() routines that have not been

Here's more links describing the problem:



Why would a pcb->next pointer end up pointing to itself (pcb)?


Indeed... that's the whole problem.  I solved my problem with a hack that
nobody gets to see here... not sure why.

It looks like this code has had many bugs and problems... I'm glad I could
at least fix my issue.  I won't bother you with any more, since obviously
I'm not making it to the main list.

- memp_*, pbuf_*, functions are thread-safe if SYS_LIGHTWEIGHT_PROT is
set, and again, thread safe does not mean it is interrupt safe

- Do *NOT* call any function from the RAW API outside lwIP thread

- Use Netconn or Socket API in others threads, but keep in mind you
should not share a Netconn/Socket control block between threads, (or use
proper locking if you really have to, of course).

- Please read doc/rawapi.txt from the lwIP source which explain that
more comprehensively


lwip-users mailing list

reply via email to

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