From owner-freebsd-threads@FreeBSD.ORG Thu Aug 10 20:26:36 2006 Return-Path: X-Original-To: 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 DAAF816A4DE; Thu, 10 Aug 2006 20:26:36 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F12643D5A; Thu, 10 Aug 2006 20:26:33 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.7/8.13.7/NETPLEX) with ESMTP id k7AKQIiN005169; Thu, 10 Aug 2006 16:26:18 -0400 (EDT) Date: Thu, 10 Aug 2006 16:26:18 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Simon Marlow In-Reply-To: <2E9B33CE230409489A7ED37E5E34090F05148C80@EUR-MSG-20.europe.corp.microsoft.com> Message-ID: References: <2E9B33CE230409489A7ED37E5E34090F05148C80@EUR-MSG-20.europe.corp.microsoft.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: glasgow-haskell-users@haskell.org, haskell@freebsd.org, Volker Stolz , Simon Peyton-Jones , Tony Finch , Robert Watson , threads@freebsd.org Subject: RE: GHC 6.4.3 on FreeBSD (fwd) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Aug 2006 20:26:36 -0000 On Thu, 10 Aug 2006, Simon Marlow wrote: > Dear threads@freebsd.org (and others), > > This is relating to the problems we're experiencing with GHC's threaded > runtime on FreeBSD (see context below). > > GHC itself, which is a Haskell program, when compiled with itself and > linked against GHC's threaded runtime, sometimes hangs eating 100% CPU. > This happens when it is linked with -pthreads, I haven't seen it when > linking with -lthr. > > If I attach using gdb to a hung process, I see this: > > (gdb) where > #0 0x2897146b in pthread_testcancel () from /usr/lib/libpthread.so.2 > #1 0x28972499 in __error () from /usr/lib/libpthread.so.2 > #2 0x2895e6ba in sigaction () from /usr/lib/libpthread.so.2 > #3 0x087ea6b4 in runProcess (args=0x29091758, workingDirectory=0x0, > environment=0x0, > fdStdInput=0, fdStdOutput=1, fdStdError=2, set_inthandler=1, > inthandler=0, > set_quithandler=1, quithandler=0) at runProcess.c:61 > #4 0x0879b3d0 in s3ja_info () That trace isn't possible. I've found that you can't trust these traces unless you compile libpthread with "-g". -- DE