Closed pschlang closed 4 years ago
@pschlang Thanks for reporting.
hi @pschlang I've met this problem before. I think PR is a better solution
hi @pschlang I think there's another solution。 You can add this patch for testing. lwip commit id :dd3b301750f19c9f15248ac32d366cd41c6b3225
Thanks @freakyxue, but I think it is better to merge the upstream patch as it will solve the root cause and not just hide the symptom.
Is there any work-around we can use before this is merged/fixed?
The use case is simple and I would dare say common:
This is very easy to patch / backport, I don't really understand why there's no activity here from ESP side.
We currently have to patch this manually every time we update the esp-idf SDK.
hi @pschlang I'm sorry I didn't reply in time, This patch has been added to IDF, and we will merge it as soon as possible
In situations where the max number of sockets is close to the number of actually used sockets, the chance of hitting a race condition in lwIP increases which causes a system reset due to an assertion:
Assertion failed: sockets[i].select_waiting == 0
This has been fixed upstream in https://savannah.nongnu.org/bugs/?57445 / http://git.savannah.nongnu.org/cgit/lwip.git/commit/?id=8d7e436a9d24a2a1ee35aac72a7055e80330e994 and it would be useful to merge it here as well.