From owner-freebsd-threads@FreeBSD.ORG Tue Mar 9 15:20:04 2010 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9CB781065678 for ; Tue, 9 Mar 2010 15:20:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8D2338FC29 for ; Tue, 9 Mar 2010 15:20:04 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o29FK4GO065138 for ; Tue, 9 Mar 2010 15:20:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o29FK4WC065136; Tue, 9 Mar 2010 15:20:04 GMT (envelope-from gnats) Date: Tue, 9 Mar 2010 15:20:04 GMT Message-Id: <201003091520.o29FK4WC065136@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: John Baldwin Cc: 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 Reply-To: John Baldwin List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Mar 2010 15:20:04 -0000 The following reply was made to PR threads/144558; it has been noted by GNATS. From: John Baldwin To: freebsd-threads@freebsd.org Cc: Sam Robb , freebsd-gnats-submit@freebsd.org Subject: Re: threads/144558: Repeated calls to __rpc_createerr allocates multiple thread-specific data slots Date: Tue, 9 Mar 2010 10:11:00 -0500 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