Re: [lwip-users] lwip crash inside do_writemore when used in iOS extension

2016-04-15 Thread Sergio R. Caprile
> all the settings are default (like #define MEM_SIZE 1048576) Well, that amount of memory is certainly not a default. $ grep -R "MEM_SIZE " * src/include/lwip/opt.h:#define MEM_SIZE1600 test/unit/lwipopts.h:#define MEM_SIZE16000 $ lwIP knows nothi

[lwip-users] lwip crash inside do_writemore when used in iOS extension

2016-04-14 Thread Yanrui Hu
Hi, Guys, Hope I can get this issue solved at here. The version is the latest 1.4.1. lwip is used inside iOS extension to receive IP packets. and then use socket API to get TCP content and then send the data out. The usages is not complex, netif_set_default/netif_set_up to setup and lwip_accept/

Re: [lwip-users] lwIP crash?!

2012-11-27 Thread ThomasJ
I did this little addition to my FreeRTOSConfig header file: // ISR using FromISR API must use this value or greater // for the NVIC_SetPriority function. This result in a // a higher RAW value for interrupts. On Cortex M3 a higher value // is a lower priority. This make it possible for FreeRTOS

Re: [lwip-users] lwIP crash?!

2012-11-27 Thread ThomasJ
Hi I know about those two links... I just think they are difficult to understand. So I tried making some handwritten notes myself.. Thomas Martin Velek wrote > Check these two: > > http://www.freertos.org/a00110.html#kernel_priority > http://www.freertos.org/RTOS-Cortex-M3-M4.html > > M. > >

Re: [lwip-users] lwIP crash?!

2012-11-26 Thread Martin Velek
Check these two: http://www.freertos.org/a00110.html#kernel_priority http://www.freertos.org/RTOS-Cortex-M3-M4.html M. On Mon, Nov 26, 2012 at 3:35 PM, ThomasJ wrote: > I tried simplify it for myself by making a drawing.. Maybee other can use it? > >

Re: [lwip-users] lwIP crash?!

2012-11-26 Thread ThomasJ
I tried simplify it for myself by making a drawing.. Maybee other can use it? Thomas -- View this message in context: http://lwip.100.n7.nabble.com/lwIP-crash-tp20652p20679.html Sent from the lwip-users mailing list archive at

Re: [lwip-users] lwIP crash?!

2012-11-26 Thread Artem Pisarenko
Ok, I think it starts to be clear to me (I hope :-)) All NVIC priorities raw values (after shifting), must be greater or equal to configMAX_SYSCALL_INTERRUPT_PRIORITY raw value? (I think it is easier for me just thinking in raw values) This ensure that the interrupt is maskable? Thomas Yes. _

Re: [lwip-users] lwIP crash?!

2012-11-26 Thread ThomasJ
Ok, I think it starts to be clear to me (I hope :-)) All NVIC priorities raw values (after shifting), must be greater or equal to configMAX_SYSCALL_INTERRUPT_PRIORITY raw value? (I think it is easier for me just thinking in raw values) This ensure that the interrupt is maskable? Thomas -- View

Re: [lwip-users] lwIP crash?!

2012-11-21 Thread Artem Pisarenko
2. Make sure your sys arch protection implementation does taskDISABLE_INTERRUPTS/taskENABLE_INTERRUPTS (or portXXX equivalents). If it is the sys_arch_protect/unprotoect function you mean, then they end in a portDISABLE/ENABLE interrupt in my port Yes. But also make sure you enabled SYS_LIGHTWEI

Re: [lwip-users] lwIP crash?!

2012-11-21 Thread ThomasJ
Hi Artem I have looked at the thread and some further questions regarding you guide: 2. Make sure your sys arch protection implementation does taskDISABLE_INTERRUPTS/taskENABLE_INTERRUPTS (or portXXX equivalents). If it is the sys_arch_protect/unprotoect function you mean, then they end in a por

Re: [lwip-users] lwIP crash?!

2012-11-20 Thread Artem Pisarenko
Hi. See neighboring discussion "Assertion "memp sanity" failed at line 463in../lwip_1_4_0/Src/core/memp.c". I think you have the same problems (same processor and same RTOS). Regards, Artem. ___ lwip-users mailing list lwip-users@nongnu.org https:/

[lwip-users] lwIP crash?!

2012-11-19 Thread ThomasJ
Hi all I'm using lwIP (latest stable) on a LPC1788 and FreeRTOS. I'm using one single TCP connection to a PC server. Only one packet is send at a time. Using the Netconn API I do have some difficulties getting the stack running flawless. It is just a matter of time before something goes wrong an

Re: [lwip-users] LWIP crash

2012-09-11 Thread Anil kumar
Hi Simon, My problem looks similar to what he is facing. He has generalized the issue. In our implementations it looks like tcpip_thread is accessing the stack of application thread. I tried printing the dataptr value before every tcp_write call in do_writemore function. It is always the same til

Re: [lwip-users] LWIP crash

2012-09-11 Thread Simon Goldschmidt
Anil kumar wrote: > Yes, i am using lwip with LWIP_TCPIP_CORE_LOCKING=1. > > How to use the default one, is it the same code base with different > options > or is it completely a different code base? It's a compile-time option only. > Regarding the crash, i am getting kernel oops with the messag

Re: [lwip-users] LWIP crash

2012-09-11 Thread Anil kumar
Hi Simon, Yes, i am using lwip with LWIP_TCPIP_CORE_LOCKING=1. How to use the default one, is it the same code base with different options or is it completely a different code base? Regarding the crash, i am getting kernel oops with the message "unable to handle kernel paging request at virtual

Re: [lwip-users] LWIP crash

2012-09-11 Thread Simon Goldschmidt
Anil kumar wrote: > I am using lwip version 1.4.0 > > As per my understanding of lwip, the transmitting and receiving paths > works > in two different threads. Both of them uses some locking mechanism before > entering the core. This is only true for LWIP_TCPIP_CORE_LOCKING==1, which is not the d

Re: [lwip-users] LWIP crash

2012-09-10 Thread Anil kumar
I am using lwip version 1.4.0 As per my understanding of lwip, the transmitting and receiving paths works in two different threads. Both of them uses some locking mechanism before entering the core. The transmitting sequence of execution is invoked by the application and the flow of execution is

Re: [lwip-users] LWIP crash

2012-09-10 Thread Simon Goldschmidt
Anil kumar wrote: > Please let me know if any one is able to use multi-threaded netconn api in > cases where do_writemore returns ERR_MEM. Last time I checked this certainly worked. What version of lwIP are you using and what do you mean when you say the other thread cannot access the dataptr?

Re: [lwip-users] LWIP crash

2012-09-10 Thread Anil kumar
: lwip-users@nongnu.org Subject: Re: [lwip-users] LWIP crash Message-ID: Content-Type: text/plain; charset="iso-8859-1" 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 appl

Re: [lwip-users] LWIP crash

2012-09-07 Thread Simon Goldschmidt
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

Re: [lwip-users] LWIP crash

2012-09-07 Thread Sylvain Rochet
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 continuous

Re: [lwip-users] LWIP crash

2012-09-06 Thread Anil kumar
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

Re: [lwip-users] LWIP crash

2012-09-03 Thread Martin Velek
Hello, I cannot help with your problem, instead of this I can help you, how you could receive some answers. - Enable debug in LWIP by #define LWIP_DEBUG 1 and define some debug output message. This log send in a file as the enclosure. - Write your version of LWIP (e.g. 1.4.0, ...) - Send a captu

Re: [lwip-users] LWIP crash

2012-09-03 Thread Anil kumar
Some debugging using prints is indicating that this crash is resulting when the available send buffer size reaches zero. The send buffer size in my opt.h is 32KB and the packet sizes generated by the application is 128. The available send buffer reaching zero indicates any leaks ? Thanks, Anil

[lwip-users] LWIP crash

2012-08-31 Thread Anil kumar
Hi All, We are using LWIP on linux platform. When we are testing it is crashing repeatedly with the following crash dump. Any help in this regard would be very much helpful. Aug 31 15:52:13 neelima-desktop kernel: [ 612.495042] *pde = 1bd04067 *pte = Aug 31 15:52:13 neelima-desktop ker