Bug 470459 - The system stall or panic can occur when /proc/<pid>/oom_score is read
The system stall or panic can occur when /proc/<pid>/oom_score is read
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
5.2
All Linux
high Severity high
: rc
: ---
Assigned To: Larry Woodman
Red Hat Kernel QE team
: OtherQA
Depends On:
Blocks: 483701 485920
  Show dependency treegraph
 
Reported: 2008-11-07 05:11 EST by Tomas Smetana
Modified: 2011-11-29 17:14 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-02 04:28:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Proposed patch (443 bytes, patch)
2008-11-07 05:13 EST, Tomas Smetana
no flags Details | Diff

  None (edit)
Description Tomas Smetana 2008-11-07 05:11:03 EST
Description of problem:
In proc_oom_score()@fs/proc/base.c, task_struct is accessed without tasklist_lock. So, there are race condition between reading /proc/<pid>/oom_score and traversing task_list, then system stall or panic can occur. This issue has been fixed on vanilla kernel.

Version-Release number of selected component:
kernel version: 2.6.18-92.el5 (RHEL5.2GA)

How reproducible:
Reading from /proc/<pid>/oom_score, it can be reproducible in few minutes, on 16 core SMP box.

Steps to Reproduce:
(1) fork and exit a large amount of processes.
(2) Using /usr/bin/find, read /proc/<pid>/oom_score repeadedly.

Actual results:
The system has stalled.

Expected results:
Neither system stall nor panic occurs.

Additional info:
git patch: "/proc/*/oom_score oops re badness"
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=19c5d45a09312ca20cd1f9df3fd1a87fe0cb8aac
Comment 1 Tomas Smetana 2008-11-07 05:13:05 EST
Created attachment 322837 [details]
Proposed patch
Comment 2 Larry Woodman 2008-11-07 08:59:21 EST
Patch built, tested and posted to rhkernel-list.

Larry
Comment 3 RHEL Product and Program Management 2009-02-02 22:40:11 EST
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 4 RHEL Product and Program Management 2009-02-16 10:11:02 EST
Updating PM score.
Comment 5 Don Zickus 2009-02-23 15:02:31 EST
in kernel-2.6.18-132.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

Please do NOT transition this bugzilla state to VERIFIED until our QE team
has sent specific instructions indicating when to do so.  However feel free
to provide a comment indicating that this fix has been verified.
Comment 7 Chris Ward 2009-07-03 14:12:37 EDT
~~ Attention - RHEL 5.4 Beta Released! ~~

RHEL 5.4 Beta has been released! There should be a fix present in the Beta release that addresses this particular request. Please test and report back results here, at your earliest convenience. RHEL 5.4 General Availability release is just around the corner!

If you encounter any issues while testing Beta, please describe the issues you have encountered and set the bug into NEED_INFO. If you encounter new issues, please clone this bug to open a new issue and request it be reviewed for inclusion in RHEL 5.4 or a later update, if it is not of urgent severity.

Please do not flip the bug status to VERIFIED. Only post your verification results, and if available, update Verified field with the appropriate value.

Questions can be posted to this bug or your customer or partner representative.
Comment 13 errata-xmlrpc 2009-09-02 04:28:18 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2009-1243.html

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