Bug 111768 - /proc/pid/statm can return negative values
/proc/pid/statm can return negative values
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: kernel (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Mark DeWandel
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2003-12-09 16:30 EST by Greg Marsden
Modified: 2007-11-30 17:06 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-05-11 21:07:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2004:188 normal SHIPPED_LIVE Important: Updated kernel packages available for Red Hat Enterprise Linux 3 Update 2 2004-05-11 00:00:00 EDT

  None (edit)
Description Greg Marsden 2003-12-09 16:30:18 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5)
Gecko/20031120 Firebird/0.7

Description of problem:
Linux memory value reported under /proc/ can become negative
# cat /proc/14907/statm
2116 1350 -2644 53 0 1297 539

This is most likely a result of a type discrepancy in proc/array.c
 return sprintf(buffer,"%d %d %d %d %d %d %d\n",
                        size, resident, share, trs, lrs, drs, dt);
 share = mm->mm_stat.sharable;
 int share in proc/array.c
 unsigned long in sched.h:mm_stat 

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Problem arises for huge shared memory values.

Additional info:
Comment 1 Greg Marsden 2003-12-09 16:32:40 EST
This problem is in AS2.1, havent tested in RHEL 3
Comment 3 John Flanagan 2004-05-11 21:07:54 EDT
An errata 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 the 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.


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