From owner-freebsd-current@FreeBSD.ORG Wed Nov 12 05:54:37 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90D14106567C; Wed, 12 Nov 2008 05:54:37 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (muon.cran.org.uk [66.246.138.153]) by mx1.freebsd.org (Postfix) with ESMTP id 52AC68FC1F; Wed, 12 Nov 2008 05:54:37 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (localhost [127.0.0.1]) by muon.cran.org.uk (Postfix) with ESMTP id 150321923E; Wed, 12 Nov 2008 00:54:36 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on muon X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=AWL, BAYES_00, MISSING_HEADERS, RDNS_NONE autolearn=no version=3.2.5 Received: from tau.draftnet (unknown [66.45.161.67]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA; Wed, 12 Nov 2008 00:54:35 -0500 (EST) Date: Tue, 11 Nov 2008 21:54:13 -0800 From: Bruce Cran Message-ID: <20081111215413.7aa9ea86@tau.draftnet> In-Reply-To: <20081111204941.4bfdb7c4@tau.draftnet> References: <20081111204941.4bfdb7c4@tau.draftnet> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; amd64-portbld-freebsd7.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: jkoshy@freebsd.org, current@freebsd.org Subject: Re: hwpmc deadlock: processes hang on pmc-sx X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 05:54:37 -0000 On Tue, 11 Nov 2008 20:49:41 -0800 Bruce Cran wrote: > I decided to try hwpmc today, but ran into a > deadlock on the second run. I'm using a dual core laptop: > > CPU: AMD Turion(tm) 64 X2 Mobile Technology TL-52 (1600.07-MHz > K8-class CPU) Origin = "AuthenticAMD" Id = 0x40f82 Stepping = 2 > Features=0x178bfbff > Features2=0x2001 > AMD > Features=0xea500800 > AMD Features2=0x1f Cores per package: 2 > usable memory = 2071433216 (1975 MB) > avail memory = 2001584128 (1908 MB) > ACPI APIC Table: > FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs > cpu0 (BSP): APIC ID: 0 > cpu1 (AP): APIC ID: 1 > > uname: > FreeBSD tau.draftnet 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Sun Nov 9 > 13:12:06 PST 2008 > brucec@tau.draftnet:/usr/obj/usr/src/sys/MYKERNEL_8 amd64 > > I ran the command > pmcstat -O test.stat -n 32768 -S instructions > > I found that I couldn't quit pmcstat and any attempt to run new > processes hung too. The 'ps' listing in ddb > contained the following: > > State wmesg cmd > Ss pmc-sx sh > S piperd cron > S pmc-sx cron > S pmc-sx gconf-d > T+ pmc-sx dmesg > S+ pmc-sx top > SL pmcloop [hwpmc] > S+ pmcctx pmcstat > > Are there any commands I should run at the debugger to > collect more information if I trigger it again? > I seem to be able to trigger it quite reliably by running pmcstat while "nc -l 20000 > /dev/null" is running in one terminal and "nc 127.0.0.1 20000 < /dev/zero" is running in another. It still happens with a GENERIC kernel; I've tried to get some information about locks from ddb but I clearly have some reading to do first, because it isn't giving me any data. -- Bruce Cran