From owner-freebsd-current@FreeBSD.ORG Tue Dec 26 17:20:24 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 74B4316A403 for ; Tue, 26 Dec 2006 17:20:24 +0000 (UTC) (envelope-from silby@silby.com) Received: from wbm11.pair.net (wbm11.pair.net [66.39.3.89]) by mx1.freebsd.org (Postfix) with ESMTP id 5015B13C48C for ; Tue, 26 Dec 2006 17:20:24 +0000 (UTC) (envelope-from silby@silby.com) Received: by wbm11.pair.net (Postfix, from userid 65534) id 81E5C2B837; Tue, 26 Dec 2006 11:50:19 -0500 (EST) Received: from 68.253.24.139 ([68.253.24.139]) (SquirrelMail authenticated user silby@silby.com) by webmail11.pair.com with HTTP; Tue, 26 Dec 2006 11:50:19 -0500 (EST) Message-ID: <2472.68.253.24.139.1167151819.squirrel@webmail11.pair.com> In-Reply-To: <45908ED3.4040503@freebsd.org> References: <20061210010823.GS81923@egr.msu.edu> <457B621E.3020100@freebsd.org> <20061210014924.GU81923@egr.msu.edu> <457B7084.9070409@freebsd.org> <20061214172323.GP1011@egr.msu.edu> <45908ED3.4040503@freebsd.org> Date: Tue, 26 Dec 2006 11:50:19 -0500 (EST) From: "Mike Silbersack" To: "Colin Percival" User-Agent: SquirrelMail/1.4.5 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: Adam McDougall , freebsd-current@freebsd.org, Mike Silbersack Subject: Re: Fwd: Re: pf: BAD state happens often with portsnap fetch update X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Dec 2006 17:20:24 -0000 > The random port allocation, because it is completely random, runs into the > birthday problem if it tries to allocate too many ports: Within a few > hundred > port allocations, there's almost certainly going to be a collision. To > get > around this problem, the port allocator watches how many ports are being > allocated, and switches to sequential allocations if it thinks that the > rate > of port allocation is likely to result in collisions occurring. > > Unfortunately, this switch isn't occurring quickly enough to avoid > problems; > I'm not sure if this can be easily fixed (except via the workaround of > turning > off randomized port allocations), but maybe Mike Silbersack (CCed) will > have > some ideas. > > Colin Percival Colin's description is accurate, but I haven't read up to this point in the thread, and I need more information. To prove whether or not this is really port randomization's fault for using ports excessively quickly (say, within 1ms) or whether something is going wrong due to ports being used relatively quickly (say, within 1 seconds), please do the following: 1. Disable randomization 2. Set the ephemeral port range to something small like 49152 to 49352. 3. Re-run the test in question. Tell me how it goes. Mike "Silby" Silbersack