lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Problem with do_writemore() + LWIP for AVR32


From: pragnesh patel
Subject: [lwip-users] Problem with do_writemore() + LWIP for AVR32
Date: Mon, 7 Dec 2009 09:02:18 -0800 (PST)

I have a web server application on AVR32 with freeRTOS. It has some large picture files to transmit with incoming http request. The problem is it runs ok some time and crashes many time. The crash points are,

- do_writemore(), it throws LWIP_ASSERT for len <= conn->writemsg.msg.w.len
   This function calls tcp_write(). Before calling the len is always = conn->writemsg.msg.w.len but after the call conn->writemsg.msg.w.len is set to -1 with err = ERR_OK and fires an assert.

- If it doesn't fire assert, it crashes inside tcp_enqueue() at two different locations,
  - one at queuelen != 0
and
 - other is pcb->snd_queuebuf != 0

and fires assert for pcb->unackes != 0 || pcb->unsend != 0

Any hint?

There is only one connection. As I understand, the crash inside tcp_enqueue() may be because of two threads (one from incoming request through tcp_in.c) and other outgoing request) and needs protection. But as newcomer to lwip world, I don't know where to protect.

Still don't understand why it crashes in do_writemore().

I have tcp_wnd set to 24000.

Thanks



reply via email to

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