[34] in Pthreads mailing list archive
select problem
daemon@ATHENA.MIT.EDU (Nils Jungclaus)
Wed Jul 5 13:18:14 1995
To: pthreads@MIT.EDU
Date: Wed, 5 Jul 1995 18:39:58 +0200 (MET DST)
From: Nils Jungclaus <nils@TechFak.Uni-Bielefeld.DE>
Hello!
I just tested the beta3 version of MIT pthreads hoping it works
together with RPC. Unfortunately it does not.
Getting a segmentation fault in the select code, I tested the
test_select program in the test directory. It works fine as long as the
number of filedescriptors to test in the select call is less than 42
(this is no joke!). I tried 64 and got the following result using
sunos4:
threads forked: bg=0 fg=1a150
initial thread 1a050 joining fg...
select>
Program received signal SIGSEGV, Segmentation fault.
0x106bc in select (numfds=64, readfds=0x33b58, writefds=0x0, exceptfds=0x0,
timeout=0x0)
at /homes/nils/tmp/pthreads.1_60_beta3/pthreads/select.c:131
131 if (fd_table[i]->fd.i >= data.nfds) {
(gdb) where
#0 0x106bc in select (numfds=64, readfds=0x33b58, writefds=0x0,
exceptfds=0x0, timeout=0x0)
at /homes/nils/tmp/pthreads.1_60_beta3/pthreads/select.c:131
#1 0x23b0 in fg_routine (arg=0x0) at test_select.c:68
#2 0xe440 in machdep_pthread_start () at machdep.c:90
#3 0xf0005a34 in end ()
(gdb) print i
$1 = 42
the reason is that fd_table[42] is NULL. This is the same problem
that occurs when using the pmap_unset routine from the RPC lib.
Unfortunately I could not figure out the root of the problem,
so if anybody has a hint, I would be glad.
Nils
,,,
(o o)
-------------------------oOO--(_)--OOo---------------------
Nils Jungclaus University of Bielefeld
phone: +49 521 106-6059 (Germany)
fax: +49 521 106-6011
email: nils@TechFak.uni-bielefeld.de
-----------------------------------------------------------