Ask a Question related to FreeBSD, Design and Development.
-
Ramiro Aceves #1
I killed my system with grep
Hello FreeBSD friends:
I am running a FreeBSD 5.3 system with 64MB RAM and 150 MB swap.
Yesterday I entered the command:
# grep -R something /
and after a while, my system did not respond. I do not remember the exact
messages as I am on a winbugs at the University. The error was about
swapping. I could switch among terminals but the system was dead. I needed
to reboot.
I rebooted and tried again watching "top" output and I could see as swap
usage was incresing very quickly until it ran out of swap space and the swap
pager failed.
Was my sytem dead? or, is it possible to recover from that state without
rebooting? How is it possible that a simple command like this could
auto-kill the machine?
What is the recomended fix for this?:
a- Asigning more swap.
b- Not executing that command anymore.
Thank you very much for your advices and help.
Ramiro
Ramiro Aceves Guest
-
#33282 [Asn->Csd]: Reference is killed by unset but not by other =&
ID: 33282 Updated by: iliaa@php.net Reported By: devik at cdi dot cz -Status: Assigned +Status: ... -
spwaned prccess getting killed.
hi all, I am facing an rare behaviour. I have spwaned a process. This process is outputing some warning message . My expect will fail once i get... -
What happens when a client calling a web service is killed?
I'm sure this is a simple question but I haven't really being able to find an answer. What happens if a client calls a webservice and the client... -
killed process
I have a SCO 5.0.4 enteprise Since a week , i have to restart two processes a couple of times in the day. I don't know how these processes are... -
Apache is killed everyday at 6:28
Hi there! Problem: Apache is killed everyday at around 06:28 System: Debian Woody, kernel 2.4.18, apache 1.3.26 file... -
Lowell Gilbert #2
Re: I killed my system with grep
"Ramiro Aceves" <ea1abz@wanadoo.es> writes:
c- Setting user limits in login.conf(5).> Hello FreeBSD friends:
>
> I am running a FreeBSD 5.3 system with 64MB RAM and 150 MB swap.
>
> Yesterday I entered the command:
>
> # grep -R something /
>
> and after a while, my system did not respond. I do not remember the exact
> messages as I am on a winbugs at the University. The error was about
> swapping. I could switch among terminals but the system was dead. I needed
> to reboot.
>
> I rebooted and tried again watching "top" output and I could see as swap
> usage was incresing very quickly until it ran out of swap space and the swap
> pager failed.
>
> Was my sytem dead? or, is it possible to recover from that state without
> rebooting? How is it possible that a simple command like this could
> auto-kill the machine?
>
> What is the recomended fix for this?:
>
> a- Asigning more swap.
> b- Not executing that command anymore.
Lowell Gilbert Guest
-
Loren M. Lang #3
Re: I killed my system with grep
On Fri, Feb 25, 2005 at 12:14:04PM +0100, Ramiro Aceves wrote:
Running a grep on an entire system as root is a bad idea. At least> Hello FreeBSD friends:
>
> I am running a FreeBSD 5.3 system with 64MB RAM and 150 MB swap.
>
> Yesterday I entered the command:
>
> # grep -R something /
limit to certain filesystems. You probably hit a file under /dev/ and
caused grep to hang. It's possible that as root, certain device files
might hang the system, but nothing comes to mind at the moment unless
/dev/io could do it. Also, think about what happens when grep hit's
/dev/zero. It will never finish.
-->
> and after a while, my system did not respond. I do not remember the exact
> messages as I am on a winbugs at the University. The error was about
> swapping. I could switch among terminals but the system was dead. I needed
> to reboot.
>
> I rebooted and tried again watching "top" output and I could see as swap
> usage was incresing very quickly until it ran out of swap space and the swap
> pager failed.
>
> Was my sytem dead? or, is it possible to recover from that state without
> rebooting? How is it possible that a simple command like this could
> auto-kill the machine?
>
> What is the recomended fix for this?:
>
> a- Asigning more swap.
> b- Not executing that command anymore.
>
>
> Thank you very much for your advices and help.
>
> Ramiro
>
>
> _______________________________________________
> [email]freebsd-questions@freebsd.org[/email] mailing list
> [url]http://lists.freebsd.org/mailman/listinfo/freebsd-questions[/url]
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
I sense much NT in you.
NT leads to Bluescreen.
Bluescreen leads to downtime.
Downtime leads to suffering.
NT is the path to the darkside.
Powerful Unix is.
Public Key: [url]ftp://ftp.tallye.com/pub/lorenl_pubkey.asc[/url]
Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C
Loren M. Lang Guest
-
Parv #4
Re: I killed my system with grep
in message <20050225135707.GC18789@alzatex.com>,
wrote Loren M. Lang thusly...Would using -I option (not search text-like files) help to avoid>
> On Fri, Feb 25, 2005 at 12:14:04PM +0100, Ramiro Aceves wrote:>> >
> > I am running a FreeBSD 5.3 system with 64MB RAM and 150 MB swap.
> >
> > Yesterday I entered the command:
> >
> > # grep -R something /
> You probably hit a file under /dev/ and caused grep to hang. It's
> possible that as root, certain device files might hang the system,
> but nothing comes to mind at the moment unless /dev/io could do
> it. Also, think about what happens when grep hit's /dev/zero. It
> will never finish.
above described hang ups in /dev?
- Parv
--
Parv Guest
-
John #5
Re: I killed my system with grep
On Fri, 25 Feb 2005 12:14:04 +0100, Ramiro Aceves wrote
I had a very similar problem. I fixed it by reading up on auxillary swapfile.> Hello FreeBSD friends:
>
> I am running a FreeBSD 5.3 system with 64MB RAM and 150 MB swap.
>
> Yesterday I entered the command:
>
> # grep -R something /
>
> and after a while, my system did not respond. I do not remember the exact
> messages as I am on a winbugs at the University. The error was about
> swapping. I could switch among terminals but the system was dead. I needed
> to reboot.
>
> I rebooted and tried again watching "top" output and I could see as swap
> usage was incresing very quickly until it ran out of swap space and
> the swap pager failed.
>
> Was my sytem dead? or, is it possible to recover from that state without
> rebooting? How is it possible that a simple command like this could
> auto-kill the machine?
>
> What is the recomended fix for this?:
>
> a- Asigning more swap.
> b- Not executing that command anymore.
I set one of those up as indicated, at about 2.5x RAM (750MB, roughly) and the
problem went away after I edited /etc/fstab and commented out the old swap
entry, then rebooted.
The problem was caused by the hard drive having failing blocks where the swap
partition resides. I got a few errors in /var/log/messages where the swap
daemon couldnt zero pages or inodes or whatever. If the swapper cant liberate
old pages then swap will fill up. My machine uses a lot of perl, and
openwebmail makes it swap under load.
It seems that the bad blocks are only on the old swap so hopefully the hard
drive still has some life in it yet.
--
[email]lists@reiteration.net[/email]
John Guest
-
Ramiro Aceves #6
Re: I killed my system with grep
Ramiro Aceves wrote:
Thanks all for your responses.> Hello FreeBSD friends:
>
> I am running a FreeBSD 5.3 system with 64MB RAM and 150 MB swap.
>
> Yesterday I entered the command:
>
> # grep -R something /
>
> and after a while, my system did not respond. I do not remember the exact
> messages as I am on a winbugs at the University. The error was about
> swapping. I could switch among terminals but the system was dead. I needed
> to reboot.
>
> I rebooted and tried again watching "top" output and I could see as swap
> usage was incresing very quickly until it ran out of swap space and the swap
> pager failed.
>
> Was my sytem dead? or, is it possible to recover from that state without
> rebooting? How is it possible that a simple command like this could
> auto-kill the machine?
>
> What is the recomended fix for this?:
>
> a- Asigning more swap.
> b- Not executing that command anymore.
>
>
> Thank you very much for your advices and help.
>
> Ramiro
I understand that I should avoid "greping" into /dev. I will do more
accurate searchs into the directories.
Ramiro.
Ramiro Aceves Guest
-
Loren M. Lang #7
Re: I killed my system with grep
On Fri, Feb 25, 2005 at 11:42:48PM -0500, Parv wrote:
No, it still searches all files, it just doesn't print the usual line> in message <20050225135707.GC18789@alzatex.com>,
> wrote Loren M. Lang thusly...>> >
> > On Fri, Feb 25, 2005 at 12:14:04PM +0100, Ramiro Aceves wrote:> >> > >
> > > I am running a FreeBSD 5.3 system with 64MB RAM and 150 MB swap.
> > >
> > > Yesterday I entered the command:
> > >
> > > # grep -R something /
> > You probably hit a file under /dev/ and caused grep to hang. It's
> > possible that as root, certain device files might hang the system,
> > but nothing comes to mind at the moment unless /dev/io could do
> > it. Also, think about what happens when grep hit's /dev/zero. It
> > will never finish.
> Would using -I option (not search text-like files) help to avoid
> above described hang ups in /dev?
that it matched, only whether there was success or not. You really just
need to make sure grep never goes into /dev. Since your running 5.x,
/dev is it's own filesystem of a unique type, so the following command
will run grep on only filesystems of type ufs, which won't include
network filesystems, or /dev:
find / -fstype ufs -exec grep -H something {} \;
-->
>
> - Parv
>
> --
I sense much NT in you.
NT leads to Bluescreen.
Bluescreen leads to downtime.
Downtime leads to suffering.
NT is the path to the darkside.
Powerful Unix is.
Public Key: [url]ftp://ftp.tallye.com/pub/lorenl_pubkey.asc[/url]
Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C
Loren M. Lang Guest



Reply With Quote

