From: jvf@aurora.cc.monash.edu.au (J Frankland)
Subject: BookReader threads example crashes
Date: 1995/12/18 [thread overview]
Message-ID: <4b2q2j$i1l@harbinger.cc.monash.edu.au> (raw)
The threads programming example in the Guide to DECthreads (accessible
by the bookreader) which conducts a prime number search, crashes.
It is Example 5-1. After compiling with the -lpthreads link flag, and
running it, it Seg Faults before it get to the main() function.
It appears to get into a recursive loop where the function
mig_get_reply_port() calls port_allocate() which calls mig_get_reply_port()
which calls port_allocate(), and so on until the stack overflows resulting
in a Seg Fault.
Here is what the stack looks like before it overflows:
(gdb) where
#0 port_allocate () at ./mach_user.c:6092
#1 0x3ff818043c8 in mig_get_reply_port ()
at ../../../../../src/usr/ccs/lib/libmach/mig_support.c:68
#2 0x3ff81808924 in port_allocate () at ./mach_user.c:6096
#3 0x3ff818043c8 in mig_get_reply_port ()
at ../../../../../src/usr/ccs/lib/libmach/mig_support.c:68
#4 0x3ff81808924 in port_allocate () at ./mach_user.c:6096
#5 0x3ff818043c8 in mig_get_reply_port ()
at ../../../../../src/usr/ccs/lib/libmach/mig_support.c:68
#6 0x3ff81808924 in port_allocate () at ./mach_user.c:6096
#7 0x3ff818043c8 in mig_get_reply_port ()
at ../../../../../src/usr/ccs/lib/libmach/mig_support.c:68
#8 0x3ff81808924 in port_allocate () at ./mach_user.c:6096
#9 0x3ff818043c8 in mig_get_reply_port ()
at ../../../../../src/usr/ccs/lib/libmach/mig_support.c:68
#10 0x3ff81805230 in vm_allocate () at ./mach_user.c:678
#11 0x3ff8082da7c in more_memory ()
at ../../../../../src/usr/ccs/lib/DECthreads/alpha/cma_malloc.c:253
#12 0x3ff8082dce8 in malloc ()
at ../../../../../src/usr/ccs/lib/DECthreads/alpha/cma_malloc.c:376
#13 0x3ff80841138 in cma__alloc_mem ()
at ../../../../../src/usr/ccs/lib/DECthreads/COMMON/cma_vm.c:562
#14 0x3ff8082fb40 in cma__get_first_mutex ()
at ../../../../../src/usr/ccs/lib/DECthreads/COMMON/cma_mutex.c:1495
#15 0x3ff8081f360 in cma__init_attr ()
at ../../../../../src/usr/ccs/lib/DECthreads/COMMON/cma_attr.c:1256
#16 0x3ff8082d140 in cma__init_static ()
at ../../../../../src/usr/ccs/lib/DECthreads/COMMON/cma_init.c:868
#17 0x3ff8082cff8 in cma_init ()
at ../../../../../src/usr/ccs/lib/DECthreads/COMMON/cma_init.c:650
(gdb)
I get the same problem when I compile and run any other sample threads
programs (using pthreads calls) that I have found. I have had this problem
on a number of DEC Alpha's running various version of OSF/1; 3.0 through 3.2.
next reply other threads:[~1995-12-18 5:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-12-18 5:00 J Frankland [this message]
1995-12-19 5:00 ` BookReader threads example crashes Jeffrey M. Denham
1995-12-21 5:00 ` Chris Davis
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox