From owner-freebsd-current Fri Nov 1 16:40:33 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 85B3237B401 for ; Fri, 1 Nov 2002 16:40:32 -0800 (PST) Received: from snipe.mail.pas.earthlink.net (snipe.mail.pas.earthlink.net [207.217.120.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id 316A343E77 for ; Fri, 1 Nov 2002 16:40:32 -0800 (PST) (envelope-from tlambert2@mindspring.com) Received: from pool0092.cvx21-bradley.dialup.earthlink.net ([209.179.192.92] helo=mindspring.com) by snipe.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 187mKy-0001TF-00; Fri, 01 Nov 2002 16:40:29 -0800 Message-ID: <3DC31EB0.2B79F42E@mindspring.com> Date: Fri, 01 Nov 2002 16:39:12 -0800 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Bill Fenner Cc: mime@traveller.cz, current@FreeBSD.ORG Subject: Re: crash with network load (in tcp syncache ?) References: <200211012246.gA1Mki5n001478@stash.attlabs.att.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Bill Fenner wrote: > sonewconn() hands sofree() a self-inconsistent socket -- so->so_head is > set, so so must be on a queue, but sonewconn() hasn't put it on a queue yet. > Please try this patch. I think this can still crash (just like my patch); the problem is in what happens when it fails to allocate memory. Unless you set one of the flags, it's still going to panic in the same place, I think, when you run out of memory. The code that the SYN-cache uses really needs to be refactored, and seperated out. The problem is that the delay in allocation is intentional, to permit the cache to deal with lighter weight instances, until it decides to actually create a connection. There's not a clean way to do this, really, without passing the address of the socket pointer down, and having lower level code fill it out, I think. 8-(. The problem is definitely based on what happens in the allocation or protocol attach failure cases. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message