From owner-freebsd-threads@FreeBSD.ORG Thu Jun 19 19:33:49 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E805D37B401 for ; Thu, 19 Jun 2003 19:33:49 -0700 (PDT) Received: from pop015.verizon.net (pop015pub.verizon.net [206.46.170.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2AA1D43FAF for ; Thu, 19 Jun 2003 19:33:49 -0700 (PDT) (envelope-from mtm@identd.net) Received: from kokeb.ambesa.net ([138.88.125.205]) by pop015.verizon.net (InterMail vM.5.01.05.33 201-253-122-126-133-20030313) with ESMTP id <20030620023348.PAID20810.pop015.verizon.net@kokeb.ambesa.net>; Thu, 19 Jun 2003 21:33:48 -0500 Date: Thu, 19 Jun 2003 22:33:47 -0400 From: Mike Makonnen To: Andriy Gapon In-Reply-To: <3EF2660A.1040508@cv-nj.com> References: <3EF2660A.1040508@cv-nj.com> X-Mailer: Sylpheed version 0.8.10 (GTK+ 1.2.10; i386-portbld-freebsd5.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Authentication-Info: Submitted using SMTP AUTH at pop015.verizon.net from [138.88.125.205] at Thu, 19 Jun 2003 21:33:48 -0500 Message-Id: <20030620023348.PAID20810.pop015.verizon.net@kokeb.ambesa.net> cc: threads@freebsd.org Subject: Re: Removal of bogus gethostbyaddr_r() X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2003 02:33:50 -0000 On Thu, 19 Jun 2003 21:40:26 -0400 Andriy Gapon wrote: > > Btw, what happened to the patch(es) proposed by Maxim Sobolev: > http://docs.freebsd.org/cgi/getmsg.cgi?fetch=13028+0+archive/2002/freebsd-audit/20020818.freebsd-audit > > and in Problem Report bin/29581: > http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/29581 > > the discussion in the mailing lists seems to have resulted in nothing, and the > problem seemed to be of non-unsolvable kind. I am not so sure that using pthreads thread local storage is such a good idea for a couple of reasons: 1. There is a finite amount of keys that an application can have open at any one time (PTHREAD_KEYS_MAX). On FreeBSD this is 256. So, every key we create is one less the application can use. This is really only a minor concern. Most applications don't use thread local storage and those that do don't usually need so many. 2. The order in which key destructors are called is not guaranteed. An application that uses pthreads thread local storage for its own reasons and calls one of the resolver routines from inside one of its destructors could get in trouble because the destructor for the resolver routines was called before its own. This would almost certainly lead to a memory leak in the application. However, these reservations are not show-stoppers since they can be easily mitigated by a mention in the appropriate man pages. Cheers. -- Mike Makonnen | GPG-KEY: http://www.identd.net/~mtm/mtm.asc mtm@identd.net | D228 1A6F C64E 120A A1C9 A3AA DAE1 E2AF DBCC 68B9 mtm@FreeBSD.Org| FreeBSD - The Power To Serve