From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Feb 5 17:20:00 2014 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.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 7E1C4492 for ; Wed, 5 Feb 2014 17:20:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 589D611F9 for ; Wed, 5 Feb 2014 17:20:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id s15HK0Wb050523 for ; Wed, 5 Feb 2014 17:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s15HK0aX050522; Wed, 5 Feb 2014 17:20:00 GMT (envelope-from gnats) Resent-Date: Wed, 5 Feb 2014 17:20:00 GMT Resent-Message-Id: <201402051720.s15HK0aX050522@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "W.Scholten" Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D1F9F0B for ; Wed, 5 Feb 2014 17:13:57 +0000 (UTC) Received: from oldred.freebsd.org (oldred.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F14D8119E for ; Wed, 5 Feb 2014 17:13:56 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id s15HDuof048859 for ; Wed, 5 Feb 2014 17:13:56 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id s15HDuKI048858; Wed, 5 Feb 2014 17:13:56 GMT (envelope-from nobody) Message-Id: <201402051713.s15HDuKI048858@oldred.freebsd.org> Date: Wed, 5 Feb 2014 17:13:56 GMT From: "W.Scholten" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/186488: junkbuster listen queue increase to stop sonewconn filling the message log X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Feb 2014 17:20:00 -0000 >Number: 186488 >Category: ports >Synopsis: junkbuster listen queue increase to stop sonewconn filling the message log >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Feb 05 17:20:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: W.Scholten >Release: 10.0 RC2 >Organization: >Environment: FreeBSD localhost 10.0-RC2 FreeBSD 10.0-RC2 #0 r259404: Sun Dec 15 08:18:20 UTC 2013 root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 >Description: junkbuster listen queue increase to remove lots of messages by sonewconn that the queue is full: I came across a lot of messages in the log since, I think, about 9.1, that sometimes fill it up so much that all else is made invisible, of the type: 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. I forgot about it then recently searched a bit more, and I found this page: http://lawrencechen.net/2014/sonewconn-pcb-0xfffffe006acd9310-listen-queue So a listen queue overflow of 8 is caused by a listen value of 5 (QLEN > 3 * (QLIM / 2)) Doing: netstat -LaAn | grep '/5 ' resulted in ffffzzzzzzzzzzzz tcp4 0/0/5 127.0.0.1:8000 The ffffzzz value was not the value in the message log, but the connection means in my case it had to be the junkbuster proxy (which I still use, still works well :) ), as I didn't run anything else locally. So I looked into junkbuster's cource and in bind.c I changed 2 instances of: while (listen(fd, 5) == -1) { to while (listen(fd, 10) == -1) { /* 10 instead of 5, this fixes dmesg spamming of the type 'sonewconn: pcb 0xyyyyyyyyyyyyyyyy: Listen queue overflow: 8 already in queue awaiting acceptance'? */ This improved the situation, but still gave the issue of the log filling up too much. So then I changed it to 20, which gave me silence :) Checking the latest log I couldn't find anything in the last 10 days. So for people who have this issue I recommend calculating which value the listen-value that the overflow-value corresponds to, then checking as above and then it should be possible to find the daemon causing the issue. And modify that program... But while this removes the errors, what do these messages really signify? I mean which didn't this happen before in earlier versions of FreeBSD? Some people have recommended just to stop using certain programs but that doesn't seem a solution. listen(2) doesn't give a real clue. It mentions changes to the queue in 4.5, so very long ago. Haven't read commit logs to see if there are hints there :) >How-To-Repeat: Run junkbuster as a proxy for firefox for example. >Fix: See above, change the listen queue depth to 20 instead of 5. Not sure if there are negative consequences to doing this, doesn't look so from reading the man page on listen but I'm no expert and I didn't see any response on hackers so far to my posting there... >Release-Note: >Audit-Trail: >Unformatted: