From owner-freebsd-threads@FreeBSD.ORG Wed Jun 15 11:27:40 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 D8DAE16A41F for ; Wed, 15 Jun 2005 11:27:40 +0000 (GMT) (envelope-from mi@aldan.algebra.com) Received: from mail24.sea5.speakeasy.net (mail24.sea5.speakeasy.net [69.17.117.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E69943D53 for ; Wed, 15 Jun 2005 11:27:40 +0000 (GMT) (envelope-from mi@aldan.algebra.com) Received: (qmail 6642 invoked from network); 15 Jun 2005 11:27:39 -0000 Received: from aldan.algebra.com ([216.254.65.224]) (envelope-sender ) by mail24.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 15 Jun 2005 11:27:39 -0000 Received: from vaio.virtual-estates.net ([199.1.76.10]) by aldan.algebra.com (8.13.1/8.13.1) with ESMTP id j5FBRXeM029916 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 15 Jun 2005 07:27:36 -0400 (EDT) (envelope-from mi@aldan.algebra.com) Received: from vaio.virtual-estates.net (localhost [127.0.0.1]) by vaio.virtual-estates.net (8.13.3/8.13.3) with ESMTP id j5FBRPw4005304; Wed, 15 Jun 2005 07:27:25 -0400 (EDT) (envelope-from mi@aldan.algebra.com) Received: from localhost (localhost [[UNIX: localhost]]) by vaio.virtual-estates.net (8.13.3/8.13.3/Submit) id j5FBRN1Y005303; Wed, 15 Jun 2005 07:27:23 -0400 (EDT) (envelope-from mi@aldan.algebra.com) X-Authentication-Warning: vaio.virtual-estates.net: mi set sender to mi@aldan.algebra.com using -f From: "Mikhail T." To: David Xu Date: Wed, 15 Jun 2005 07:27:22 -0400 User-Agent: KMail/1.8 References: <42AFF243.9080908@freebsd.org> In-Reply-To: <42AFF243.9080908@freebsd.org> X-Face: %UW#n0|w>ydeGt/b@1-.UFP=K^~-:0f#O:D7whJ5G_<5143Bb3kOIs9XpX+"V+~$adGP:J|SLieM31VIhqXeLBli"<=?utf-8?q?kcG=5EEOVihy+z3/UR=7B6SCQ=0A?= MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200506150727.23486@Misha> Cc: freebsd-threads@freebsd.org, grhoten@jtcsv.com Subject: Re: IntlTest hangs on FreeBSD (TestThreadedIntl) (PR#1141) 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: Wed, 15 Jun 2005 11:27:41 -0000 = Have you tried it with libthr on -CURRENT ? No, not in a while. The bug is not 100% reproducible either. You can try it for yourself: cd /usr/ports/devel/icu make make intltest Yours, -mi = = My initial guess is that it seems to be an OS thread scheduler bug. = = The main process spins in a loop without sleeping and frequently = = locks the global mutex while waiting for the other threads to = = finish. None of the other threads get enough time because they are = = all waiting for the global mutex lock from the main process thread = = when its their turn. The main process thread is hoging the global = = mutex while it's in its loop. It's not a deadlock, it's just a type = = of thread scheduling that doesn't happen on other operating systems. = = Whether it is a bug or a legal oddity, our threads (CC-ed) people = would love to hear about it... = = = Adding a sleep() or a yield statement in the main thread of the test = = allows the test to finish. The fix will be available in ICU 3.4. = = -mi