OOM KIller INVOKE


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users OOM KIller INVOKE
# 1  
Old 08-24-2009
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  
Old 08-24-2009
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  
Old 08-25-2009
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 Smilie
# 4  
Old 08-27-2009
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

Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Invoke Procedure Help

Hello unix.com users, I reached a dead end with a procedure. My files: x.pl #!/usr/bin/perl use Net::FTP; my $host = $ARGV; my $user = $ARGV; my $pass = $ARGV || ""; my $port = "21"; $ftp=Net::FTP->new("$host", Port=>"$port", Timeout => 5) or die("couldn't connect to host:" .... (2 Replies)
Discussion started by: galford
2 Replies

2. UNIX for Advanced & Expert Users

How to invoke an URL

Hi, I am trying to invoke an service using URL. I want to know how to call that url with nohup. nohup links "__http://Administrator:assword@ServName:8080/invoke/wm.server.admin/shutdown?bounce=no&option=force&timeout=0" & I am trying to run this command on unix command prompt, But in... (8 Replies)
Discussion started by: swap27
8 Replies

3. Shell Programming and Scripting

invoke fork command

Hi, I have startup shell script called "xxxxx" for Jboss server which is taking more than expected timeline to complete the process, here I want to use the fork command to start the child process for non dependent component I have a scheduler called "yyyy" which is currently getting invoked... (2 Replies)
Discussion started by: harish76
2 Replies

4. UNIX for Dummies Questions & Answers

How to invoke ESC+K

How to invoke ESC+K to get recent commands in Korn Shell. In some of the unix machine ESC+K is available and in some machines, it does not work. All of the machines that I work have Korn shell. (5 Replies)
Discussion started by: bobbygsk
5 Replies

5. Shell Programming and Scripting

help rsh killer

hi everyone , i have a rsh problem , some of the users letf a lot of rsh sesions opened , i need a script that chek with a "ps -fea | grep rsh" and kill every sesion that not start today . for example root 26770 26767 0 Apr 17 ? 0:00 rsh c-108 find / -type d -mtime +1 -name... (3 Replies)
Discussion started by: gonzo
3 Replies

6. Shell Programming and Scripting

invoke same script twice

hey, can I invoke the same script twice simultaneously? I want both instances to run at the same time with different parameters. Thanks! (2 Replies)
Discussion started by: mpang_
2 Replies
Login or Register to Ask a Question