Date: Wed, 12 Sep 2001 16:43:52 -0400 (EDT) From: Jeff Fellin <jkf@research.bell-labs.com> To: freebsd-questions@freebsd.ORG Subject: Linux threads loses signal Message-ID: <200109122043.QAA23910@zydeco.research.bell-labs.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200109122043.QAA23910>