Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 05 Feb 2021 11:54:07 +0100
From:      GomoR <freebsd-stable@gomor.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Suspected mbuf leak with Nginx + sendfile + TLS in 12.2-STABLE
Message-ID:  <8f02057bee5e8196644e85bbe7f8b31e@gomor.org>
In-Reply-To: <069535216479ce00859e4bcbf499f8a1@gomor.org>
References:  <f6118f40fcac0e938e4050fc36a1e05e@gomor.org> <9c56bfda-725c-9c2a-9db3-4599abcfeaa0@FreeBSD.org> <069535216479ce00859e4bcbf499f8a1@gomor.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2021-02-05 09:11, GomoR wrote:
>> The first step I would do if possible would be to bisect between the 
>> last
>> known working version and the version that is known to be broken to
>> determine which commit introduced the problem.  One thing that could 
>> help
>> here is to see if you can reproduce the problem using a 12.2 kernel on 
>> a
>> 12.1 world + ports.  If you can, then you can limit your bisecting to 
>> just
>> building new kernels which will make that process quicker.

We have reinstalled from scratch our system with FreeBSD 12.1-RELEASE. 
We then
have installed just enough of our software stack to reproduce the issue.

No problem with a stock 12.1-RELEASE kernel, but problem arise after 
installkernel
with the latest 12.2-STABLE. We then turned off all our customizations, 
including
some specific sysctl.conf values. The bug didn't triggered.

After dissecting our sysctl values, the faulty one has been identified:

kern.ipc.maxsockbuf=157286400

This value is 75 times the default value (2097152). Restoring the 
default value
fixes the issue. After some tests, the bug is triggered starting 
somewhere to
64 times the default value (134217728).

There was no issue with this setting in 12.1-RELEASE, but there is in 
12.2-RELEASE.

Do you have some insights onto why it causes that mbuf problems? In the 
meantime,
we have our solution, but we are willing to help identify if that's a 
kernel bug
or just a real bad idea to set maxsockbuf to such a high value.

Best regards,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8f02057bee5e8196644e85bbe7f8b31e>