From owner-freebsd-threads@FreeBSD.ORG Tue Mar 9 15:11:02 2010 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 212561065678; Tue, 9 Mar 2010 15:11:02 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id E85788FC16; Tue, 9 Mar 2010 15:11:01 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 8B86646B51; Tue, 9 Mar 2010 10:11:01 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 7214E8A01F; Tue, 9 Mar 2010 10:11:00 -0500 (EST) From: John Baldwin To: freebsd-threads@freebsd.org Date: Tue, 9 Mar 2010 10:11:00 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201003081751.o28HpdCg016822@www.freebsd.org> In-Reply-To: <201003081751.o28HpdCg016822@www.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201003091011.00097.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 09 Mar 2010 10:11:00 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Sam Robb , freebsd-gnats-submit@freebsd.org Subject: Re: threads/144558: Repeated calls to __rpc_createerr allocates multiple thread-specific data slots X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Mar 2010 15:11:02 -0000 On Monday 08 March 2010 12:51:39 pm Sam Robb wrote: > > >Number: 144558 > >Category: threads > >Synopsis: Repeated calls to __rpc_createerr allocates multiple thread-specific data slots > >Confidential: no > >Severity: serious > >Priority: medium > >Responsible: freebsd-threads > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: sw-bug > >Submitter-Id: current-users > >Arrival-Date: Mon Mar 08 18:00:16 UTC 2010 > >Closed-Date: > >Last-Modified: > >Originator: Sam Robb > >Release: 7.1 > >Organization: > Avere Systems > >Environment: > FreeBSD build1.arriad.com 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan 1 08:58:24 UTC 2009 root@driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 > >Description: > On the first call to __rpc_createerr() in a thread, the function attempts to allocate a thread-specific slot to hold the rpc error data. Subsequent calls from the same thread continue to allocate new thread-specific slots without freeing the first, so that repeated calls eventually result in all available thread-specific data slots being allocated. Can you try this patch instead? It changes the RPC code in libc to use pthread_once() to execute init functions that create various pthread keys used for per-thread data. http://www.FreeBSD.org/~jhb/patches/rpc_once.patch -- John Baldwin