From owner-freebsd-threads@FreeBSD.ORG Thu Jun 26 11:27:56 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 E661137B401 for ; Thu, 26 Jun 2003 11:27:56 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id B4F9043FBF for ; Thu, 26 Jun 2003 11:27:55 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h5QIRsXh018245; Thu, 26 Jun 2003 14:27:54 -0400 (EDT) Date: Thu, 26 Jun 2003 14:27:54 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Alex Boisvert In-Reply-To: <3EFB2E12.3080504@intalio.com> 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 Reply-To: deischen@gdeb.com List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2003 18:27:57 -0000 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! -- Dan Eischen