From owner-freebsd-current@FreeBSD.ORG Thu Jun 14 16:36:19 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8809416A41F for ; Thu, 14 Jun 2007 16:36:19 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from ik-out-1112.google.com (ik-out-1112.google.com [66.249.90.178]) by mx1.freebsd.org (Postfix) with ESMTP id 2001013C465 for ; Thu, 14 Jun 2007 16:36:18 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by ik-out-1112.google.com with SMTP id c21so614312ika for ; Thu, 14 Jun 2007 09:36:17 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=WP2MExwIjYMMIoYg7+Vc3PtLNqiM53kdOvVdnLh91jFNkaBGNP7utIcf4Wo0a08r48i3C62QKnqxDqZid3WDuTl4YMR2Vpj0IE8vlWS+EIepFZlYjk7nOK8MEUma1TfIlbZRbiKjS5UWTizR6bpwcIC10gPJv3YAbsubS/xXnv0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=CdrgVBl4Ran8ussEqVR/Bwv+juEb92/YThS3NmKpN96mZM6wokwVeZ9+Pfj2fRKESwyDzvM2jl2Y7NrsUdly2FoEYh2kUd8yUOhW0KI4ETEmz/z8Kkvb9RHSOStT9mS2bStLUkIp7cGh+QUduFB1NIq4UECdUYcBtz3mmlpLscU= Received: by 10.78.183.15 with SMTP id g15mr768682huf.1181838977147; Thu, 14 Jun 2007 09:36:17 -0700 (PDT) Received: by 10.78.120.9 with HTTP; Thu, 14 Jun 2007 09:36:17 -0700 (PDT) Message-ID: <3bbf2fe10706140936r4458343do95aa9f16baf2e79a@mail.gmail.com> Date: Thu, 14 Jun 2007 18:36:17 +0200 From: "Attilio Rao" Sender: asmrookie@gmail.com To: "Giorgos Keramidas" In-Reply-To: <20070614161632.GA3385@kobe.laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070614161632.GA3385@kobe.laptop> X-Google-Sender-Auth: 25b37b1e8e2ed968 Cc: current@freebsd.org Subject: Re: hard-lock with CPU spinning 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: Thu, 14 Jun 2007 16:36:19 -0000 2007/6/14, Giorgos Keramidas : > If I leave my laptop idle for a long period of time, it tends to lock up > with the CPU fan spinning fast (presumambly because some part of the > kernel tries to acquire a lock and spins constantly for it). > > Unfortunately, this happens when X11 is running and I can't break into > DDB to snoop around. > > I did notice that if I leave a terminal running: > > $ while true ; do \ > echo -n "$(date '+%Y-%m-%d %H:%M') " ; \ > tail -1 /var/log/messages ; \ > sleep 10 ; \ > done > > this works as a 'workaround' for the hardlock. > > The sources of /usr/src have been updated up to: > > 2007.06.12.15.37.17 > > Any ideas how I could try to debug this? Recompile the kernel with DDB support (pay attention to disable KDB_UNATTENDED), additionally add WITNESS support (paying attention to not add WITNESS_SKIPSPIN), even if this wouldn't help in direct analysis. Then, when the kernel hangs, just break into the debugger and print out bt, show alllocks, ps. This would give a reasonable start. Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein