From owner-cvs-all Wed Jun 27 4:47:29 2001 Delivered-To: cvs-all@freebsd.org Received: from magnesium.net (toxic.magnesium.net [207.154.84.15]) by hub.freebsd.org (Postfix) with SMTP id B342837B409 for ; Wed, 27 Jun 2001 04:47:25 -0700 (PDT) (envelope-from jasone@magnesium.net) Received: (qmail 2144 invoked by uid 1142); 27 Jun 2001 11:47:35 -0000 Date: 27 Jun 2001 04:47:35 -0700 Date: Wed, 27 Jun 2001 04:46:39 -0700 From: Jason Evans To: Jason Evans Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libc_r/uthread pthread_private.h uthread_find_thread.c uthread_join.c Message-ID: <20010627044639.J47186@canonware.com> References: <200106271141.f5RBfGm89143@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200106271141.f5RBfGm89143@freefall.freebsd.org>; from jasone@FreeBSD.org on Wed, Jun 27, 2001 at 04:41:16AM -0700 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Jun 27, 2001 at 04:41:16AM -0700, Jason Evans wrote: > jasone 2001/06/27 04:41:16 PDT > > Modified files: > lib/libc_r/uthread pthread_private.h uthread_find_thread.c > uthread_join.c > Log: > Fix a race condition in pthread_join(). All of the following must occur > atomically: > > 1) Search _thread_list for the thread to join. > 2) Search _dead_list for the thread to join. > 3) Set the running thread as the joiner. This is a pretty serious problem, and has surely caused mysterious program hangs for people besides myself. I will be out of town until 4 July, and plan to MFC this fix upon returning. A patch for RELENG_4 is available for those who can't wait: http://people.freebsd.org/~jasone/diffs/join_race_releng_4.diff Jason To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message