From owner-freebsd-current Sat May 30 22:21:14 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA04600 for freebsd-current-outgoing; Sat, 30 May 1998 22:21:14 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from rah.star-gate.com (rah.star-gate.com [209.133.7.234]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA04595 for ; Sat, 30 May 1998 22:21:12 -0700 (PDT) (envelope-from hasty@rah.star-gate.com) Received: from rah.star-gate.com (localhost.star-gate.com [127.0.0.1]) by rah.star-gate.com (8.8.8/8.8.8) with ESMTP id WAA19570; Sat, 30 May 1998 22:21:00 -0700 (PDT) (envelope-from hasty@rah.star-gate.com) Message-Id: <199805310521.WAA19570@rah.star-gate.com> X-Mailer: exmh version 2.0.2 2/24/98 To: John Birrell cc: current@FreeBSD.ORG Subject: Re: pthreads and thread-specific? In-reply-to: Your message of "Sun, 31 May 1998 15:09:57 +1000." <199805310509.PAA13433@cimlogic.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 30 May 1998 22:21:00 -0700 From: Amancio Hasty Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG {hasty} ldd Barrier_Test Barrier_Test: libACE.so => /usr/lib/libACE.so (0x28052000) libc_r.so.3 => /usr/lib/libc_r.so.3 (0x2815b000) libstdc++.so.2 => /usr/lib/libstdc++.so.2 (0x281e3000) libg++.so.4 => /usr/lib/libg++.so.4 (0x2821a000) libm.so.2 => /usr/lib/libm.so.2 (0x28257000) libc.so.3 => /usr/lib/libc.so.3 (0x28271000) libc_r.so.3 => /usr/lib/libc_r.so.3 (0x2815b000) libstdc++.so.2 => /usr/lib/libstdc++.so.2 (0x281e3000) libg++.so.4 => /usr/lib/libg++.so.4 (0x2821a000) libm.so.2 => /usr/lib/libm.so.2 (0x28257000) Looks like I am pulling the right libraries. I will browse at the code a little bit more. Tnks, amancio > Amancio Hasty wrote: > > Hi John, > > > > It looks like the threads are waiting on a dead thread... > > > > I stuck this in uthread_info: > [...] > > I don't think you needed the outer loop. Chuckle. > > > for (itr = 0; itr < PTHREAD_DESTRUCTOR_ITERATIONS; itr++) { > [...] > > > > DEAD THREADS > > > > Thread 0x8050800 prio 64 [/usr/src/lib/libc_r/uthread/uthread_exit.c:176] > > Hmmm, so Elvis really isn't dead. He's just deadlocked waiting on a > spinlock. 8-) > > For the thread to be dead, it must have completed the cleanup. There is > only one place where it sets it's state to PS_DEAD and that is after all > exit processing has been completed and it has removed itself from the > list of active threads. As far as I can see, the _spinlock/_atomic_unlock > calls are correctly paired in src/lib/libc_r/uthread/uthread_spec.c, > so it looks like the _atomic_unlock call hasn't done it's job. Is the > _atomic_unlock linked into the process from libc_r, or has another > function of the same name been linked in first? You are linking with > gcc -pthread on a -current system, aren't you? > > -- > John Birrell - jb@cimlogic.com.au; jb@freebsd.org http://www.cimlogic.com.au/ > CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message