From nobody Wed Jun 21 00:29:48 2023 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qm4C40dgzz4gKLs for ; Wed, 21 Jun 2023 00:29:52 +0000 (UTC) (envelope-from grahamperrin@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qm4C408yqz42HY for ; Wed, 21 Jun 2023 00:29:52 +0000 (UTC) (envelope-from grahamperrin@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687307392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wha70pgXTSxvQ6Ad4xSvzDIpkU7ivOdS+FiS7ZnvISg=; b=iYegM3dQu1dCmB45yk7wi2By3TLzfA+pZI4gsDVWaIRxzBH4DHj9IFzsn1IIf2CWXNFzZz ypqiZ1zpD/Tl5lB5r/oTwWJiQk7ffNU+MuNu0kfKwDowFn1xeDiFcFqHkHoVvf20mwlbjs xMDB+bCwwDH66MGkzsCak/AEKN6r5k3jZcRH9LP0lM1EuyhsJy5hHJOvjzKncUjzj4CWTk AsNPSuOURjqFsWCTIHKx2lSRdXLa2ZL+4MUGtdpoRNzalW+NvaaVBbL3jhkwBYmQc1XYMd Lt8lQt64U3ar+ulsNkOWxrwdEXWmP/DjmWSQW/ZRWSOICI9j0Q1gAiGFDcwHmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687307392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wha70pgXTSxvQ6Ad4xSvzDIpkU7ivOdS+FiS7ZnvISg=; b=rbiy0APjJzcC7mL7OlmrVIduDEz5tHbJqhBC7Ngs8+nuSX0ePO6G+CnzdRGvHtRdShS9p4 YUa8JkmIdf7CE1T56WclzF465y1r7EiotZKstEuT0Rs2mun8nzTHkQuAJsxMs2kd1OEmiK 9VsrjDARyBk+bc4o9uRW2dj1hN/7cHRuP8YHEwhA82qjdzgEtPKVJhBofwb2Y89rEM0Lsg 4y6nNjeq5kOEibNK8eGBEHyKQ9nQuIGj8/vsxDro7EHKydpvsxEkgsHe8zO8x0gzDDfjAA Fx3hqPh+wlEgy+qYSgUyrIIyp5E9yULKmd7sh7ZgUalBlLea1oAwvtI4zzOHFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687307392; a=rsa-sha256; cv=none; b=Y3OKMbjljbljxkrVEMnZkw6z5sTFWwNvFLa4QLzsPZHkJPLJE/MHk8oTf7EsMTOCbtELgb TN+eEZuQcJ9q1gqgL4zFUyJmZX+pbF8EQv9vDYbQbuFnuWPBe4EVh8xwy3Tb9KZ7DzsvPv xCcqP5PFFs4bhaOz7uwKs/Fb785V5pcvQLmplDugg45CVkhF2UO5f9gSprxhnFOXQEEvXh 7VD3cVYLvUbztCNp/g+9vsBVtuCyx6P7M5wAVZ5PFYhRnaJ0r+KKE0Is8fNlV+Ya/P8mwY k/qDffUpHBeoqWteKtd+7F9JwOC7Am97Ai/LvVd9n6vl98GWs6pQ8SSHu/Uh0Q== Received: from [192.168.1.10] (host-2-100-161-236.as13285.net [2.100.161.236]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: grahamperrin) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Qm4C34vVnzFWH for ; Wed, 21 Jun 2023 00:29:51 +0000 (UTC) (envelope-from grahamperrin@freebsd.org) Message-ID: Date: Wed, 21 Jun 2023 01:29:48 +0100 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: kernel: sonewconn: pcb 0xfffff8002b255a00 (local:/var/run/devd.seqpacket.pipe): Listen queue overflow: 1 already in queue awaiting acceptance (60 occurrences), ? To: freebsd-current@freebsd.org References: <3567b4c0-8143-67c8-fde7-5ae3923f53f4@freebsd.org> <20230620094108.351849f5@ernst.home> <20230620120413.Horde.E7_jFO0w9ui-Nbkh9PONJjn@webmail.leidinger.net> <20230620164141.209ea8bc@ernst.home> Content-Language: en-US From: Graham Perrin Organization: FreeBSD In-Reply-To: <20230620164141.209ea8bc@ernst.home> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------w6eFlrm2O743bbKV0VCXZJuk" X-ThisMailContainsUnwantedMimeParts: N This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------w6eFlrm2O743bbKV0VCXZJuk Content-Type: multipart/mixed; boundary="------------ukgM1NkREF79h3ml1nw0XaRg"; protected-headers="v1" From: Graham Perrin To: freebsd-current@freebsd.org Message-ID: Subject: Re: kernel: sonewconn: pcb 0xfffff8002b255a00 (local:/var/run/devd.seqpacket.pipe): Listen queue overflow: 1 already in queue awaiting acceptance (60 occurrences), ? References: <3567b4c0-8143-67c8-fde7-5ae3923f53f4@freebsd.org> <20230620094108.351849f5@ernst.home> <20230620120413.Horde.E7_jFO0w9ui-Nbkh9PONJjn@webmail.leidinger.net> <20230620164141.209ea8bc@ernst.home> In-Reply-To: <20230620164141.209ea8bc@ernst.home> --------------ukgM1NkREF79h3ml1nw0XaRg Content-Type: multipart/alternative; boundary="------------MdmP9XZQXIv5dXomZoKU8CqM" --------------MdmP9XZQXIv5dXomZoKU8CqM Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 T24gMjAvMDYvMjAyMyAxNTo0MSwgR2FyeSBKZW5uZWpvaG4gd3JvdGU6DQo+IE9uIFR1ZSwg MjAgSnVuIDIwMjMgMTI6MDQ6MTMgKzAyMDANCj4gQWxleGFuZGVyIExlaWRpbmdlcjxBbGV4 YW5kZXJAbGVpZGluZ2VyLm5ldD4gIHdyb3RlOg0KPg0KPj4gUXVvdGluZyBHYXJ5IEplbm5l am9objxnYXJ5akBnbXguZGU+ICAoZnJvbSBUdWUsIDIwIEp1biAyMDIzIDA3OjQxOjA4ICsw MDAwKToNCj4+DQo+Pj4g4oCmDQo+PiBJbiBvdGhlciB3b3JkcyB0aGUgc29mdHdhcmUgbGlz dGVuaW5nIG9uIGl0IGRpZG4ndCBwcm9jZXNzIHRoZSByZXF1ZXN0DQo+PiBmYXN0IGVub3Vn aCBhbmQgYSBiYWNrbG9nIHBpbGVkIHVwIChlLmcgYXBhY2hlIExpc3RlbkJhY2tsb2cgb3Ig bmdpbngNCj4+ICJsaXN0ZW4gWCBiYWNrbG9nPXkiIGFuZCAic3lzY3RsIGtlcm4uaXB4LnNv bWF4Y29ubj1YIiBmb3IgRnJlZUJTRA0KPj4gaXRzZWxmKS4gWW91IG1heSBuZWVkIGZhc3Rl ciBoYXJkd2FyZSwgbW9yZSBwcm9jZXNzZXMvdGhyZWFkcyB0bw0KPj4gaGFuZGxlIHRoZSB0 cmFmZmljLCBvciBjb25maWd1cmUgeW91ciBzb2Z0d2FyZSB0byBkbyBsZXNzIHRvIHByb2R1 Y2UNCj4+IHRoZSBzYW1lIHJlc3VsdCAoZS5nLiBubyByZWFsLXRpbWUgRE5TIHJlc29sdXRp b24gaW4gdGhlIGxvZ2dpbm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BjLnNv YWNjZXB0cXVldWU6IDI1Ng0KJSBzeXNjdGwga2Vybi5pcGMubWF4Y29ubg0Kc3lzY3RsOiB1 bmtub3duIG9pZCAna2Vybi5pcGMubWF4Y29ubicNCiUgc3lzY3RsIGtlcm4uaXBjLnNvbWF4 Y29ubg0Ka2Vybi5pcGMuc29tYXhjb25uOiAyNTYNCiUgZ3JlcCBpcGMgL2V0Yy9zeXNjdGwu Y29uZg0Ka2Vybi5pcGMuc29hY2NlcHRxdWV1ZT0yNTYNCiUNCg0KDQpJIGJlZ2FuIHdvbmRl cmluZyBhYm91dCB0aGUgc29uZXdjb25uIGxpbmVzIGluIHJlbGF0aW9uIHRvIA0KPGh0dHBz Oi8vYnVncy5mcmVlYnNkLm9yZy9idWd6aWxsYS9zaG93X2J1Zy5jZ2k/aWQ9MjcwOTk3PiBm b3IgDQpuZXQtbWdtdC9uZXRkYXRhLCBhbHRob3VnaCBJIGRvbid0IGtub3cgd2hldGhlciB0 aGVyZSdzIGEgZGlyZWN0IA0KcmVsYXRpb25zaGlwLg0KDQolIG5ldHN0YXQgLUxhbiB8IGdy ZXAgbmV0ZGF0YQ0KdW5peMKgIDAvMC8xMjjCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKg wqDCoMKgwqDCoMKgwqDCoMKgwqDCoCAvdG1wL25ldGRhdGEtaXBjDQolDQoNCk15IHVzZSBv ZiBOZXRkYXRhIGlzIGxvY2FsLW9ubHkuDQoNCg== --------------MdmP9XZQXIv5dXomZoKU8CqM Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On 20/06/2023 15:41, Gary Jennejohn wrote:
On Tue, 20 Jun 2023 12:04:13=
 +0200
Alexander Leidinger <Alexander@leidinger.net> wrote:

Quoting Gary Jennejohn <garyj@gm=
x.de> (from Tue, 20 Jun 2023 07:41:08 +0000):

=E2=80=A6
In other words the software listening on it didn't process the request
fast enough and a backlog piled up (e.g apache ListenBacklog or nginx
"listen X backlog=3Dy" and "sysctl kern.ipx.somaxconn=3DX" for FreeBSD
itself). You may need faster hardware, more processes/threads to
handle the traffic, or configure your software to do less to produce
the same result (e.g. no real-time DNS resolution in the logging of a
webserver or increasing the amount of allowed items in the backlog).
If you can change the software, there's also the possibility to switch
from blocking sockets to non-blocking sockets (to not have the
select/accept loop block / run into contention) or kqueue.

On my FreeBSD14 system these things are all under kern.ipc.

maxconn seems to be an alias for soacceptqueue, which is set to 128 on
my machine.

However, the software he's using may have set backlog to 1.  Hard to say
based on the trace he provided.

Thanks, people.

A few hours ago I took a hint from one of the pages linked from <https://dan.langille.org/2020/01/= 01/listen-queue-overflow/>, added a line to my sysctl.conf(5).


% sysctl kern.ipc.soacceptqueue
kern.ipc.soacceptqueue: 256
% sysctl kern.ipc.maxconn
sysctl: unknown oid 'kern.ipc.maxconn'
% sysctl kern.ipc.somaxconn
kern.ipc.somaxconn: 256
% grep ipc /etc/sysctl.conf
kern.ipc.soacceptqueue=3D256
%


I began wondering about the sonewconn lines in relation to <https://bugs.freebsd.org/bugzilla= /show_bug.cgi?id=3D270997> for net-mgmt/netdata, although I don't know whether there's a direct relationship.

% netstat -Lan | grep netdata=
unix=C2=A0 0/0/128=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /tmp/netdata-ipc
%

My use of Netdata is local-only.

--------------MdmP9XZQXIv5dXomZoKU8CqM-- --------------ukgM1NkREF79h3ml1nw0XaRg-- --------------w6eFlrm2O743bbKV0VCXZJuk Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEEWT/lssMHB+28ly8Kt2dIb0oY1AsFAmSSRHwFAwAAAAAACgkQt2dIb0oY1At7 Pw//bWvCWVpcUGzF3vnrgfDN4YYGStCV8rhqMIMfT7ZWDhl/GFB+DnrbACNJI6vO3PZzSwzqZacP NKKoqBNumDi6F4AOIezIENf2rUtTzjdt593gdjKOFaCTKEGHmGesL6VlgYMufuOxl0MDHCQnMZjM kBmTekfpBJtnPRLoRBVLvyCSalXCU/zTMQsc0rk5T3VfkfWFLUn9J1peo5Tn7M8lIhqskltOstvC zSmEIIS5bafs8VX9LzYEbdmYU9DEd5rdIwEPWxvX0EVyP1WeGMuBpe786YtXCRIqJaugBoJdWyqX TV1xecFFGWVX2jyUdl3/9KF0QN6kBO7oVDgpxaqndofcznyDm7qOIeAgZrnJKugsK0wyW1b8vpa2 h2KfKtDQocmbg50mXufQ+NRNyNc5BnxQpMsmn3ONedpdsQZ1SDprkbSHUR4XFg1KgxOymXozMSCv VGv3XDKBl0v+9yr8V5hqWV0DoFxspk5xbE3Ol47sFB0KR33OsshtAdsG6dENKKLgSIwZiU1/dVv2 9J5u2nEivayBgoFNzn+yb84OzqoswtshBBZvKE2PdNSJDj2XfwqNE0wD3hesqyM40BrRjn91DJCj 6OUDWwKJozo3WjMns0ys1wp3mFE9OG13GHY2VuJs+wFhtDeIz3KRyvbsJaLxGTgyUMYhfKueKvr4 wOk= =DxYW -----END PGP SIGNATURE----- --------------w6eFlrm2O743bbKV0VCXZJuk--