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

SystemError on import - 64bit FreeBSD, python2.5 #226

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

SystemError on import - 64bit FreeBSD, python2.5 #226

giampaolo opened this issue May 23, 2014 · 7 comments

Comments

@giampaolo
Copy link
Owner

From [email protected] on October 26, 2011 13:06:26

{{{
import psutil
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "build/bdist.freebsd-7.0-RELEASE-p3-amd64/egg/psutil/__init__.py", line 
581, in <module>
  File "build/bdist.freebsd-7.0-RELEASE-p3-amd64/egg/psutil/__init__.py", line 
577, in cpu_times
  File "build/bdist.freebsd-7.0-RELEASE-p3-amd64/egg/psutil/_psbsd.py", line 
52, in get_system_per_cpu_times
    for cpu_t in _psutil_bsd.get_system_per_cpu_times():
SystemError: error return without exception set
}}}


Running psutil 0.3.0 with python2.5, on FreeBSD 64-bit.

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

@giampaolo
Copy link
Owner Author

From g.rodola on October 26, 2011 04:37:44

What freebsd version are you using?
Also, can you paste the output of "sysctl kern.smp.maxcpus" and "sysctl 
kern.cp_times" commands?

Labels: -Priority-Medium Priority-High OpSys-FreeBSD Crash

@giampaolo
Copy link
Owner Author

From [email protected] on October 26, 2011 04:47:16

> uname -rp
7.0-RELEASE-p3 amd64

> sysctl kern.smp.maxcpus
kern.smp.maxcpus: 16

> sysctl kern.cp_times
sysctl: unknown oid 'kern.cp_times'

> sysctl kern.cp_time
kern.cp_time: 56447090 1492763 13068187 1144287 197020887

Thanks

@giampaolo
Copy link
Owner Author

From g.rodola on October 26, 2011 04:58:25

Wondering whether we can freely use kern.cp_time as replacement. Apparently it seems so.
On the other hand I've just tried to compile psutil on freebsd 7 and I get 
different compiling errors.
It seems at some point we broke support for it. :(

@giampaolo
Copy link
Owner Author

From g.rodola on October 26, 2011 14:25:15

Ok, we cannot use kern.cp_time.
After some research it seems there's no easy/immediate way to gather per-cpu 
stats on free bsd versions < 8.0.
I'm even inclined to think there might be no way at all because:

- "top -P", which shows this info, doesn't work on free bsd 7
- "htop", which provides this info without any option, requires some 
preliminary setup to be installed in the first place: 
http://daemon80.blogspot.com/2007/09/htop-in-freebsd.html Other than that I'm 
realizing we have some other incompatibilities which are annoying to fix: 
Process's get_open_files() and getcwd() don't work because kinfo_file structure 
doesn't exists.

At this point I think we have 2 possibilities: drop support for freebsd 7 or 
drop support for those functionnalities which are not working.
Since freebsd 7 appeared only 3 years ago: http://www.freebsd.org/releases/ 
...I think it makes more sense to go with the second option.

@giampaolo
Copy link
Owner Author

From g.rodola on October 26, 2011 14:33:48

Fixed in r1206 , which is a commit I'm really ashamed of. =)

Status: FixedInSVN
Labels: Milestone-0.4.0

@giampaolo
Copy link
Owner Author

From g.rodola on October 28, 2011 20:44:14

Status: Fixed

@giampaolo
Copy link
Owner Author

From g.rodola on March 02, 2013 04:05:09

Updated csets after the SVN -> Mercurial migration: r1206 == revision 
b146de777a1d

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