bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pthread_create failing under stress


From: Stefan Hoffmeister
Subject: Re: pthread_create failing under stress
Date: Fri, 12 Oct 2001 11:58:16 +0200

: On Tue, 09 Oct 2001 23:13:59 -0300, Miguel Freitas wrote:

>pthread_create to fails with "Resource temporarily 
>unavailable" error.
...
>I checked with gdb and i'm sure these 2 threads are 
>joined before the new ones are created (no thread "leakage").

If this happens only under the control of a debugger, this is probably
due to a kernel defect where signals are not sent out properly
signalling the termination of a thread.

In my experience, under a debugger you can create at most 1024 - 1 (the
manager thread) threads (or even one less, don't remember the exact
number). No amount of releasing thread resources will help you.

FWIW, don't you think it would be wiser if you didn't recreate threads,
but simply implemented a thread cache with the worker threads blocking
on a semaphore and being fed with data?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]