lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] TCP snd_queuelen issue (Jasper)


From: Jasper Verschueren
Subject: [lwip-users] TCP snd_queuelen issue (Jasper)
Date: Fri, 8 Feb 2019 09:15:22 +0000

Hi Simon,


I don't think they directly influence snd_queuelen but they do influence the function where this assert is triggered. I thought maybe bug #51447 could have something to do with it because it influences the while loop around the assert (TCP_SEQ_LEQ)I thought maybe bug #48839 because the assert is triggered inside a the function that handles the acknowledgements. It can be a bit far fetched though.  Another reason I'm looking at these boundary cases is that I cannot find something that triggers it. There is no sequence in the crashing behavior. It can be that the communication works for hours without an issue but it can as well crash after 5 minutes if we hook up a few webapp's to the device.


The TCP module is a big one, that's why some guidance in my search would help me a lot.


Kind regards,

Jasper 


> Am 07.02.2019 um 16:36 schrieb Jasper Verschueren:
> 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.

I'm not aware of any having an effect on snd_queuelen. Could you point
me at the ones you mean?

Regards,
Simon

>
> 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]