Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 591137 - server hang with no OOM reaper on memory exhaustion
Summary: server hang with no OOM reaper on memory exhaustion
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: realtime-kernel
Version: 1.2
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Luis Claudio R. Goncalves
QA Contact: David Sommerseth
Depends On:
TreeView+ depends on / blocked
Reported: 2010-05-11 14:18 UTC by Jon Thomas
Modified: 2018-10-27 13:38 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2010-12-17 16:07:40 UTC
Target Upstream Version:

Attachments (Terms of Use)
log from vmcore (deleted)
2010-05-11 14:25 UTC, Jon Thomas
no flags Details
foreach bt dump (deleted)
2010-05-11 14:51 UTC, Jon Thomas
no flags Details
reproducer for 158 crash (deleted)
2010-06-24 17:14 UTC, Jon Thomas
no flags Details

Description Jon Thomas 2010-05-11 14:18:13 UTC
Customer is using mrg rt kernel is his machines . He is getting a large number of system hangs. There is memory shortage in the server during the hang. But oom killer is not getting invoked.

crash> sys
    KERNEL: /usr/lib/debug/lib/modules/
  DUMPFILE: /share/773563/2010610/vmcore
      CPUS: 8
      DATE: Thu Apr 15 18:36:59 2010
    UPTIME: 6 days, 04:37:46
LOAD AVERAGE: 1378.45, 1353.83, 1114.23
     TASKS: 9974
  NODENAME: xxxxxxxxxxxxxxx
   VERSION: #1 SMP PREEMPT RT Mon Nov 16 12:02:19 EST 2009
   MACHINE: x86_64  (3333 Mhz)
    MEMORY: 32 GB
     PANIC: "SysRq : Trigger a crashdump"

Comment 2 Jon Thomas 2010-05-11 14:23:26 UTC
I think there may be two issues here:

1) the reaper is not getting called. I check the oom flags in the sosreport and the oom-killer should be called.

2) the hang. I suspect that this may be a dup of bz 546428. There are 928 processes in shrink_zone which just doesn't seem right.

grep -c shrink_zone btall


Comment 3 Jon Thomas 2010-05-11 14:25:33 UTC
Created attachment 413153 [details]
log from vmcore

Comment 4 Jon Thomas 2010-05-11 14:51:01 UTC
Created attachment 413160 [details]
foreach bt dump

Comment 9 Luis Claudio R. Goncalves 2010-06-11 16:20:50 UTC
I found a patch from RHEL we have been carrying for a long time in the v1 kernel, linux-2.6-rt-oomkill.patch, that (among other things) includes a function called should_oom_kill() that attempts to avoid and OOM frenzy. As there are no comments in the patch, I am right now investigating why the patch was added in the first place and whether we need to remove the should_oom_kill() references or fix the function.

I have a test kernel running with the should_oom_kill() bits removed and it is behaving the expected way. I have several instances of three different memory hoggers running and they are being killed right away when an OOM situation happens.

As soon as the historical motivation for the inclusion of that patch are clear, I will have a fix added to our latest kernel and test it on bigger systems.

Comment 14 Jon Thomas 2010-06-24 17:14:22 UTC
Created attachment 426656 [details]
reproducer for 158 crash

Comment 19 Frederik Bijlsma 2010-07-05 14:46:29 UTC

what is the status of this one?


Comment 20 Luis Claudio R. Goncalves 2010-07-08 16:29:47 UTC
A patch, described below, has been added to kernel -160 in order to enhance the behavior of the oom-killer (speed and accuracy). This patch also includes a new invocation path for the oom-killer (page fault handling).

    oom-killer: several fixes and enhancements
    Bugzilla: 589741 591137
    This patch contains the backport of portions of upstream commits related
    to the oom-killer, bringing mrg v1 oom-killer closer to upstream. The
    following upstream commits have been backported:
      1c0fe6e mm: invoke oom-killer from page fault
      ff0ceb9 oom: serialize out of memory calls
      28b83c5 oom: move oom_adj value from task_struct to signal_struct
      4365a56 oom-kill: fix NUMA constraint check with nodemask
      b95c35e oom: fix the unsafe usage of badness() in proc_oom_score()
      d553ad8 param: fix NULL comparison on oom
      1ac0cb5 mm: fix anonymous dirtying
      5d863b8 oom: fix oom_adjust_write() input sanity check
      6583bb6 mm: avoid endless looping for oom killed tasks
      82553a9 oom: invoke oom killer for __GFP_NOFAIL
      a12888f oom_kill: don't call for int_sqrt(0)
      4779280 mm: make get_user_pages() interruptible   (partially backported)
      7a36a75 get_user_pages(): fix possible page leak on oom
      a1e0961 relay: nopage
      e91a810 oom_kill bug
      7b1915a mm/oom_kill.c: Use list_for_each_entry instead of list_for_each

Comment 32 Jon Thomas 2010-09-01 12:23:42 UTC
fyi: As per customer the kernel-rt supplied with MRG 1.3 beta works very good. OOM is done in under 2 seconds.

Comment 34 Jens Kuehnel 2010-09-10 13:08:08 UTC
What kind of infos is needed? 
I'm the customer with the problem.

Comment 39 Jon Thomas 2010-09-24 18:42:16 UTC
That may be possible. We're not sure yet.

but if SELinux is all that is required, will we support 1.3 rt on rhel5.4+seLinux upgrage?

Comment 40 Jens Kuehnel 2010-09-24 20:54:51 UTC

we have SELinux deactivated with selinux=0 in /proc/cmdline.

SELinux is not a showstopper.

aka the Customer ;-)

Comment 45 Jens Kuehnel 2010-12-17 16:07:40 UTC
We updated to MRG 1.3 and the bug does not exsist there.

Service Ticket is already closed.

Note You need to log in before you can comment on or make changes to this bug.