nanovms / nanos

A kernel designed to run one and only one application in a virtualized environment
https://nanos.org
Apache License 2.0
2.58k stars 133 forks source link

accept_tcp_from_lwip error: queue overrun; shouldn't happen with lwIP listen backlog #2000

Open rinor opened 6 months ago

rinor commented 6 months ago

Did you get that error message from an instance with multiple vCPUs? I can see in the code that this could happen when there are multiple concurrent connection requests that are processed in parallel by different vCPUs; it's a flaw in the code that we should be able to fix by reworking the logic that protects a listening socket from concurrent access to its struct fields. Assuming you are using multi-vCPU instances, basically this could happen when your server has a TCP listen backlog close to the maximum supported value (255) and there is a high rate of client connection requests.

Originally posted by @francescolavra in https://github.com/nanovms/nanos/discussions/1998#discussioncomment-8416009