Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Mar 2021 13:36:49 +0000
From:      bugzilla-noreply@freebsd.org
To:        net@FreeBSD.org
Subject:   [Bug 254333] [tcp] sysctl net.inet.tcp.hostcache.list hangs
Message-ID:  <bug-254333-7501-qcTR25KyTb@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-254333-7501@https.bugs.freebsd.org/bugzilla/>
References:  <bug-254333-7501@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D254333

--- Comment #12 from Maxim Shalomikhin <maxim.shalomikhin@kaspersky.com> ---
I have one machine with hanging sysct:
99750  -  D         22:33.32 /sbin/sysctl net.inet.tcp.hostcache.list

# procstat -kk 99750
  PID    TID COMM                TDNAME              KSTACK
99750 101008 sysctl              -                   mi_switch+0xe1
sleepq_wait+0x2c _cv_wait+0x115 vmem_xalloc+0x44b vmem_alloc+0x31
kmem_malloc+0x33 uma_large_malloc+0x46 malloc+0x3d sbuf_new+0x105
sysctl_tcp_hc_list+0x6d sysctl_root_handler_locked+0x8a sysctl_root+0x1ee
userland_sysctl+0x134 sys___sysctl+0x5f amd64_syscall+0xa4e
fast_syscall_common+0x101

As for cachelimit: Yes, we have large number set, but I noticed, then sysctl
hangs, the hostcache.count goes crazy big (and stops near 2^32 at 429496644=
7):
# sysctl net.inet.tcp.hostcache
net.inet.tcp.hostcache.purgenow: 0
net.inet.tcp.hostcache.purge: 0
net.inet.tcp.hostcache.prune: 300
net.inet.tcp.hostcache.expire: 3600
net.inet.tcp.hostcache.count: 4294966447
net.inet.tcp.hostcache.bucketlimit: 30
net.inet.tcp.hostcache.hashsize: 65536
net.inet.tcp.hostcache.cachelimit: 1966080
net.inet.tcp.hostcache.enable: 1
# vmstat -m | grep sbuf
         sbuf     1     1K       -    68235=20
16,32,64,128,256,512,1024,2048,4096,8192,32768,65536
     mrsasbuf   949  2860K       -      951  32,128,256,2048,8192

Usually, hostcache.count is about ~500k.
So, Is it just my fault setting cachelimit to high or this is a bug in sync=
ache
with hostcache.count?

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-254333-7501-qcTR25KyTb>