Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Sep 2004 12:44:17 -0400
From:      Chris Laverdure <dashevil@sympatico.ca>
To:        David Schultz <das@FreeBSD.ORG>
Cc:        freebsd-current@freebsd.org
Subject:   Re: panic: swap_pager_isswapped: failed to locate all swap meta blocks
Message-ID:  <1096044256.677.0.camel@elemental.DashEvil>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1096044256.677.0.camel>