Red Hat Bugzilla – Bug 111768
/proc/pid/statm can return negative values
Last modified: 2007-11-30 17:06:53 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: Sometimes Steps to Reproduce: 1. Problem arises for huge shared memory values. 2. 3. Additional info:
This problem is in AS2.1, havent tested in RHEL 3
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. http://rhn.redhat.com/errata/RHSA-2004-188.html