Subject: Re: i386 1.4Q hangs nonrandomly?
To: None <>
From: Michael C. Richardson <>
List: current-users
Date: 01/28/2000 11:32:18
>>>>> "Simon" == Simon Burge <> writes:
    Simon> Matthew Orgass wrote:

    >> Hmm, heavy memory load... sounds familiar: I've noticed that running
    >> "grep foo /dev/zero &; grep foo /dev/zero &;" will lock up my system
    >> within a minute 100% of the time when X is running.  ...  It looks
    >> like it gets stuck in a loop and spends most or all of its time in
    >> uvmpd_scan.  I just sent in a pr (kern/9308).  Sounds like this might
    >> possibly be what is happening to you.

    Simon> Initially I'd guess it was a different problem.  Note that grep(1)
    Simon> will allocate memory for the contents of a file until it hits a
    Simon> \n, and obviously this doesn't occur for /dev/zero.  With two
    Simon> greps on /dev/zero, you'll very quickly get two processes trying
    Simon> to allocate a large amount of memory (128MB each on my -current
    Simon> i386).  How much RAM and swap does your box have?

    Simon> The maintainer of GNU grep says that you should have enough
    Simon> virtual memory to allocate the longest line possible, and doesn't
    Simon> want to change that behaviour...

  Huh? That's silly.
  I might be grepping from a network pipe, or as you tried a file of 
infinite size.

   :!mcr!:            |  Cow#1: Are you worried about getting Mad Cow Disease?
   Michael Richardson |  Cow#2: No. I'm a duck.
 Home: PGP key available.