Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Mar 2021 21:20:06 +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-QmPGuuVGDD@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 #18 from Michael Tuexen <tuexen@freebsd.org> ---
(In reply to Richard Scheffenegger from comment #17)
But tcp_hc_purge_internal() decrements the counter when it removes an entry=
 and
frees it. I double checked the code and I think the counter is handled
correctly. I did look for an underflow, but I could not find it...

If the hash buckets are used highly un-symmetric, I wouldn't suggest to use
larger buckets. That results in long processing time. In that case I would
suggest to use a better hash algorithm. But this is not the issue right now.

I do see two problems:
1. Using a large amount of memory when exporting the list.
2. The counter being off.

The first issue is solved by the patches you are working on.

The second issue without your patches results in a memory amount which can'=
t be
allocated and therefor triggers the problem. The second issue with you patc=
hes
in place will still result in not adding any new entries to the host cache
anymore, since the number counter is than larger than the limit.

For the counter having such a large value could happen when there is an
underflow. But I don't see how it can happen. For me it looks like the glob=
al
and the bucket counter are handled correctly. I also looked at the 11.4 cod=
e,
but I see no issue.

Since the statement is that this happens every 3 to 4 month, it must be a r=
are
event. Or some other code is writing in the memory location where the count=
er
is...

Richard: Do you see a way how the counter could be off?

--=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-QmPGuuVGDD>