pthread leaky with resources?
Erich Dollansky
erichsfreebsdlist at alogt.com
Sat Feb 21 00:35:03 UTC 2015
Hi,
On Fri, 20 Feb 2015 09:19:35 -0600
Matthew Grooms <mgrooms at shrew.net> wrote:
> > When a thread is created, it will first try to reuse cached
> > resources before allocating new resources.
> >
> > If you are creating 200 threads, for instance, try destroying those
> > 200 threads, then create 200 new threads. You shouldn't see much
> > change in resources, as libpthread should use the cached
> > resources. If you see a double in the amount of resources used,
> > then that would seem like a bug.
> >
> Thanks for the response. Let me do some more testing. I know that OS
> developer time is a precious resource. If I can find more evidence of
> the problem I will present it.
>
I am currently also working on a multi threaded program and have had
also a problem like this. I thought it was an error 100% on my side. As
I also did at the same time an upgrade to
10.1-STABLE FreeBSD 10.1-STABLE #2 r276328
it could be that there was really some problem in a library.
Some of the threads just return while others are cancelled. If you have
cancelled threads, do you use pthread_cleanup_push and
pthread_cleanup_pop?
Erich
More information about the freebsd-stable
mailing list