lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] LWIP crash


From: Sylvain Rochet
Subject: Re: [lwip-users] LWIP crash
Date: Fri, 7 Sep 2012 10:17:23 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hi Anil,

On Fri, Sep 07, 2012 at 11:09:47AM +0530, Anil kumar wrote:
> We are using lwip as a linux kernel module in a multi threaded environment.
> 
> Here is the sequence of events that are leading to the crash in my case.
> 
> As the application is continuously sending data, do_write continuously
> calls do_writemore, which internally calls tcp_write. At some point
> tcp_write returns ERR_MEM and do_write waits on semaphore op_completed.
> 
> [...]
> 
>  What could be the reason for the crash in the first case,  is it i am
> using lwip threads incorrectly ?

It looks like you are using the raw API with threads, raw API is -NOT- 
thread safe, you have to use netconn or socket API. Please read 
doc/rawapi.txt, but no worry, we all (At least I did) made the mistake 
until we find out this file :-)

Also, if you are allocating pbuf outside of the lwIP thread, you have to 
set SYS_LIGHTWEIGHT_PROT=1 in your lwipopts.h

Sylvain

Attachment: signature.asc
Description: Digital signature


reply via email to

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