Ultrix 3.1C /bin/csh looping to memory limit

Ian! D. Allen [CGL] idallen at watcgl.waterloo.edu
Mon Sep 24 07:18:12 AEST 1990


Could someone with a DECsystem running Ultrix 4.0 try this for me?
This is what happens on my DECsystem 5400 running Ultrix 3.1C.

    % /bin/csh -f      # don't do this to your login shell
    % cat >/tmp/foo
    echo before
    echo $nosuchvar
    ^D
    % limit data 2m    # for safety!
    % source /tmp/foo
    before
    nosuchvar: Undefined variable
    data size rlimit exceeded, pid 259, proc csh
    Out of memory.

"^D" is your EOF character.

This bug is much more exciting when you have your datasize limit up
around 90Mb.  The dying shell throws everyone else out of memory before
it eeks out a horrible death.  Grinds the system to a halt for a minute
or two.  This does it too:

    % cat >/tmp/foo
    echo before
    echo "$<"
    ^D
    % limit data 2m    # for safety!
    % source /tmp/foo
    before
    ^C
    data size rlimit exceeded, pid 226, proc csh
    Out of memory.

"^C" is your interrupt character.  You'll have to push <CR> after your
interrupt character, since C Shells incorrectly hold interrupts when
reading from $<.

In fact, anything that causes CSH to start error recovery in a sourced
file will trigger a loop that will eat all the memory on your machine.

If you prefer pure CPU loops, just do this:

    % limit cpu 5
    % source /dev/tty
    % echo nosuchfile*
    echo: No match.

That shell will loop until it dies exceeding the CPU limit.

Is this fixed in DEC MIPS Ultrix 4.0?
-- 
-IAN! (Ian! D. Allen) idallen at watcgl.uwaterloo.ca idallen at watcgl.waterloo.edu
 [129.97.128.64]  Computer Graphics Lab/University of Waterloo/Ontario/Canada



More information about the Comp.unix.ultrix mailing list