Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
libtun2socks tcp_free_acked_segments: lwip assertion failure: tcp_receive: valid queue length #2285
Please read contributing guidelines. Thanks.
Describe the bug
I check /data/tombstones today, find out a lot of "out of UDP buffer" error produced by shadowsocks libtun2sock.so. Since it happened several days ago, I have no idea how to reproduce it.
Smartphone (please complete the following information):
Memory near stack:
@madeye What do you think?
@madeye some useful information http://lwip.100.n7.nabble.com/memory-leak-td24546.html
PROBLEM SOLVED :-)
As mentioned earlier by Sergio we should not call LwIP code from within
I must call tcp_write and other functions from a separate thread. This
My TCP stack has the highest task priority in the system. As a result
I added taskENTER_CRITICAL(); and taskEXIT_CRITICAL();
This seems to be an issue with MI 6. My project encountered a similar issue. After the VPN service was started, the VPN descriptor received a large number of UDP packets sent to the router. The IP of each packet is incremented, such as from 192.168.1.1-192.168.1.254 and the port is 137.
@madeye According to Crashlytics, this issue occurs across virtually any device (~10k events daily now), including Google Pixels, but (somehow) more frequently in Xiaomi. Unfortunately, 89dee85 is only set up since v4.8.1 so I cannot be sure which version introduced this bug but I suspect that it exists a long time ago.
We should probably report this to upstream.