0x10
>> Aug 31 15:52:13 neelima-desktop kernel: [ 612.496003] [<c156fdbd>] ?
>> _raw_spin_lock_irqsave+0x2d/0x40
>> Aug 31 15:52:13 neelima-desktop kernel: [ 612.496003] [<c106ba19>] ?
>> down+0x29/0x40
>> Aug 31 15:52:13 neelima-desktop kernel: [ 612.496003] [<f92e8220>] ?
>> pbuf_free_int+0x10/0x10 [lwip]
>> Aug 31 15:52:13 neelima-desktop kernel: [ 612.496003] [<f92e831c>]
>> tcpip_thread+0xfc/0x160 [lwip]
>> Aug 31 15:52:13 neelima-desktop kernel: [ 612.496003] [<f92e8220>] ?
>> pbuf_free_int+0x10/0x10 [lwip]
>> Aug 31 15:52:13 neelima-desktop kernel: [ 612.496003] [<c1065dcd>]
>> kthread+0x6d/0x80
>> Aug 31 15:52:13 neelima-desktop kernel: [ 612.496003] [<c1065d60>] ?
>> flush_kthread_worker+0x80/0x80
>> Aug 31 15:52:13 neelima-desktop kernel: [ 612.496003] [<c1576efe>]
>> kernel_thread_helper+0x6/0x10
>> Aug 31 15:52:14 neelima-desktop kernel: [ 612.557620] ---[ end trace
>> 333a796a57491d86 ]---
>>
>> Thanks,
>> Anil
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <
http://lists.nongnu.org/archive/html/lwip-users/attachments/20120907/adea9905/attachment.html>
------------------------------
Message: 4
Date: Fri, 7 Sep 2012 10:17:23 +0200
From: Sylvain Rochet <
address@hidden>
To: Mailing list for lwIP users <
address@hidden>
Subject: Re: [lwip-users] LWIP crash
Message-ID: <
address@hidden>
Content-Type: text/plain; charset="iso-8859-1"
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <
http://lists.nongnu.org/archive/html/lwip-users/attachments/20120907/d6296121/attachment.pgp>
------------------------------
Message: 5
Date: Fri, 07 Sep 2012 10:22:41 +0200
From: "Simon Goldschmidt" <
address@hidden>
To: Mailing list for lwIP users <
address@hidden>
Subject: Re: [lwip-users] LWIP crash
Message-ID: <
address@hidden>
Content-Type: text/plain; charset="utf-8"
Sylvain Rochet wrote:
> > 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.
The functions do_write() and do_writemore are part of the netconn API
(the part that runs in tcpip_thread), so I think he's using netconn- or
socket API.
Simon