pthreads limitation ?

pthreads limitation ?

Post by Peter Hatc » Fri, 14 Aug 1998 04:00:00




> The following program fails in pthread_create after 1024
> iterations. Does anyone know what's the limit I'm hitting ?

>         -Arun

That code seems to work ok on my glibc-2.0.7-19 system.

-pete
--
______    _______________    _____
      \  /Peter W. Hatch \  /
       >< Zen Smalltalker ><  
______/  \_______________/  \_____

 
 
 

pthreads limitation ?

Post by Ulrich Dreppe » Fri, 14 Aug 1998 04:00:00



> True, it works fine on my Redhat 5.0 box too. The failure happens on a
> Redhat 5.1 4 way SMP machine running a 2.1.114 kernel. My guess is
> that it's a 2.1.xism.

Nope.  You have a buggy libpthread.  Get the latest version.

--
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com   `------------------------

 
 
 

pthreads limitation ?

Post by Arun Sharm » Sat, 15 Aug 1998 04:00:00




> > The following program fails in pthread_create after 1024
> > iterations. Does anyone know what's the limit I'm hitting ?

> >         -Arun

> That code seems to work ok on my glibc-2.0.7-19 system.

True, it works fine on my Redhat 5.0 box too. The failure happens on a
Redhat 5.1 4 way SMP machine running a 2.1.114 kernel. My guess is
that it's a 2.1.xism.

        -Arun

 
 
 

pthreads limitation ?

Post by Peter Hatc » Sat, 15 Aug 1998 04:00:00




> > True, it works fine on my Redhat 5.0 box too. The failure happens on a
> > Redhat 5.1 4 way SMP machine running a 2.1.114 kernel. My guess is
> > that it's a 2.1.xism.

> Nope.  You have a buggy libpthread.  Get the latest version.

> --
> ---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
> Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
> Cygnus Solutions `--' drepper at cygnus.com   `------------------------

What is the best libpthread version?  We're using the one included with
the 2.0.7-19 rpms (don't know the actual version) and we're experiencing
some problems with having to send SIGUSR1 to our app to sort of "jump
start" it at times.  Is there some known probem that could cause this?

Thanks :-)

--
______    _______________    _____
      \  /Peter W. Hatch \  /
       >< Zen Smalltalker ><  
______/  \_______________/  \_____

 
 
 

1. pthreads limitation ?

The following program fails in pthread_create after 1024
iterations. Does anyone know what's the limit I'm hitting ?

        -Arun

#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <pthread.h>

int g;

f();

main()
{
        int i;

        for (i = 0; i < 1050; i++) {
                pthread_t t;
                int status;

                if (i > 1024)
                        sleep(2);

                if (pthread_create(&t, NULL, f, NULL)) {
                        if (errno == EAGAIN) {
                                printf("max limit reached\n");
                        }
                        perror("pthread_create");
                } else {
                        if (pthread_join(t, NULL)) {
                                perror("pthread_join");
                        }
                }
        }

        printf("%d\n", g);

f()
{
        g++;

2. ipchains/IP masq'ing and secure web sites

3. pthread limitations? specificaly with fcntl and file locking?

4. Xterm Process Headers

5. IDE limitations

6. POSIX clocks & timers

7. any limitation to socket read()/write()

8. clone() and sys_clone - what state are they in?

9. Disk Woes, Limitations?

10. Max clients per server (port limitations)

11. Mount Point limitations

12. Directory limitations?

13. ext2 limitations