Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Mar 2010 10:11:00 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-threads@freebsd.org
Cc:        Sam Robb <samrobb@averesystems.com>, freebsd-gnats-submit@freebsd.org
Subject:   Re: threads/144558: Repeated calls to __rpc_createerr allocates multiple thread-specific data slots
Message-ID:  <201003091011.00097.jhb@freebsd.org>
In-Reply-To: <201003081751.o28HpdCg016822@www.freebsd.org>
References:  <201003081751.o28HpdCg016822@www.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003091011.00097.jhb>