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

FreeBSD 64bit support #61

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

FreeBSD 64bit support #61

giampaolo opened this issue May 23, 2014 · 11 comments

Comments

@giampaolo
Copy link
Owner

From [email protected] on August 28, 2009 18:01:26

What steps will reproduce the problem?  
1. Run test_psutil.py on a FreeBSD 64 bit system 

What is the expected output?  


What do you see instead?  
One expects to see that the tests are all OK. Instead, total memory,
available memory, and process info tests will fail. What version of psutil are 
you using? On what operating system? svn version as of 8/28 9:00 am.  FreeBSD 6.3 32 bit and 64 bit 

Please provide any additional information below.  
Fixing initial values and sizes sort out the problem.  patch file is
attached.  (cd psutil* ; patch -p1 ../psutil.bsd.patch)

Attachment: psutil.bsd.patch

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

@giampaolo
Copy link
Owner Author

From [email protected] on September 17, 2009 11:33:39

Postponing this until we have a 64bit FreeBSD install to test on.

Status: PostPoned

@giampaolo
Copy link
Owner Author

From [email protected] on January 30, 2010 16:18:56

Summary: FreeBSD 64bit support

@giampaolo
Copy link
Owner Author

From [email protected] on January 30, 2010 16:19:05

Status: Accepted

@giampaolo
Copy link
Owner Author

From [email protected] on January 30, 2010 16:19:12

Labels: 64bit

@giampaolo
Copy link
Owner Author

From [email protected] on February 02, 2010 12:36:44

Here follows a list of tests failing as r468 .

======================================================================
ERROR: test_avail_phymem (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 91, in test_avail_phymem
    x = psutil.avail_phymem()
  File "/usr/local/lib/python2.6/site-packages/psutil/_psbsd.py", line 24, in
avail_phymem
    return _psutil_bsd.get_avail_phymem()
SystemError: error return without exception set

======================================================================
ERROR: test_used_phymem (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 86, in test_used_phymem
    x = psutil.used_phymem()
  File "/usr/local/lib/python2.6/site-packages/psutil/_psbsd.py", line 28, in used_phymem
    return TOTAL_PHYMEM - _psutil_bsd.get_avail_phymem()
SystemError: error return without exception set

======================================================================
ERROR: test_avail_phymem (__main__.LimitedUserTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 91, in test_avail_phymem
    x = psutil.avail_phymem()
  File "/usr/local/lib/python2.6/site-packages/psutil/_psbsd.py", line 24, in
avail_phymem
    return _psutil_bsd.get_avail_phymem()
SystemError: error return without exception set

======================================================================
ERROR: test_used_phymem (__main__.LimitedUserTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 86, in test_used_phymem
    x = psutil.used_phymem()
  File "/usr/local/lib/python2.6/site-packages/psutil/_psbsd.py", line 28, in used_phymem
    return TOTAL_PHYMEM - _psutil_bsd.get_avail_phymem()
SystemError: error return without exception set

======================================================================
ERROR: test_avail_phymem (_bsd.BSDSpecificTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/psutil/test/_bsd.py", line 48, in test_avail_phymem
    psutil_avail_phymem =  psutil.avail_phymem()
  File "/usr/local/lib/python2.6/site-packages/psutil/_psbsd.py", line 24, in
avail_phymem
    return _psutil_bsd.get_avail_phymem()
SystemError: error return without exception set

======================================================================
FAIL: test_get_pid_list (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 322, in test_get_pid_list
    self.assertEqual(len(pidlist), len(set(pidlist)))
AssertionError: 78 != 49

======================================================================
FAIL: test_uid (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 241, in test_uid
    self.assertEqual(uid, os.getuid())
AssertionError: 8243121639319928832 != 0

======================================================================
FAIL: test_get_pid_list (__main__.LimitedUserTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 322, in test_get_pid_list
    self.assertEqual(len(pidlist), len(set(pidlist)))
AssertionError: 91 != 62

======================================================================
FAIL: test_uid (__main__.LimitedUserTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 241, in test_uid
    self.assertEqual(uid, os.getuid())
AssertionError: 8243121639319928832 != 0

======================================================================
FAIL: test_process_gid (_posix.PosixSpecificTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/psutil/test/_posix.py", line 53, in test_process_gid
    self.assertEqual(gid_ps, gid_psutil)
AssertionError: 0 != 8243121639319928832

======================================================================
FAIL: test_process_uid (_posix.PosixSpecificTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/psutil/test/_posix.py", line 48, in test_process_uid
    self.assertEqual(uid_ps, uid_psutil)
AssertionError: 0 != 8243121639319928832

======================================================================
FAIL: test_process_create_time (_bsd.BSDSpecificTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/psutil/test/_bsd.py", line 64, in test_process_create_time
    self.assertEqual(start_ps, start_psutil)
AssertionError: 'Tue Feb  2 21:35:54 2010' != 'Tue Feb 02 21:35:54 2010'

----------------------------------------------------------------------
Ran 82 tests in 1.575s

FAILED (failures=7, errors=5)

@giampaolo
Copy link
Owner Author

From [email protected] on February 03, 2010 11:41:18

Fixed avail_phymem() by having used long(s) instead of int(s) as r470 and verified
that this doesn't cause problems on 32 bit OSes.
This way 6 failures out of 12 are solved.

@giampaolo
Copy link
Owner Author

From [email protected] on February 03, 2010 12:27:37

Fixed process groupname related code as r471 .
Verified that it didn't break anything on 32 bit.

Only two tests are failing now:


======================================================================
FAIL: test_get_pid_list (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 322, in test_get_pid_list
    self.assertEqual(len(pidlist), len(set(pidlist)))
AssertionError: 84 != 55

======================================================================
FAIL: test_get_pid_list (__main__.LimitedUserTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 322, in test_get_pid_list
    self.assertEqual(len(pidlist), len(set(pidlist)))
AssertionError: 97 != 68

----------------------------------------------------------------------
Ran 84 tests in 1.577s

@giampaolo
Copy link
Owner Author

From [email protected] on February 03, 2010 12:48:39

Status: Started
Labels: Milestone-0.1.3

@giampaolo
Copy link
Owner Author

From [email protected] on February 03, 2010 19:08:36

Duplicate PID code is almost certainly in arch/bsd/process_info.c in get_proc_list()
 (debugging printf shows that the C code before the Python module interface is
already seeing the dupes). Will look into this further and do more testing on a 64bit
system to see if we can find the root cause.

@giampaolo
Copy link
Owner Author

From [email protected] on February 27, 2010 10:27:33

Fixed as r522 .

Status: Fixed
Labels: -Type-Defect Type-Enhancement OpSys-FreeBSD

@giampaolo
Copy link
Owner Author

From g.rodola on March 02, 2013 03:50:18

Updated csets after the SVN -> Mercurial migration: r468 == revision 
2271d4fdb926 r470 == revision 6a5d2129e263 r471 == revision d36b16f5760c r522 == revision eaf53af01c55

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