From owner-freebsd-threads@FreeBSD.ORG Mon Oct 24 17:20:08 2005 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1D50D16A420 for ; Mon, 24 Oct 2005 17:20:08 +0000 (GMT) (envelope-from fbavandpouri@amcc.com) Received: from sdcexchange01.amcc.com (gatekeeper-out.amcc.com [198.137.200.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id B9E2143D45 for ; Mon, 24 Oct 2005 17:20:07 +0000 (GMT) (envelope-from fbavandpouri@amcc.com) Importance: normal Priority: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.326 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Mon, 24 Oct 2005 10:19:39 -0700 Message-ID: <9D1E2BDCB5C57B46B56E6D80843439EBBB87ED@SDCEXCHANGE01.ad.amcc.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: threads/76690: fork hang in child for (-lc_r & -lthr) thread-index: AcXYvBWslwfT+VNUS/CihgPJdHnxGQAAtbOQ From: "Farid Bavandpouri" To: Subject: RE: threads/76690: fork hang in child for (-lc_r & -lthr) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2005 17:20:08 -0000 Remove/unsubscribe mmontaseri@amcc.com=20 -----Original Message----- From: owner-freebsd-threads@freebsd.org [mailto:owner-freebsd-threads@freebsd.org] On Behalf Of Marc Olzheim Sent: Monday, October 24, 2005 9:59 AM To: Daniel Eischen Cc: Marc Olzheim; freebsd-threads@freebsd.org; Marc Olzheim; David Xu; Sven Berkvens-Matthijsse Subject: Re: threads/76690: fork hang in child for (-lc_r & -lthr) On Mon, Oct 24, 2005 at 12:41:01PM -0400, Daniel Eischen wrote: > > But then the free() in the child process may be using an unstable=20 > > state of the malloc system (because if you don't acquire the lock=20 > > before the fork(), malloc() may be busy in the middle of the fork()). >=20 > I don't think that can happen because libc_r will not switch out a=20 > thread that is in a critical region (and libc locks are critical > regions) until it leaves the region. Well, that would be the idea, but GDB traces prove otherwise... :P And that's why the patch prevents the test program in the PR from hanging. Marc -------------------------------------------------------- CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, = is for the sole use of the intended recipient(s) and contains = information that is confidential and proprietary to Applied Micro = Circuits Corporation or its subsidiaries. It is to be used solely for = the purpose of furthering the parties' business relationship. All = unauthorized review, use, disclosure or distribution is prohibited. If = you are not the intended recipient, please contact the sender by reply = e-mail and destroy all copies of the original message.