tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: netbsd-5-rc1 crash in pmap_enter
On Sat, Feb 07, 2009 at 01:23:33AM +0200, Antti Kantee wrote:
> On Sat Feb 07 2009 at 00:04:13 +0100,
> 6bone%6bone.informatik.uni-leipzig.de@localhost wrote:
> > Hello list,
> >
> > I am using an actual version of NetBSD 5.0_RC1 (amd). The kernel sometimes
> > crashes with:
> >
> > panic: pmap_enter: pve allocation failed
> > fatal breakpoint trap in supervisor mode
> > trap type 1 code 0 rip ffffffff8051ecb5 cs 8 rflags 246 cr2 7f7ffd216104
> > cpl 00
> > Stopped in pid 396.1 (postgres) at netbsd:breakpoint+0x5: leave
> > db{0}> trace
> > breakpoint() at netbsd:breakpoint+0x5
> > panic() at netbsd:panic+0x24d
> > pmap_enter() at netbsd:pmap_enter+0xc52
> > genfs_directio() at netbsd:genfs_directio+0x237
> >
> > [snip]
> >
> > Can anyone have a look at the code?
>
> Looks like a simple temporary memory outage. Is the machine under
> heavy load?
>
> Try this patch if you're brave (completely untested). Comments from
> anyone else? I'm not sure if this is enough or if a more dramatic
> backoff is required.
>
> Index: genfs_io.c
> ===================================================================
> RCS file: /cvsroot/src/sys/miscfs/genfs/genfs_io.c,v
> retrieving revision 1.13.4.1
> diff -p -u -r1.13.4.1 genfs_io.c
> --- genfs_io.c 2 Nov 2008 23:08:56 -0000 1.13.4.1
> +++ genfs_io.c 6 Feb 2009 23:20:36 -0000
> @@ -1731,7 +1731,13 @@ genfs_do_directio(struct vmspace *vs, va
> for (poff = 0; poff < klen; poff += PAGE_SIZE) {
> rv = pmap_extract(upm, puva + poff, &pa);
> KASSERT(rv);
> - pmap_enter(kpm, kva + poff, pa, prot, prot | PMAP_WIRED);
> + retry:
> + if ((error = pmap_enter(kpm, kva + poff, pa, prot,
> + prot | PMAP_WIRED | PMAP_CANFAIL)) != 0) {
> + pmap_update(kpm);
> + uvm_wait("genfs_directio");
> + goto retry;
> + }
> }
> pmap_update(kpm);
Hmm. If it's also a swap file or something equally wacky? That would
probably break already.
Andrew
Home |
Main Index |
Thread Index |
Old Index