From owner-cvs-all Fri Feb 23 4:12:38 2001 Delivered-To: cvs-all@freebsd.org Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id 1452337B491; Fri, 23 Feb 2001 04:12:32 -0800 (PST) (envelope-from eischen@vigrid.com) Received: (from eischen@localhost) by pcnet1.pcnet.com (8.8.7/PCNet) id HAA03482; Fri, 23 Feb 2001 07:12:05 -0500 (EST) Date: Fri, 23 Feb 2001 07:12:04 -0500 (EST) From: Daniel Eischen To: Brian Feldman Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libc/stdio _flock_stub.c In-Reply-To: <200102230459.f1N4xE197992@freefall.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 22 Feb 2001, Brian Feldman wrote: > green 2001/02/22 20:59:13 PST > > Modified files: > lib/libc/stdio _flock_stub.c > Log: > Fix the problems I (and others, undoubtedly) have been having for a > while with threaded software in -CURRENT acting very "weird". It has > seemed, for example, in Mozilla that threads attempting to do host > lookups have been locking up. That's exactly the case. > > There was a race condition in the implementation of the initialization > of the mutex used to protect FILE operations, first of all: multiple > instances of FLOCKFILE() in libc could occur on the same FILE at > the same time and cause strange behavior by overwriting eachothers' > creation of the mutex and the rest of the file lock. I knew about this and was going to change it so that struct __file_lock is allocated along with _extra in findfp.c. This would eliminate the race condition and the need to have another mutex. -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message