From owner-freebsd-threads@FreeBSD.ORG Thu Jun 26 14:02:21 2003 Return-Path: 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 3197B37B404 for ; Thu, 26 Jun 2003 14:02:21 -0700 (PDT) Received: from rwcrmhc12.attbi.com (rwcrmhc12.attbi.com [216.148.227.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3C72243FF2 for ; Thu, 26 Jun 2003 14:02:20 -0700 (PDT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org ([12.233.125.100]) by attbi.com (rwcrmhc12) with ESMTP id <200306262102090140073a31e>; Thu, 26 Jun 2003 21:02:10 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id OAA13339; Thu, 26 Jun 2003 14:02:07 -0700 (PDT) Date: Thu, 26 Jun 2003 14:02:06 -0700 (PDT) From: Julian Elischer To: deischen@gdeb.com In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-threads@freebsd.org Subject: Re: libkse / libthr bugs? X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2003 21:02:21 -0000 On Thu, 26 Jun 2003, Daniel Eischen wrote: > On Thu, 26 Jun 2003, Alex Boisvert wrote: > > Hi, > > > > I written a small test case (see source below), which I've run against > > both libkse and libthr. I'm using -CURRENT as of last Tuesday and > > running on a Dual Athlon MP 1.2 GHz (Tyan Thunder K7 motherboard). > > > > With libkse, the program runs most of the time (say, about 9 times out > > of 10) but sometimes hang and, interestingly, prints an "F" character to > > the console -- but that "F" character is never printed by the > > application itself! (see source) > > > > Here are two examples of when it hangs: > > > > bipolar:boisvert:~/prog/pthread:48 gcc -g -lkse -o foo2 foo2.c > > bipolar:boisvert:~/prog/pthread:49 ./foo2 1000 > > Using 1000 threads (parameter) > > bar 0 > > bar 1 > > bar 2 > > Fbar 3 > > ^C > > bipolar:boisvert:~/prog/pthread:50 > > > > (Notice the "F" on the last line, before I had to use CTRL-C to > > terminate the application). > > > > Also, sometimes I get: > > > > bipolar:boisvert:~/prog/pthread:65 ./foo2 1000 > > Using 1000 threads (parameter) > > F > > ^C > > bipolar:boisvert:~/prog/pthread:66 > > I don't really see anything wrong with your test program. There > would seem to be a bug in libkse or perhaps even in libc (stdio > not being thread-safe or something). > > We've got some changes in the works. I'll check them out > with your test program. Thanks! There is sonething slightly wrong in the KSE system as eventeh kse test program doesn't start up correctly occasionally.