View previous topic :: View next topic |
Author |
Message |
red_over_blue Guru
Joined: 16 Dec 2002 Posts: 310
|
Posted: Sun Mar 23, 2003 4:33 pm Post subject: More memory issues - grep |
|
|
When I encountered this issue, I did some searching to try to see if anyone else was experiencing the same thing. I didn't find any, but I did notice a fair number of threads about memory issues. I don't even know if this is related, but here goes...
After doing a "grep -R ALSA_CARDS *" from / (the base directory) I got the following errors:
Code: |
grep: dev/.devfsd: Operation not permitted
Binary file dev/mem matches
grep: dev/kmem: Bad address
grep: memory exhausted
|
When in X, this will cause my screen to go black unless I am typing or moving my mouse, and then goes black immediately again. I did a "free" to get the following:
Code: |
total used free shared buffers cached
Mem: 515768 20380 495388 0 2808 8684
-/+ buffers/cache: 8888 506880
Swap: 498004 0 498004
|
As you can see, my memory is no-where near exhausted. I had to reboot to get the system to a usable state again.
This happens with both vanilla and gentoo sources (gentoo compiled with preemtible kernel and low-latency).
It also happens without X from the commandline, but the system does not act any different.
I have a feeling this might simply be being caused by grep trying to access some memory device or something like that, and cause errors. However, this still shouldn't happen.
My system is completely back to normal after a reboot. Nothing seems to be adversely affected.
Has anyone else experienced this, or dare give it a try themselves to see |
|
Back to top |
|
|
rojaro l33t
Joined: 06 May 2002 Posts: 732
|
Posted: Sun Mar 23, 2003 4:52 pm Post subject: Re: More memory issues - grep |
|
|
red_over_blue wrote: | After doing a "grep -R ALSA_CARDS *" from / (the base directory) I got the following errors:
Code: |
grep: dev/.devfsd: Operation not permitted
Binary file dev/mem matches
grep: dev/kmem: Bad address
grep: memory exhausted
|
|
right, but you NEVER should run such a command. think about it, there is the device filesystem which provides kmem - which is your current memory used by the kernel. so you're basically running a program (which is run by the kernel) that tries to read out the current memory (in order to find something in it in your example) in which the programm it self is running. you see the problem? :)
ok, two advices and one question:
first: DO NOT DO ANYTHING AS ROOT UNLESS YOU REALLY HAVE TO.
second: always remember that linux will do what you tell it to do. you can run "rm -rf /*" and linux will happily run it without asking you if you are sure that you are going to kill pretty much the entire system with this command. THINK before pressing enter.
the question: what did you try to find with this command? what is the problem that driven you to run this command? _________________ A mathematician is a machine for turning coffee into theorems. ~ Alfred Renyi (*1921 - †1970) |
|
Back to top |
|
|
red_over_blue Guru
Joined: 16 Dec 2002 Posts: 310
|
Posted: Sun Mar 23, 2003 5:07 pm Post subject: |
|
|
I don't think that this is such an unreasonable command. I wanted to use grep to find every file on my entire drive that contained the word ALSA_CARDS.
I skimmed over the man page for grep, but couldn't find any flags to tell grep to only consider text files.
Thanks for your reply. |
|
Back to top |
|
|
rojaro l33t
Joined: 06 May 2002 Posts: 732
|
Posted: Sun Mar 23, 2003 5:31 pm Post subject: |
|
|
red_over_blue wrote: | I don't think that this is such an unreasonable command. I wanted to use grep to find every file on my entire drive that contained the word ALSA_CARDS.
I skimmed over the man page for grep, but couldn't find any flags to tell grep to only consider text files. |
grep wasnt made for such - it just searches through anything you tell it to search through. if you tell it to search through a device (what you actually did) it will do - not asking if you're sure about what you're trying to do there.
to give you a hint on the correct use of this command try the following command:
find / -type f -exec grep ALSA_CARDS {} ';'
but still, i don't think that this is the right command for your - still unspecified - problem. why do you want to search ALL (even 100% unrelated files) for ALSA_CARDS? what is the problem? if you want to know if your soundcard is supported by the alsa drivers, then you should check the alsa documentation at http://www.alsa-project.org/. _________________ A mathematician is a machine for turning coffee into theorems. ~ Alfred Renyi (*1921 - †1970) |
|
Back to top |
|
|
|