From owner-freebsd-stable@FreeBSD.ORG Wed Nov 16 15:01:57 2005 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3891016A420 for ; Wed, 16 Nov 2005 15:01:57 +0000 (GMT) (envelope-from lars+lister.freebsd@adventuras.no) Received: from mail.adventuras.no (mail.adventuras.no [194.63.250.215]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2701B43D46 for ; Wed, 16 Nov 2005 15:01:55 +0000 (GMT) (envelope-from lars+lister.freebsd@adventuras.no) Received: from mail.adventuras.no (seven [127.0.0.1]) by mail.adventuras.no (8.12.10/8.12.10) with ESMTP id jAGF1ajt026667 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Wed, 16 Nov 2005 16:01:36 +0100 Received: (from apache@localhost) by mail.adventuras.no (8.12.10/8.12.10/Submit) id jAGF1afq026665; Wed, 16 Nov 2005 16:01:36 +0100 Received: from 213.236.228.129 (SquirrelMail authenticated user lars) by mail.adventuras.no with HTTP; Wed, 16 Nov 2005 16:01:36 +0100 (CET) Message-ID: <54759.213.236.228.129.1132153296.squirrel@mail.adventuras.no> In-Reply-To: <20051115103821.GJ39882@cirb503493.alcatel.com.au> References: <20051115065740.GH39882@cirb503493.alcatel.com.au> <20051115100813.74195.qmail@web36214.mail.mud.yahoo.com> <20051115103821.GJ39882@cirb503493.alcatel.com.au> Date: Wed, 16 Nov 2005 16:01:36 +0100 (CET) From: "Lars Kristiansen" To: freebsd-stable@freebsd.org User-Agent: SquirrelMail/1.4.4-1 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Adventuras-MailScanner-Information: Please contact the ISP for more information X-Adventuras: du kan filtrere etter AdvSpamScore over 5-10 X-Adventuras-SpamCheck: not spam, SpamAssassin (score=-4.399, required 6, autolearn=not spam, ALL_TRUSTED -1.80, BAYES_00 -2.60) X-MailScanner-From: lars+lister.freebsd@adventuras.no Subject: Re: Swapfile problem in 6? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Nov 2005 15:01:57 -0000 > On Tue, 2005-Nov-15 02:08:12 -0800, Rob wrote: >> makeoptions DEBUG=-g >> options INVARIANTS >> options WITNESS >> options WITNESS_KDB >> options KDB >> options DDB >> options DDB_NUMSYM >> options GDB >> >>Is that enough? > > If your system is headless, you probably want 'options BREAK_TO_DEBUGGER' > as well. > > First question is: Does the system still deadlock? INVARIANTS and > WITNESS will have added sanity checks which might have picked up the > problem. > >>1) Can I debug a kernel that does not crash, but >> just hangs in a deadlock? Everything seems to >> be frozen, except pinging the PC.... > > Have a look at > http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug-online-ddb.html > and ddb(4). Unless you have another system handy, you might like to print > out ddb(4) - it's difficult to read man pages when you're in the kernel > debugger :-). > >>2) Is such debugging possible on a headless PC >> without a keyboard attached? >> I do have serial console access. > > Yes. See above URL. The advantage is that you can (hopefully) > capture a log of your debug session. Send a serial BREAK and you > should get a DDB> prompt. > > Basically, wait until your system deadlocks. BREAK into DDB. > As a start, run 'show lockedvnods', 'ps'. My guess is that you'll > see a lock that has a number of waiters - which is probably the > culprit. Use 'panic' to get a crashdump and then you can use kgdb > to rummage around once you reboot - see > http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug-gdb.html > > If in doubt, post the output from the above commands here and someone > will hopefully provide further input. Hello again, I am the "me too"-guy with console-access. I am not a programmer and it is the first time I see debugging screen. It deadlocked again, and I did as advised above: (ddb: show lockedvnods; ps ; panic) but did not understand much of the output. Looked maybe like syncer and swap_pager was locked? Do i need to write all this down or can I get the output saved somewhere? I got a 32MB coredump but the same lack of understanding applies. Please tell me if I can be of any help! This is fun. -- Lars > > -- > Peter Jeremy > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" >