From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 16 21:58:48 2014 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 75595372 for ; Sun, 16 Feb 2014 21:58:48 +0000 (UTC) Received: from mail-ee0-x22a.google.com (mail-ee0-x22a.google.com [IPv6:2a00:1450:4013:c00::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 07DB312DF for ; Sun, 16 Feb 2014 21:58:47 +0000 (UTC) Received: by mail-ee0-f42.google.com with SMTP id b15so6752910eek.29 for ; Sun, 16 Feb 2014 13:58:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=yv1L8RknaCNlMrpk9R03bd+i0Yuk5+2eqA0v3kP1p7w=; b=0/N7SSOMCm+atZUGNTeXBpent8+7ce7KhLPiSYvVLL6enAMme/7E2LPpyRG5Muhkw5 P/bjmRSTiq/UHvZNty4D0gym8tO+KrxcXUnb9WD94qAbNZ+6VtGkyc15XrEoTLWlqeTo QMKneiKMlK5srhbhPZLZFWDZ/xVZWNrGXTmOVRup0xAabTznh8td1X0FzJDIv7YQuDS5 SHGlv398YdAQwIQATJZtEdn47rQ7vYH6IzLSjLwFDNr7EgSn5H1xEu5BnrPuEWJ1JMJi EvstoHyhAyJW1bb4GW0CG/KhAtf8EO2TiMZt4hiHVzp4/wbDN3RnagY5uk0ehcFPyMkN qGMg== X-Received: by 10.14.29.6 with SMTP id h6mr1606171eea.84.1392587926324; Sun, 16 Feb 2014 13:58:46 -0800 (PST) Received: from localhost ([178.150.115.244]) by mx.google.com with ESMTPSA id m9sm49424768eeh.3.2014.02.16.13.58.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Feb 2014 13:58:45 -0800 (PST) Sender: Mikolaj Golub Date: Sun, 16 Feb 2014 23:58:43 +0200 From: Mikolaj Golub To: Photo stuff Subject: Re: The sonewconn listen queue overflow issue Message-ID: <20140216215842.GB14237@gmail.com> References: <52EFEEF7.5010704@xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52EFEEF7.5010704@xs4all.nl> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Feb 2014 21:58:48 -0000 On Mon, Feb 03, 2014 at 08:33:11PM +0100, Photo stuff wrote: > sonewconn: pcb 0xyyyyyyyyyyyyyyyy: Listen queue overflow: 8 already in > queue awaiting acceptance > > I searched a bit on the web and came across recommendations to try > netstat -nAa to find out which program this came from. > > Well, running netstat -nAa |grep pcb 0xyyyyyyyyyyyyyyyy in a loop didn't > work, it didn't give any output even though the messages kept coming in > the log during that time. Unfortunately, netstat(1) shows tcpcb address for TCP sockets, while in debug messages like above the socket's pcb is printed. It looks like the simplest way to assiciate a socket with the reported pcb address is to hack netstat(1) to output pcb instead of tcpcb: Index: usr.bin/netstat/inet.c =================================================================== --- usr.bin/netstat/inet.c (revision 261639) +++ usr.bin/netstat/inet.c (working copy) @@ -448,7 +448,7 @@ protopr(u_long off, const char *name, int af1, int if (Lflag && so->so_qlimit == 0) continue; if (Aflag) { - if (istcp) + if (0 && istcp) printf("%*lx ", 2 * (int)sizeof(void *), (u_long)inp->inp_ppcb); else printf("%*lx ", 2 * (int)sizeof(void *), (u_long)so->so_pcb); -- Mikolaj Golub