Well, 10 processes doing a find are not supposed to lockup a machine.

    However, there is another potential problem with the script below ... if
    the script is run as root, the find will cross mount points including
    the /proc mount point.  Now running xargs and random process's memory
    spaces *could* certainly lockup a machine.  /proc does has reentrancy
    issue with multiple processes accessing it at the same time.

    Try changing the 'find' to 'find -x'.  If this still locks up the machine
    we will have to then determine whether it occurs under 4.x as well, or
    if it only occurs under 3.x.

                                        -Matt
                                        Matthew Dillon 
                                        <dil...@backplane.com>

:On Thu, Mar 4, 1999, Mike Tancsa put this into my mailbox:
:> 
:> Is there any way to stop what is below ?  
:
:   Yep.  Don't do it!
:
:   Seriously, though, that puts a major load on the system.
:
:   You have 10 process all telling the drivers to keep seeking
:about through the disks.
:
:   Add /etc/login.conf restrictions if you don't want your users
:to do that.
:
:> 
:> 
:> 
:> As posted by y...@dgtu.donetsk.ua
:> >
:> >This script freeze my 3.1-RELEASE box.
:> >I can't make any connection with my box, also from console.
:> >
:> >-------- cut here ---
:> >#! /bin/sh
:> >
:> >for j in 1 2 3 4 5 6 7 8 9 10
:> >do
:> >echo -n $j
:> >nohup sh -c 'while :; do find / -type file |xargs fgrep fticom; done'
:> >/dev/null 2>&1 &
:> >echo
:> >done
:> >--------- cut here ----
:> >
:> >-- 
:> >Yury V. Yaroshevsky     | Donetsk State Technical University
:> >YY18-RIPE                   | (380 622) 356455  y...@dgtu.donetsk.ua
:> >
:> **********************************************************************
:> Mike Tancsa, Network Admin        *  m...@sentex.net
:> Sentex Communications Corp,       *  http://www.sentex.net/mike
:> Cambridge, Ontario                *  01.519.651.3400
:> Canada                            *
:> 
:> 
:> To Unsubscribe: send mail to majord...@freebsd.org
:> with "unsubscribe freebsd-current" in the body of the message
:> 
:
:-- 
:Powered by FreeBSD 4.0-CURRENT.                       "The Power to Serve!"



To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message

Reply via email to