mirage / mirage-tcpip

TCP/IP networking stack in pure OCaml, using the Mirage platform libraries. Includes IPv4/6, ICMP, and UDP/TCP support.
https://mirage.io
ISC License
341 stars 87 forks source link

TCP client connection cancelling and attempts #509

Open hannesm opened 1 year ago

hannesm commented 1 year ago

Hey,

I try to connect to a remote host via TCP which is not open for these, and have some retrying logic in place (every 5 seconds). What I see is a connection refused.

Now, it looks like the TCP stack itself does retry sending packets there... at least I see quite some memory usage, and the following lines in my syslog:

Oct 24 08:31:57 <daemon.err> dns_server_mirage error connection attempt was refused while establishing tcp connection to <remote-ip>
Oct 24 08:32:28 <daemon.err> beast syslogd: last message repeated 245168 times
Oct 24 08:34:12 <daemon.err> beast syslogd: last message repeated 797340 times

And after < 30 minutes the whole unikernel reboots due to being out of memory.

Please note: I use tcpip as released in v8.0.0. And also note that I do not have any plans to investigate this issue further, this is mainly for documentation purposes.