From owner-freebsd-stable@FreeBSD.ORG Tue Nov 15 06:57:52 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 3D2C916A41F for ; Tue, 15 Nov 2005 06:57:52 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au [211.29.132.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CE8043D7E for ; Tue, 15 Nov 2005 06:57:43 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail08.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id jAF6veDd025176 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 15 Nov 2005 17:57:41 +1100 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1]) by cirb503493.alcatel.com.au (8.12.10/8.12.10) with ESMTP id jAF6veHh091688; Tue, 15 Nov 2005 17:57:40 +1100 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost) by cirb503493.alcatel.com.au (8.12.10/8.12.9/Submit) id jAF6veHw091687; Tue, 15 Nov 2005 17:57:40 +1100 (EST) (envelope-from pjeremy) Date: Tue, 15 Nov 2005 17:57:40 +1100 From: Peter Jeremy To: Rob Message-ID: <20051115065740.GH39882@cirb503493.alcatel.com.au> References: <20051115021311.GA1260@xor.obsecurity.org> <20051115063859.48741.qmail@web36205.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051115063859.48741.qmail@web36205.mail.mud.yahoo.com> User-Agent: Mutt/1.4.2.1i X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc Cc: freebsd-stable@freebsd.org Subject: Re: Swapfile problem in 6? (was: 6.0: during kernel compilation, 'kernel linking' freezes PC) 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: Tue, 15 Nov 2005 06:57:52 -0000 On Mon, 2005-Nov-14 22:38:59 -0800, Rob wrote: >--- Kris Kennaway wrote: >> Since you can compile a kernel without it, add DDB, >> WITNESS and INVARIANTS support, then trigger the >> deadlock with the swapfile, break to DDB and >> examine the state of the machine. See the chapter >> on kernel debugging in the developers handbook for >> more instructions. > >Thanks, but for now, I cannot compile a new kernel, >because the kernel compilation terminates with >insufficient swap space error. Unfortunately, we're probably not going to be able to provide much assistance without knowing more about what is happening when it deadlocks. (As Kris requests). BTW, you should probably make sure you keep "makeoptions DEBUG=-g" and set dumpdev in rc.conf (which will make it possible to capture and use a crashdump if you can trigger one). > Apparently 32 MB is >not enough for a new kernel compilation. Quite probably. >This is my partitioning: > /dev/ad0s1a 253678 34446 198938 15% / > /dev/ad0s1b 39848 8168 39848 20% (swap) > /dev/ad0s1d 253678 152958 80426 66% /var > /dev/ad0s1e 253678 6016 227368 3% /home > /dev/ad0s1f 1624576 727274 767336 49% /usr Since your /home is almost empty, how about (temporarily) moving the contents into /usr and swapping onto ad0s1e rather than into a swapfile. This should at least enable you to build a debug kernel. >First I used 128 MB swapfile on root partition; >then tried again with a 128 MB swapfile on /var. >However, exactly the same deadlock occurs: Have you pre-allocated the swapfile or is it being allocated as necessary? If the latter, try "dd if=/dev/zero of=swapfile bs=1m count=128" -- Peter Jeremy