From owner-freebsd-threads@FreeBSD.ORG Thu Aug 28 21:42:02 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 558481065694 for ; Thu, 28 Aug 2008 21:42:02 +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 0A6658FC13 for ; Thu, 28 Aug 2008 21:42:01 +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 1KYpFg-0006Go-Ma; Fri, 29 Aug 2008 00:42:00 +0300 Message-ID: <48B71BA6.5040504@icyb.net.ua> Date: Fri, 29 Aug 2008 00:41:58 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.16 (X11/20080821) MIME-Version: 1.0 To: freebsd-threads@freebsd.org References: <48B70A98.5060501@icyb.net.ua> <48B7101E.7060203@icyb.net.ua> In-Reply-To: <48B7101E.7060203@icyb.net.ua> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: 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: Thu, 28 Aug 2008 21:42:02 -0000 on 28/08/2008 23:52 Andriy Gapon said the following: > So can all this be a result of an exception thrown before threads are > initialized? This seems to be it. I can reproduce the issue with the following small C++ program: /*********************************************/ #include static void * thrfunc(void * arg) { return NULL; } int main(void) { pthread_t thr; try { throw int(1); } catch (...) {} pthread_create(&thr, NULL, thrfunc, NULL); return 0; } /*********************************************/ $ uname -a ... FreeBSD 7.0-STABLE #9: Sun Jul 6 17:13:22 EEST 2008 ... i386 -- Andriy Gapon