From owner-freebsd-current@FreeBSD.ORG Fri Sep 24 16:44:54 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EFACC16A4DB; Fri, 24 Sep 2004 16:44:53 +0000 (GMT) Received: from tomts22-srv.bellnexxia.net (tomts22-srv.bellnexxia.net [209.226.175.184]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4DB1E43D2D; Fri, 24 Sep 2004 16:44:53 +0000 (GMT) (envelope-from dashevil@sympatico.ca) Received: from [192.168.2.32] ([67.68.38.73]) by tomts22-srv.bellnexxia.net ESMTP <20040924164452.BVGQ2542.tomts22-srv.bellnexxia.net@[192.168.2.32]>; Fri, 24 Sep 2004 12:44:52 -0400 From: Chris Laverdure To: David Schultz In-Reply-To: <20040924161255.GA699@VARK.MIT.EDU> References: <7m7jqjhojv.wl@black.imgsrc.co.jp> <20040924122508.GG9550@darkness.comp.waw.pl> <20040924161255.GA699@VARK.MIT.EDU> Content-Type: text/plain Message-Id: <1096044256.677.0.camel@elemental.DashEvil> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Fri, 24 Sep 2004 12:44:17 -0400 Content-Transfer-Encoding: 7bit cc: freebsd-current@freebsd.org Subject: Re: panic: swap_pager_isswapped: failed to locate all swap meta blocks X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Fri, 24 Sep 2004 16:44:54 -0000 On Fri, 2004-09-24 at 12:12, David Schultz wrote: > On Fri, Sep 24, 2004, Pawel Jakub Dawidek wrote: > > On Fri, Sep 24, 2004 at 08:52:20PM +0900, Jun Kuriyama wrote: > > +> > > +> This is current as of 2004.09.23.23.00.00+00 (when I hit "shutdown -r > > +> now"). > > +> > > +> ----- > > +> Shutting down local daemons:. > > +> Writing entropy file:. > > +> panic: swap_pager_isswapped: failed to locate all swap meta blocks > > +> cpuid = 1 > > +> KDB: enter: panic > > +> [thread 100138] > > +> Stopped at kdb_enter+0x2b: nop > > +> db> tr > > +> kdb_enter(c068a149) at kdb_enter+0x2b > > +> panic(c069dbcc,1000000,20000020,0,c43ee000) at panic+0x127 > > +> swap_pager_isswapped(c42c44a4,c392e880,c42c44a4,0,c069dec7,18c) at swap_pager_isswapped+0xf6 > > +> vm_proc_swapin_all(c392e880,c072d540,0,c069da42,8b6) at vm_proc_swapin_all+0x6a > > +> swapoff(c3b8bc00,ecda9d14,1,1,296) at swapoff+0x1b6 > > +> syscall(2f,2f,2f,8049368,1) at syscall+0x213 > > +> Xint0x80_syscall() at Xint0x80_syscall+0x1f > > +> --- syscall (424, FreeBSD ELF32, swapoff), eip = 0x280c066b, esp = 0xbfbfee0c, ebp = 0xbfbfee28 --- > > +> ----- > > +> > > +> I have a core if you want. > > Sorry, I just committed a patch that I believe will fix this. > > > This is indirectly caused by me. I added 'stop' method to rc.d/swap1 script > > and now swapoff(8) is done on every shutdown(8) run. > > > > Will it be possible to fix it or should I made this optional? > > One thing worth pointing out is that the present swapoff(2) > implementation can be pretty slow if there's a lot of stuff > swapped out. It swaps data in synchronously, one page at a time. > It would not be difficult to improve on this, but it isn't a > priority. You might want to look at how fast it is and see if > this is acceptable.[1] > > One way to speed it up would be to wait until after most userland > processes have been killed, since most of the data won't need to > be swapped back in in that case. In fact, this is an improvement > for another reason, namely, there might not be enough physical > memory for swapoff() to work otherwise. > > > [1] On the other hand, one advantage of having it invoked on shutdown > is that it will be tested routinely. ;-) Excuse my ignorance, but what is the point of calling swapoff on shutdown anyway? Is it just for testing?