Your application is slow in handling the data, which seems to cause a backlog.
Debug printing via UART is very slow, try not to do this while debugging this.
pbufs, some bug in lwIP gets triggered.
smaller ones and one of them got dropped or corrupted.
- Somehow packets/pbufs are given to lwIP in re-ordered sequence (e.g. reverse
order, then it only happens if there is a backlog).
-----Original Message-----
From: lwip-users <lwip-users-bounces+indan.zupancic=
address@hidden> On Behalf Of hondgm--- via lwip-users
Sent: Wednesday, 29 April 2020 14:39
To:
address@hiddenCc:
address@hiddenSubject: [lwip-users] How to root-cause duplicate ACKs?
I'm using 2.1.2, no RTOS, and seeing frequent duplicate ACKs on Wireshark while lwIP is receiving a continuous audio stream. I've seen up to 6 duplicate ACKs but usually it's one or two.
I enabled:
#define TCP_OUTPUT_DEBUG LWIP_DBG_ON
and here's a section of the output. The second number in each "sending ACK for" line is an addition of mine and is the micro's core timer for an idea of how quickly these are being sent. Each timer count is 13.3ns.
tcp_output: sending ACK for 1450257509 3252152102
tcp_output: nothing to send (0)
tcp_output: nothing to send (0)
tcp_output: sending ACK for 1450260429 3252196160
tcp_output: nothing to send (0)
tcp_output: nothing to send (0)
tcp_output: sending ACK for 1450261889 3269439860
tcp_output: nothing to send (0)
tcp_output: sending ACK for 1450261889 3288290782
tcp_output: nothing to send (0)
tcp_output: sending ACK for 1450261889 3288310973
tcp_output: nothing to send (0)
tcp_output: nothing to send (0)
tcp_output: sending ACK for 1450261889 3325967548
tcp_output: nothing to send (0)
tcp_output: nothing to send (0)
tcp_output: sending ACK for 1450262782 3333899283
tcp_output: nothing to send (0)
1450261889 was sent 4 times according to this, and there's actually quite a lot of these in the debug output. Is this normal? I've also attached a small section Wireshark trace which does not necessarily match up with the above debug trace as I can't determine what matches up. 192.168.0.120 is lwIP.
How does one go about determining what is causing this? The system running lwIP is otherwise quite reliable and will stream the same TCP connection for hours, despite the duplicate ACKs and retransmissions even over my LAN.