lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] TCP snd_queuelen issue


From: Jasper Verschueren
Subject: [lwip-users] TCP snd_queuelen issue
Date: Thu, 7 Feb 2019 15:36:26 +0000

Hi,


I'm running the lwIP latest master on a NXP -  K64F without operating system and I'm having some troubles with TCP.


I'm using a stripped down version of the httpd and added a simple HTTP POST command protocol to it. This command protocol is keeping the device and webapp in sync. 

A webapp is sending POST messages to my device with the webapp state in it every +-60ms. The httpd sets a flag when it receives such a message. In main loop we evaluate the flag, if true we evaluate the received webapp state and send a HTTP OK with the latest device state in it. From this main loop flag check we construct the message, we call http_send and directly after tcp_output. 

(I know this polling method is far from ideal but it was a quick implementation before we continue with websockets.)


It works great except that on completely random moments lwIP crashes and the complete MCU is halted.

From time to time I get following assert when that happens:


    LWIP_ASSERT("pcb->snd_queuelen >= pbuf_clen(next->p)", (pcb->snd_queuelen >= clen));


There are also moments were no assert is triggered and it just crashes (or maybe the assert message is not printed on these occasions i'm not sure). 

I have been evaluating the code that influences snd_queuelen and I noticed that there are some open tcp bugs at the moment that can have influence on sequence numbers and ack's.


It would really help if someone could point me in the right direction.


Thanks!

Jasper


reply via email to

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