Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Apr 2022 03:19:46 +0500
From:      "Eugene M. Zheganin" <eugene@zhegan.in>
To:        freebsd-stable@freebsd.org
Subject:   FreeBSD on KVM, Q35 and kernel structure leak
Message-ID:  <fd728c5d-68da-c8ec-59f2-10ba321f8ddf@zhegan.in>

next in thread | raw e-mail | index | archive | help
Hello,

I'm trying to run FreeBSD 13.1-RC1 (releng/13.1-n250066-aef190f298a) on 
KVM/Qemu, presumably Q35 type VM in Hetzner.

After some uptime and considerable amount of connections, VM leaks 
tcp_inpcb to the limit:


ITEM                   SIZE  LIMIT     USED     FREE      REQ FAILSLEEP 
XDOMAIN
tcp_inpcb:              496, 510671,  510281,     391, 617269,11530,   
0,   0


Causing multiple dmesg errors

sonewconn: pcb 0xfffff8001ac8bd90: pru_attach() failed
sonewconn: pcb 0xfffff8000ab625d0: pru_attach() failed
sonewconn: pcb 0xfffff8000af999b0: pru_attach() failed
sonewconn: pcb 0xfffff8000ab621f0: pru_attach() failed
sonewconn: pcb 0xfffff8000ab62000: pru_attach() failed
sonewconn: pcb 0xfffff8000ab625d0: pru_attach() failed
sonewconn: pcb 0xfffff8000af999b0: pru_attach() failed
sonewconn: pcb 0xfffff8000af999b0: pru_attach() failed
sonewconn: pcb 0xfffff8000af993e0: pru_attach() failed
sonewconn: pcb 0xfffff8000af999b0: pru_attach() failed
sonewconn: pcb 0xfffff8000ab627c0: pru_attach() failed


console errors (even on low number of kern.ipc.numopensockets: 1447)


[zone: tcp_inpcb] kern.ipc.maxsockets limit reached
[zone: tcp_inpcb] kern.ipc.maxsockets limit reached
[zone: tcp_inpcb] kern.ipc.maxsockets limit reached
[zone: tcp_inpcb] kern.ipc.maxsockets limit reached
[zone: tcp_inpcb] kern.ipc.maxsockets limit reached
[zone: tcp_inpcb] kern.ipc.maxsockets limit reached
[zone: tcp_inpcb] kern.ipc.maxsockets limit reached
[zone: tcp_inpcb] kern.ipc.maxsockets limit reached
[zone: tcp_inpcb] kern.ipc.maxsockets limit reached
[zone: tcp_inpcb] kern.ipc.maxsockets limit reached


and inability to connect to just anything:


# telnet 127.0.0.1 4080
Trying 127.0.0.1...
telnet: socket: No buffer space available


Even when the number of connections id dropped (for instance I remove 
this VM from balancing) it cannot recover (not freeing tcp_inpcb).


is there any hope considering this ?


Thanks.

Eugene.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?fd728c5d-68da-c8ec-59f2-10ba321f8ddf>