From owner-freebsd-current@FreeBSD.ORG Wed Feb 16 14:36:46 2005 Return-Path: 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 DB16216A4CE; Wed, 16 Feb 2005 14:36:46 +0000 (GMT) Received: from cyrus.watson.org (cyrus.watson.org [204.156.12.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8CBB943D1F; Wed, 16 Feb 2005 14:36:46 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by cyrus.watson.org (Postfix) with SMTP id 2142146B17; Wed, 16 Feb 2005 09:36:46 -0500 (EST) Date: Wed, 16 Feb 2005 14:35:23 +0000 (GMT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Andre Oppermann In-Reply-To: <421358FB.9090000@freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Mailman-Approved-At: Thu, 17 Feb 2005 12:57:06 +0000 cc: current@freebsd.org Subject: Re: panic: tcp_input: TCPS_LISTEN in netinet/tcp_input.c:1016 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Wed, 16 Feb 2005 14:36:47 -0000 On Wed, 16 Feb 2005, Andre Oppermann wrote: > I was pulling out my hair because I couldn't figure out how this can > happen. I never thought about the socket layer and was only tracing and > following the TCP code back and forth and back and forth... Really good > catch! I went to bed last night after a few hours of trying to figure out how on earth we could be racing during socket allocation and getting our tcpcb's mixed up, but had just noticed that the contents of the tcpcb were basically in the "I've just been listen()'d" state, and the socket looked like it was exposed to the user (no SS_NOFDREF) but otherwise unused. I woke up in the morning thinking "Oh. I guess it's still being set up to listen, which would explain the lack of SO_ACCEPTCONN". I guess sleeping on things really does help :-). Not sure if you saw my post on freebsd-net this afternoon, but if you have a moment, I'd like your insight into the conditional setting of SO_ACCEPTCONN in solisten(), which would be nice to get rid of if it's unneeded. Robert N M Watson