Re: hwpmc deadlock: processes hang on pmc-sx

From: Bruce Cran <bruce_at_cran.org.uk>
Date: Tue, 11 Nov 2008 21:54:13 -0800
On Tue, 11 Nov 2008 20:49:41 -0800
Bruce Cran <bruce_at_cran.org.uk> 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<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
>   Features2=0x2001<SSE3,CX16>
>   AMD
> Features=0xea500800<SYSCALL,NX,MMX+,FFXSR,RDTSCP,LM,3DNow!+,3DNow!>
> AMD Features2=0x1f<LAHF,CMP,SVM,ExtAPIC,CR8> Cores per package: 2
> usable memory = 2071433216 (1975 MB)
> avail memory  = 2001584128 (1908 MB)
> ACPI APIC Table: <PTLTD          APIC  >
> 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_at_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
Received on Wed Nov 12 2008 - 04:54:37 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:37 UTC