From owner-freebsd-threads@FreeBSD.ORG Mon Sep 1 10:53:31 2008 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C198106567C; Mon, 1 Sep 2008 10:53:31 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from hosted.kievnet.com (hosted.kievnet.com [193.138.144.10]) by mx1.freebsd.org (Postfix) with ESMTP id 1F61E8FC08; Mon, 1 Sep 2008 10:53:31 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from localhost ([127.0.0.1] helo=edge.pp.kiev.ua) by hosted.kievnet.com with esmtpa (Exim 4.62) (envelope-from ) id 1Ka72H-000PGP-T2; Mon, 01 Sep 2008 13:53:29 +0300 Message-ID: <48BBC9A3.1050905@icyb.net.ua> Date: Mon, 01 Sep 2008 13:53:23 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.16 (X11/20080821) MIME-Version: 1.0 To: Kostik Belousov References: <48B8052A.6070908@icyb.net.ua> <20080829143645.GY2038@deviant.kiev.zoral.com.ua> <20080829190506.GA2038@deviant.kiev.zoral.com.ua> <20080830155622.GF2038@deviant.kiev.zoral.com.ua> <20080830184512.GH2038@deviant.kiev.zoral.com.ua> <48BBA369.9010108@freebsd.org> <48BBA925.1000303@icyb.net.ua> <20080901084548.GQ2038@deviant.kiev.zoral.com.ua> In-Reply-To: <20080901084548.GQ2038@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit Cc: Daniel Eischen , David Xu , freebsd-threads@freebsd.org Subject: Re: mysterious hang in pthread_create 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, 01 Sep 2008 10:53:31 -0000 on 01/09/2008 11:45 Kostik Belousov said the following: > On Mon, Sep 01, 2008 at 11:34:45AM +0300, Andriy Gapon wrote: >> on 01/09/2008 11:10 David Xu said the following: >>> The ancient bug is in rtld, rlock_acquire() and wlock_acquire() test >>> thread_flag as a boolean value, because pt_iterate_phdr() tries to >>> lock two locks at same time, this test will always fail once it >>> acquired first lock. >>> >>> The following silly patch fixes the problem Andriy encountered: >> I can confirm - this fixed the issue for me. >> David, thanks! > > Does libc_r still work with patch applied ? In what sense? The test program that I posted seems to hang in both cases (patched and unpatched rtld). -- Andriy Gapon