From owner-freebsd-questions Wed Sep 12 13:45:56 2001 Delivered-To: freebsd-questions@freebsd.org Received: from dirty.research.bell-labs.com (dirty.research.bell-labs.com [204.178.16.6]) by hub.freebsd.org (Postfix) with SMTP id E80BC37B40E for ; Wed, 12 Sep 2001 13:45:47 -0700 (PDT) Received: from grubby.research.bell-labs.com ([135.104.2.9]) by dirty; Wed Sep 12 16:44:13 EDT 2001 Received: from zydeco.research.bell-labs.com ([135.104.120.150]) by grubby; Wed Sep 12 16:44:29 EDT 2001 Received: (from jkf@localhost) by zydeco.research.bell-labs.com (8.9.1/8.9.1) id QAA23910; Wed, 12 Sep 2001 16:43:52 -0400 (EDT) Date: Wed, 12 Sep 2001 16:43:52 -0400 (EDT) From: Jeff Fellin Message-Id: <200109122043.QAA23910@zydeco.research.bell-labs.com> To: freebsd-questions@freebsd.ORG Subject: Linux threads loses signal X-Sun-Charset: US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG We have an application using the linuxthreads package, version 2.1.3_2, installed on FreeBSD 4.3. The application occassionally gets blocked waiting in pthread_cond_timedwait_relative_old(), at least from the stack trace. There are many threads, 13, in the application each calling pthread_cond_timedwait. We have been unable to recreate the problem in a smaller program, since we don't understand what is happening in the linuxthreads library with cond_timedwait. To help determine where the problem was we modified the file, condvar.c, around line 220, by adding two print statements shown below: if (!was_signalled) { if (atomic_increment(&self->p_resume_count) != -1) { printf ("***********Waiting for restart signal from %x, resume_count %d\n", (int)self, (int)(self->p_resume_count.p_count)); __pthread_wait_for_restart_signal(self); printf ("***********Received restart signal from %x\n", (int)self); atomic_decrement(&self->p_resume_count); /* should be zero now! */ When the thread blocks the last message printed is: ***********Waiting for restart signal from bedffe60, resume_count 1 But I never see that the restart signal was received. Does any one have ideas on what the problem might be and/or a fix? Is there additional information that would be helpful to print? Jeff Fellin Bell Labs 600 Mountain Ave. Murray Hill, NJ 07974 fellin@lucent.com 908 582-7673 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message