Open GoogleCodeExporter opened 9 years ago
Hi Shane,
Since you're able to reproduce the problem simply on your system, can you try
narrowing down the steps to reproduce to the smallest test case? For example,
does the problem happen due to use of one of these specific calls below?
print " CPU: {0:15.1f}%".format(proc.get_cpu_percent())
print " U Time: {0:15.1f}s".format(proc.get_cpu_times().user)
print " S Time: {0:15.1f}s".format(proc.get_cpu_times().system)
print " Memory: {0:15.1f}%".format(proc.get_memory_percent())
print " Threads:{0:13d}".format( proc.get_num_threads() )
print " Files: {0:13d}".format( len(proc.get_open_files()) )
print " INET: {0:13d}".format( len(proc.get_connections()) )
It would be very helpful to determine specifically which feature of psutil
seems to be causing a problem for the Java process. If you are getting a
hotspot crash dump from the JVM that would also be helpful to include here.
Thanks
Original comment by jlo...@gmail.com
on 10 Jun 2012 at 3:57
Yes. I had actually been doing this in the background - I tried running each
one of these individually and could not reproduce the segfault after running
~10 minutes each. Within minutes of starting them all again, the segfault
happened again. So, it appears to not be a single call, but some combination of
multiple. I will try combining and see what I can come up with.
Original comment by shane.c....@gmail.com
on 10 Jun 2012 at 4:20
OK - I have caused it to happen with this combination:
print " S Time: {0:15.1f}s".format(proc.get_cpu_times().system)
print " Memory: {0:15.1f}%".format(proc.get_memory_percent())
print " Threads:{0:13d}".format( proc.get_num_threads() )
print " Files: {0:13d}".format( len(proc.get_open_files()) )
This was the smallest combination that I could get it to happen with. Is it
possible that this is a timing issue - and not really dependent on what we are
doing - but how long we are doing it for (ie, the longer I spend working with
the proc object, the greater the chance that the error will occur)? If so, I
could reduce the amount of time by building the string and then printing it all
at once - but I don't like the idea that the thing I am using to monitor my
applications is the one that it murdering them :)
I will turn debugging on in the jvm and see if I can get more information there.
Original comment by shane.c....@gmail.com
on 10 Jun 2012 at 5:37
Any news about this?
Original comment by g.rodola
on 24 Feb 2013 at 9:59
psutil has been migrated from Google Code to Github (see:
http://grodola.blogspot.com/2014/05/goodbye-google-code-im-moving-to-github.html
).
Please do NOT reply here but use this instead:
https://github.com/giampaolo/psutil/issues/277
Original comment by g.rodola
on 26 May 2014 at 3:08
Original issue reported on code.google.com by
shane.c....@gmail.com
on 10 Jun 2012 at 3:16