LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
 
Search this Thread
Old 02-14-2006, 08:50 PM   #1
leftPeg
LQ Newbie
 
Registered: Jan 2006
Posts: 19

Rep: Reputation: 0
ipcs command doesn't list anything


Hello.

I have just posted something similar on the httpd-users mailing list but I'm not sure if it's an apache problem or redhat problem.

My apache error_log is telling me

Cannot allocate memory: Unable to create scoreboard (anonymous shared
memory failure)

when trying to restart apache/2.0.52 after I had to hard reboot my redhat9 box. I had to do a manual fsck and just took the default option for whatever came up.

I came across this website

hacksaw.ca/2004/12/failure-restarting-apache-http-server.html

which suggests I use the

ipcs -m -p

command but no processes or segments are being listed for me to remove.

Is there some other command I can use to try and get rid of this shared memory failure?

Thanks,

D.
 
Old 02-16-2006, 03:25 AM   #2
leftPeg
LQ Newbie
 
Registered: Jan 2006
Posts: 19

Original Poster
Rep: Reputation: 0
I just want to clarify that the output for ipcs -m -p

------ Shared Memory Creator/Last-op --------
shmid owner cpid lpid


and if I try ipcs -m I get


------ Shared Memory Segments --------
key shmid owner perms bytes nattch status


If there is no command I can use is there somewhere in the file system I can go and delete whatever it is preventing me from starting apache?
 
Old 02-16-2006, 04:43 AM   #3
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
If you just did a hard reboot, why can't you do another one?
As the website suggests, the trick with the ipcs command is only to be used if you don't want to
reboot your machine.
If you hard reboot it, the shared memory should be de-allocated anyway, unless it was dumped to a file on disk.
 
Old 02-16-2006, 11:45 PM   #4
leftPeg
LQ Newbie
 
Registered: Jan 2006
Posts: 19

Original Poster
Rep: Reputation: 0
I did a hard reboot which caused no end of problems. I had to repeatedly run fsck before eventually being able to log in.
Unfortunately, I still have the same problem i.e.

(22)Invalid argument: unable to create scoreboard "/var/run/apache.scoreboard" (name-based shared memory failure)

if a specify a scoreboard in httpd.conf

or

(12)Cannot allocate memory: Unable to create scoreboard (anonymous shared memory failure)

if I comment out the scoreboard directive in the httpd.conf
 
Old 02-20-2006, 03:13 AM   #5
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
Hmmm. After a hard reboot, all shared memory should have been cleaned up anyway.

By the way, you shouldn't use a file on disk to store the scoreboard data. Shared memory is faster.

If ipcs (run as root) doesn't mention the shared memory, then your process doesn't have access to it, or, more likely, it simply doesn't exist. A hard reboot should have cleaned it up, so it can be normal that ipcs doesn't list it anymore.
However, even on systems that don't have Apache running (like my simple RH8 box), ipcs -m still lists a bunch of stuff from other programs. The fact that your ipcs doesn't indicate anything at all, may point to a different problem, not specific for Apache, but for all processes who use shared memory.

A few questions:
-Can you try an ls -l of /var/run and /var/run/apache?
-Did you recently change anything to your system configuration, such as updates of the C libraries, etc?
-Are you absolutely sure that you ran the ipcs command under the root user?
-Can you please look at the other system logs in /var/log. Maybe there's an indication of a larger problem.
-What did fsck report back to you? And what did it fix, in order for your login to succeed?

Finally, I've read on a site that you could take a look at some pseudo-files in /proc, such as /proc/self/maps, but they're probably hard to understand.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a single command to list all hardware installed (command line)? davee Linux - Hardware 6 02-28-2009 07:19 PM
How to just list directories using ls command shazam75 Linux - Newbie 10 01-26-2006 02:34 PM
Command to run another command against a list of files psweetma Linux - General 3 11-09-2005 05:29 PM
ipcs -lm shows : max total shared memory (kbytes) = 0 vicv Linux - Software 1 09-01-2005 10:58 AM
Using IPCS and Performance of Shared Memory vs. Socket ceoping Programming 1 05-22-2005 01:58 AM


All times are GMT -5. The time now is 06:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration