From owner-freebsd-net@FreeBSD.ORG Wed May 12 17:45:06 2010 Return-Path: Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B3161065675 for ; Wed, 12 May 2010 17:45:06 +0000 (UTC) (envelope-from sem@FreeBSD.org) Received: from mail.ciam.ru (mail.ciam.ru [91.209.218.18]) by mx1.freebsd.org (Postfix) with ESMTP id 2E4D48FC15 for ; Wed, 12 May 2010 17:45:06 +0000 (UTC) Received: from dhcp170-37-red.yandex.net ([95.108.170.37]) by mail.ciam.ru with esmtpa (Exim 4.x) id 1OCFzU-0000Wk-Q1 for freebsd-net@FreeBSD.org; Wed, 12 May 2010 21:45:04 +0400 Message-ID: <4BEAE920.2020001@FreeBSD.org> Date: Wed, 12 May 2010 21:45:04 +0400 From: Sergey Matveychuk User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: freebsd-net@FreeBSD.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: tcp_input: Listen socket: Socket allocation failed due to limits or memory shortage X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 May 2010 17:45:06 -0000 Hello. I was annoyed by the subject message and decided to dig it a little. The message appears sporadically and caused my application accept(2) error. I've quickly discovered it's not a listen queue overflow. I've increased kern.ipc.somaxconn to 1024 and listen(2) backlog argument too (netstat -Lan output: tcp4 0/0/1024 *.8542). But without a success. (My application serves only 3-5 connection simultaneously). Moreover, listen queue overflows counter (netstat -s) was not increased. I've decided it's a syncache or syncookie problem. First, I've set net.inet.tcp.syncookies_only=1. But it does not help. Second, I've set it back to 0 and set net.inet.tcp.syncookies=0. The messages gone. A message I've wrote before (syncache_expand: Segment failed SYNCOOKIE authentication, segment rejected (probably spoofed)) of course gone too. May be somebody who familiar with syncookies can comment it? -- Sem.