From owner-freebsd-current Mon Oct 19 18:03:07 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA14497 for freebsd-current-outgoing; Mon, 19 Oct 1998 18:03:07 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from orkan.canonware.com (canonware.com [206.184.206.112]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA14486 for ; Mon, 19 Oct 1998 18:03:05 -0700 (PDT) (envelope-from jasone@canonware.com) Received: from localhost (jasone@localhost) by orkan.canonware.com (8.8.7/8.8.7) with SMTP id SAA08966; Mon, 19 Oct 1998 18:03:23 -0700 Date: Mon, 19 Oct 1998 18:03:22 -0700 (PDT) From: Jason Evans To: HighWind Software Information cc: current@FreeBSD.ORG Subject: Re: Another Serious libc_r problem In-Reply-To: <199810191835.OAA20137@highwind.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hmm, your test case is very similar to some code that was causing deadlock for me. However, I boiled it down to the following code as being the actual bug. We may be seeing the same thing (but maybe not; I haven't had time to dig into this all the way). Jason Jason Evans Email: [jasone@canonware.com] Web: [http://www.canonware.com/~jasone] Home phone: [(650) 856-8204] Work phone: [(415) 808-8742] Quote: ["Invention is 1% inspiration and 99% perspiration" - Thomas Edison] ======================== /* -*-mode:c-*- */ #ifndef _REENTRANT # define _REENTRANT #endif #include #include #include #include #include int main() { pthread_mutex_t mutex; int error; error = pthread_mutex_init(&mutex, NULL); if (error) { fprintf(stderr, "Error in pthread_mutex_init(): %s\n", strerror(error)); exit(1); } fprintf(stderr, "About to lock mutex first time.\n"); error = pthread_mutex_lock(&mutex); if (error) { fprintf(stderr, "Error in pthread_mutex_lock(): %s\n", strerror(error)); exit(1); } fprintf(stderr, "About to lock mutex second time; expect deadlock.\n"); error = pthread_mutex_lock(&mutex); if (error) { fprintf(stderr, "Error in pthread_mutex_lock(): %s\n", strerror(error)); exit(1); } fprintf(stderr, "Wow, no deadlock.\n"); error = pthread_mutex_destroy(&mutex); if (error) { fprintf(stderr, "Error in pthread_mutex_destroy(): %s\n", strerror(error)); exit(1); } return 0; } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message