This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: pthread_create() returning EINTR? (glibc-2.1.3, Linux x86 kernel 2.2.15, gcc-2.95.2)
- To: "George T. Talbot" <george at moberg dot com>
- Subject: Re: pthread_create() returning EINTR? (glibc-2.1.3, Linux x86 kernel 2.2.15, gcc-2.95.2)
- From: Britton <fsblk at aurora dot uaf dot edu>
- Date: Fri, 13 Oct 2000 14:20:30 -0800 (AKDT)
- cc: libc-alpha at sourceware dot cygnus dot com
On Fri, 13 Oct 2000, George T. Talbot wrote:
> I've got a program which spawns threads that listen on sockets. After
> running for a while, and opening and closing a lot of sockets, and
> starting a lot of threads, pthread_create() returns -1 with errno set to
> EINTR. EINTR isn't listed on pthread_create()'s man page, though I know
> what it is after using select().
pthread_create() won't ever set errno. pthread function returns zero on
success, and an error code on error. So the value you are seeing in errno
is either the result of an error in some previous other system call, or
errno is just starting out at EINTR and never getting changed (this has
happened to me).
> Once it starts returning EINTR, no more threads can be created. I also
> see this:
>
> BUG IN DYNAMIC LINKER ld.so: dl-runtime.c: 67: fixup: Assertion
> `((reloc->r_info) & 0xff) == 7' failed!
>
> At this point I'm going to assume that I've either corrupted some data
> structure, or run out of some critical system resource. Any ideas?
Probably you have run up against PTHREAD_THREADS_MAX.
Britton