From owner-freebsd-current@FreeBSD.ORG Thu Jun 14 17:03:05 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 8B64916A468 for ; Thu, 14 Jun 2007 17:03:05 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 0358613C448 for ; Thu, 14 Jun 2007 17:03:04 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (vader.bytemobile.ondsl.gr [83.235.244.135]) (authenticated bits=128) by igloo.linux.gr (8.13.8/8.13.8/Debian-3) with ESMTP id l5EH2qSW006130 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 14 Jun 2007 20:02:59 +0300 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.1/8.14.1) with ESMTP id l5EH2UF8020369; Thu, 14 Jun 2007 20:02:47 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.1/8.14.1/Submit) id l5EH2UKd020368; Thu, 14 Jun 2007 20:02:30 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Thu, 14 Jun 2007 20:02:30 +0300 From: Giorgos Keramidas To: Attilio Rao Message-ID: <20070614170229.GA17675@kobe.laptop> References: <20070614161632.GA3385@kobe.laptop> <3bbf2fe10706140936r4458343do95aa9f16baf2e79a@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3bbf2fe10706140936r4458343do95aa9f16baf2e79a@mail.gmail.com> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.764, required 5, ALL_TRUSTED -1.80, AWL 0.64, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No 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 17:03:05 -0000 On 2007-06-14 18:36, Attilio Rao wrote: >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. Unfortunately, I've only been able to reproduce this while X11 is running, so I can't enter the debugger. I'll see if I can reproduce this on a desktop system with a serial console, because entering ddb on a laptop running X11 without a serial port is at best tricky :) Thanks for the ddb command tips though :-)