The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
WolframAlpha a Google Killer? Not! iBot Complex Event Processing RSS News 0 05-19-2009 09:45 AM
Using ZFS to Fight Data Rot, the Silent Killer iBot Solaris BigAdmin RSS 0 01-29-2009 09:30 AM
Linux Foundation launches killer development tool iBot UNIX and Linux RSS News 0 08-07-2008 01:40 PM
help rsh killer gonzo Shell Programming and Scripting 3 04-23-2008 04:06 AM
Webinar: BAM: The Killer App for CEP iBot Complex Event Processing RSS News 0 01-31-2008 09:50 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-24-2009
subratasaharia subratasaharia is offline
Registered User
  
 

Join Date: Aug 2009
Posts: 5
OOM KIller INVOKE

Hi
I have written a code that will exhaust the memory completely by allocating it and not freeing it. The OOM killer as expected in invoked and it killed a few high memory using processes and their childs.
But after that, though the system is not getting hung, it is not printing any msgs in console neither it is responding to ping or telnet.
What is the expected behaviour after an OOM kill. ? Please comment on why the node went into an virtual hung state after OOM kill.

---------- Post updated at 05:46 AM ---------- Previous update was at 05:42 AM ----------

This is the console prints:
=================================================================
available memory stated is 487MB
And malloc'd memory is 0MB
Enter percentage memory to be alloc'd (0 to quit) : 100
available memory stated is 487MB
And malloc'd memory is 487MB
malloc invoked oom-killer: gfp_mask=0x1200d2, order=0, oomkilladj=0
Call Trace:
[9e913d20] [80006844] show_stack+0x3c/0x1bc (unreliable)
[9e913d60] [80056a14] oom_kill_process+0x114/0x1bc
[9e913d90] [80056e60] out_of_memory+0x1ac/0x1e8
[9e913dd0] [800598f0] __alloc_pages_internal+0x40c/0x440
[9e913e50] [8006424c] handle_mm_fault+0x26c/0x470
[9e913e80] [801ccb58] do_page_fault+0x314/0x510
[9e913f40] [8000d834] handle_page_fault+0xc/0x80
Mem-info:
DMA per-cpu:
CPU 0: hi: 186, btch: 31 usd: 175
Active:123608 inactive:31 dirty:0 writeback:0 unstable:0
free:689 slab:1244 mapped:1259 pagetables:311 bounce:0
DMA free:2756kB min:2860kB low:3572kB high:4288kB active:494432kB inactive:124kB present:512064kB pages_scanned:772531 all_unreclaimable? yes
lowmem_reserve[]: 0 0 0
DMA: 1*4kB 0*8kB 0*16kB 0*32kB 1*64kB 1*128kB 0*256kB 1*512kB 0*1024kB 1*2048kB 0*4096kB = 2756kB
1292 total pagecache pages
129024 pages of RAM
1730 reserved pages
7284 pages shared
0 pages swap cached
Out of memory: kill process 2021 (tn_init.d) score 162152 or a child
Killed process 2023 (nm.d)
malloc invoked oom-killer: gfp_mask=0x1200d2, order=0, oomkilladj=0
Call Trace:
[9e913d20] [80006844] show_stack+0x3c/0x1bc (unreliable)
[9e913d60] [80056a14] oom_kill_process+0x114/0x1bc
[9e913d90] [80056e60] out_of_memory+0x1ac/0x1e8
[9e913dd0] [800598f0] __alloc_pages_internal+0x40c/0x440
[9e913e50] [8006424c] handle_mm_fault+0x26c/0x470
[9e913e80] [801ccb58] do_page_fault+0x314/0x510
[9e913f40] [8000d834] handle_page_fault+0xc/0x80
Mem-info:
DMA per-cpu:
CPU 0: hi: 186, btch: 31 usd: 176
Active:123603 inactive:36 dirty:0 writeback:0 unstable:0
free:783 slab:1240 mapped:1259 pagetables:311 bounce:0
DMA free:3132kB min:2860kB low:3572kB high:4288kB active:494412kB inactive:144kB present:512064kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 0
DMA: 1*4kB 3*8kB 4*16kB 5*32kB 3*64kB 1*128kB 0*256kB 1*512kB 0*1024kB 1*2048kB 0*4096kB = 3132kB
1292 total pagecache pages
129024 pages of RAM
1730 reserved pages
7284 pages shared
0 pages swap cached
Out of memory: kill process 2039 (nm.d) score 13684 or a child
Killed process 2039 (nm.d)














^C^C^C^C^C^C^C^Cc


================================================================
As seen its not responding to ^C . But on pressing enter , response is there.
  #2 (permalink)  
Old 08-24-2009
zaxxon's Avatar
zaxxon zaxxon is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2007
Location: Germany
Posts: 2,289
To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags [code] and [/code] by hand.)

Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.

Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.

Thank You.

The UNIX and Linux Forums
  #3 (permalink)  
Old 08-25-2009
RuBiCK RuBiCK is offline
Registered User
  
 

Join Date: Aug 2009
Location: Spain
Posts: 34
There is no expected behavour once time Oom Killer starts, it's a lottery. He could kill ANY process in order to free memory while is trying to keep the server up...

You could find more informacion in next link OOM Killer - linux-mm.org Wiki


I recommed you to setup netdump or diskdump and you could make a memory dump to analize after hung. Maybe you will discover a memory leak
  #4 (permalink)  
Old 08-27-2009
achenle achenle is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 76
Better yet, if you want to keep your server up don't oversubscribe resources in the first place.

Code:
         echo 2 > /proc/sys/vm/overcommit_memory
Reply

Bookmarks

Tags
oom killer

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:36 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0