Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Negative memory usage reported when processes use a lot of memory #374

Closed
giampaolo opened this issue May 23, 2014 · 4 comments
Closed

Negative memory usage reported when processes use a lot of memory #374

giampaolo opened this issue May 23, 2014 · 4 comments

Comments

@giampaolo
Copy link
Owner

From Willem.J...@gmail.com on May 07, 2013 16:11:23

What steps will reproduce the problem?  
======================================
Call psutil.Process(<pid>).get_memory_info().rss
on a process which uses more than 2GB of memory 

What is the expected output?  
============================
A number larger than 2 billion 

What do you see instead?  
========================
A negative number 

What version of psutil are you using? What Python version?  
==========================================================
* I'm pretty sure I'm using the 32 bit version of psutil 0.7.0
* Python 2.7.3 (default, Apr 10 2012, 23:31:26) 
  [MSC v.1500 32 bit (Intel)] on win32 

On what operating system? Is it 32bit or 64bit version?  
=======================================================
* Windows7, 64 bit 

Please provide any additional information below.  
================================================
I was monitoring the memory usage of a process through time and
got the following numbers:

   12075008
   28250112
   28250112
   28246016
    ...
 1795465216
 1851506688
-2024525824
    ...
 -352120832
  -51957760
         -1
         -1
    ...

while the memory usage increased to over 8GB.

So, to me at least, it looks like an overflow.

I haven't verified if the bug is present in the 64bit version,
but for me it's hard to move to a 64bit Python because of the
(lack of) availability of a 64bit version of some libraries.

Original issue: http://code.google.com/p/psutil/issues/detail?id=374

@giampaolo
Copy link
Owner Author

From g.rodola on May 14, 2013 13:53:53

Do you have the possibility to compile psutil and figure whether this happened 
in get_process_memory_info() [1] or get_process_memory_info_2() [2]? 
https://code.google.com/p/psutil/source/browse/psutil/_psutil_mswindows.c?spec=svnc970f35bc9640ac32eb9f09de8c230e7f86a2466&r=73608ce0ff14125fead4dbb93da44233b9dea92f#578

https://code.google.com/p/psutil/source/browse/psutil/_psutil_mswindows.c?spec=svnc970f35bc9640ac32eb9f09de8c230e7f86a2466&r=73608ce0ff14125fead4dbb93da44233b9dea92f#643

@giampaolo
Copy link
Owner Author

From g.rodola on July 08, 2013 10:34:29

Labels: -Priority-Medium -64bit -OpSys-Windows7 Priority-High OpSys-Windows

@giampaolo
Copy link
Owner Author

From g.rodola on July 09, 2013 03:31:56

Ok, I should have fixed this in revision ea98d1686302 .
If you notice anything weird please reopen.

Status: FixedInHG
Labels: Milestone-1.0.0

@giampaolo
Copy link
Owner Author

From g.rodola on July 11, 2013 01:54:35

Status: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant