From owner-cvs-all@FreeBSD.ORG Sat Apr 1 20:41:32 2006 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5E56816A41F; Sat, 1 Apr 2006 20:41:32 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail01.syd.optusnet.com.au (mail01.syd.optusnet.com.au [211.29.132.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8614143D77; Sat, 1 Apr 2006 20:41:31 +0000 (GMT) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail01.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id k31KfTAr007139 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sun, 2 Apr 2006 06:41:29 +1000 Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.13.4/8.13.4) with ESMTP id k31KfTqc003007; Sun, 2 Apr 2006 06:41:29 +1000 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.13.4/8.13.4/Submit) id k31KfTRD003006; Sun, 2 Apr 2006 06:41:29 +1000 (EST) (envelope-from peter) Date: Sun, 2 Apr 2006 06:41:29 +1000 From: Peter Jeremy To: Robert Watson Message-ID: <20060401204129.GB684@turion.vk2pj.dyndns.org> References: <200604011636.k31GabRv029962@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200604011636.k31GabRv029962@repoman.freebsd.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.11 Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/netinet tcp_input.c tcp_subr.c tcp_timer.c tcp_usrreq.c tcp_var.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Apr 2006 20:41:32 -0000 On Sat, 2006-Apr-01 16:36:37 +0000, Robert Watson wrote: > - Annotate the existence of a long-standing race in the TCP timer code, > in which timers are stopped but not drained when the socket is freed, > as waiting for drain may lead to deadlocks, or have to occur in a > context where waiting is not permitted. This race has been handled > by testing to see if the tcpcb pointer in the inpcb is NULL (and vice > versa), which is not normally permitted, but may be true of a inpcb > and tcpcb have been freed. Add a counter to test how often this race > has actually occurred, and a large comment for each instance where > we compare potentially freed memory with NULL. This will have to be > fixed in the near future, but requires is to further address how to > handle the timer shutdown shutdown issue. Is it worthwhile (or possible) to merge this bit into 6.x earlier to provide greater exposure and therefore more statistics on the occurrence of this race? -- Peter Jeremy