Problems with Red Hat 5.1

Problems with Red Hat 5.1

Post by Huseyin Simitc » Fri, 03 Jul 1998 04:00:00



It looks like LinuxThreads package is not allowing more than
1024 pthread_create calls, even if the earlier threads are
detached. Probably the detach functionality is not working
properly. Trying this with DETACH attributes does not help
either. The following program is not able to create threads
after the 1022nd call. This works fine Solaris 2.6.

Huseyin

RedHat Linux 5.1
glibc 2.0.7 (with LinuxThreads)

/* gcc -g -O -Wall  -D_REENTRANT  -o ex ex.c -lpthread */

#include <stdio.h>
#include <unistd.h>
#include <pthread.h>

void * process(void * arg)
{
  int rv;
  rv = pthread_detach(pthread_self());
  fprintf(stderr, "Starting process %d detach rv %d \n", (int) arg, rv);
  return NULL;

Quote:}

int main()
{
  int retcode;
  pthread_t ths[1040];
  int i;

  for(i=0; i < 1040; i++) {
    retcode = pthread_create(&ths[i], NULL, process, (void*) i);
    if (retcode != 0)
      fprintf(stderr, "create failed for %d %d\n", i, retcode);
    usleep(10000);
  }

  return 0;

Quote:}

 
 
 

Problems with Red Hat 5.1

Post by Ulrich Dreppe » Fri, 03 Jul 1998 04:00:00



> The following program is not able to create threads after the 1022nd
> call. This works fine Solaris 2.6.

They've probably added one of the patches floating around for glibc
2.1 added to the 2.0.7 version for LinuxThreads.  The patched turned
out to be buggy.  I've not yet backported the solution to 2.0.7 but
will do sometime soon and the Debian/RedHat guys will make new
versions available shortly after this (presumably).

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

 
 
 

1. Problems with Red Hat 5.1 and AMDK6

Hello,

The Red Hat installation manual says that AMDK6 is not compatible with
Red Hat 5.1. Whenever I try to install Red Hat 5.1 on my AMDK6, it
freezes up and halts the system. Does anyone have a workaround for that

Tan Jiaqi
The Chinese High School
Visit El Nino Around the World at http://library.advanced.org/17865/

2. l_sysid field in flock_t structure

3. Help! ftp problem with Red hat 5.1

4. wireless network Freebsd AccessPoint

5. mouse configuration problems in Red Hat 5.1

6. Cookie Problem.

7. problems installing Red Hat 5.1

8. Best camera for linux?

9. Problems with Red Hat 5.1 and 56k modem and OPTi soundcard

10. Shutdown Problem w/ Red Hat 5.1

11. X-problem in Red Hat 5.1: blank screen...

12. umount problem with Red Hat 5.1

13. Problems installing Red Hat 5.1 from Hard Disk