LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 05-21-2009, 05:58 PM   #1
paziulek
Member
 
Registered: Mar 2009
Location: N.C.
Distribution: "gentoo|debian|arch"
Posts: 77

Rep: Reputation: 11
shared memory segment - unable to remove


Hello,

an application using shared memory segments froze...
usually I was able remove the segments using ipcrm -m {shmid} command,
This time it did ZERO the "key" but the segments were stubborn and did not want to get removed from the table :

------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00000000 2883584 root 666 176 874 dest
0x00000000 2916353 root 666 342616 874 dest

I had to restart the system to clear the shared memory and be able to start the application ( database )

I am using 2.4.21.51EL SMP RedHat factory kernel ( unmodified )

Does anybody would know, how to release/remove the segments using an other technique than ipcrm ? or even what could cause the memory to get locked so bad that the kernel was unable to release it?
I might be asking for too much, but any of your ideas might be helpful to me to continue troubleshooting this issue.

Thanks Everybody!

paziu
 
Old 05-22-2009, 12:29 AM   #2
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 666

Rep: Reputation: 133Reputation: 133
Quote:
Originally Posted by paziulek View Post
Hello,

an application using shared memory segments froze...
usually I was able remove the segments using ipcrm -m {shmid} command,
This time it did ZERO the "key" but the segments were stubborn and did not want to get removed from the table :

------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00000000 2883584 root 666 176 874 dest
0x00000000 2916353 root 666 342616 874 dest

I had to restart the system to clear the shared memory and be able to start the application ( database )

I am using 2.4.21.51EL SMP RedHat factory kernel ( unmodified )

Does anybody would know, how to release/remove the segments using an other technique than ipcrm ? or even what could cause the memory to get locked so bad that the kernel was unable to release it?
I might be asking for too much, but any of your ideas might be helpful to me to continue troubleshooting this issue.

Thanks Everybody!

paziu
While there is at least one process that has this shared memory segment attached there is no way to remove it.
OK it will be marked as 'deleted', and will be removed as sson as last process detach from it, but not before.

So killing hanging process (with kill -9 if needed) and ipcrm will work.
And if even kill -9 doesn't help - then your only option is reboot.
 
Old 05-22-2009, 09:13 AM   #3
paziulek
Member
 
Registered: Mar 2009
Location: N.C.
Distribution: "gentoo|debian|arch"
Posts: 77

Original Poster
Rep: Reputation: 11
Thank you very much Valery,

Yes, there was several user processes active at the time,
Which were depending on the daemon I tried to restart,

I will clean up the processes first next time, this is what I usually do to restart the service without bringing down the system, I just did not think any of the child processes can lock the shmem so it is impossible to remove...

Thank you again,

Mike


Quote:
Originally Posted by Valery Reznic View Post
While there is at least one process that has this shared memory segment attached there is no way to remove it.
OK it will be marked as 'deleted', and will be removed as sson as last process detach from it, but not before.

So killing hanging process (with kill -9 if needed) and ipcrm will work.
And if even kill -9 doesn't help - then your only option is reboot.
 
  


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
Linux shared memory segment access problem and x86 Virtual Memory layout. regmee Linux - Kernel 1 08-23-2008 12:11 AM
how can I repeatedly attach a shared memory segment at the same address? Spirals Linux - Software 3 06-07-2008 06:26 AM
ORA-24123: unable to attach to shared memory segment yrkhond Linux - Newbie 1 03-17-2008 07:17 PM
Creating Ora10g database on FC2 gives unable to create shared memory segment.... deanbrown3d Linux - Software 1 10-23-2004 11:40 AM
Identify a shared memory segment gremlin2000 Linux - General 3 04-03-2004 11:19 AM


All times are GMT -5. The time now is 03:44 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration