Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Jan 1997 17:26:09 +1000 (EST)
From:      Stephen McKay <syssgm@devetir.qld.gov.au>
To:        freebsd-current@freebsd.org
Cc:        syssgm@devetir.qld.gov.au
Subject:   Re: VM bogon? Was: Re: NIS breakage
Message-ID:  <199701210726.RAA09694@ogre.devetir.qld.gov.au>

next in thread | raw e-mail | index | archive | help
Mark Murray <mark@grondar.za> wrote:

>Peter Wemm wrote:
>> This is looking like a manifestation of a VM system problem.. :-(  We've
>> had a few PR's now where people report that 'vi crashes after being left
>> idle for 5 minutes', and so on.  It all seems to be with select() or read()
>> etc specifying *valid* addresses that work on one time arount a loop with
>> ktrace, and a short while later get an EFAULT on a perfectly valid address.
>
>This is happening on an AMD386sx/40. :-(

The problem with vi printing something like 'select: Bad address' has been
around for ages.  My 386sx16 high-page-rate test box printed this for almost
every keystroke.  This was the case around November last year (and for months
previous to this).  Sadly, I cannot verify -current behaviour, as the box
has not been reconstructed after the last panic -> fs corruption disaster.
Too much "real" work. :-(

I did not track it down, but assume it has to do with almost all of the
process being absent from main memory when the select condition is triggered,
and thus, the page(s) containing the fd_sets being absent.  It may also be
related to the lack of kernel write protection on the 386 not causing page-in
of the affected page.

Hmm.  I've just been looking at copyout().  If the target pages are not
present, then their page table page might not be present either.  In this
case, won't the attempt to check the target pages' writability cause a
fault?  This fault would then be translated to EFAULT (Bad address) by
copyout_fault.  It looks like there should be an extra check for the
existence of page table page(s) or the fault redirection stuff should
be done after the 386 check.

Stephen.



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