python-greenlet / greenlet

Lightweight in-process concurrent programming
Other
1.63k stars 247 forks source link

3.0.0: Testing fails on OpenIndiana #379

Closed mtelka closed 10 months ago

mtelka commented 10 months ago

I'm packaging greenlet 3.0.0 for OpenIndiana. The packaging includes test run. Unfortunately the following tests fails:

======================================================================
ERROR: test_untracked_memory_doesnt_increase (greenlet.tests.test_leaks.TestLeaks)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.9/vendor-packages/greenlet/tests/test_leaks.py", line 341, in test_untracked_memory_doesnt_increase
    uss_before = psutil.Process().memory_full_info().uss
AttributeError: 'pmem' object has no attribute 'uss'

======================================================================
ERROR: test_untracked_memory_doesnt_increase_unfinished_thread_dealloc_in_main (greenlet.tests.test_leaks.TestLeaks)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.9/vendor-packages/greenlet/tests/test_leaks.py", line 444, in test_untracked_memory_doesnt_increase_unfinished_thread_dealloc_in_main
    self._check_untracked_memory_thread(deallocate_in_thread=False)
  File "/usr/lib/python3.9/vendor-packages/greenlet/tests/test_leaks.py", line 425, in _check_untracked_memory_thread
    uss_after = psutil.Process().memory_full_info().uss
AttributeError: 'pmem' object has no attribute 'uss'

======================================================================
FAIL: test_untracked_memory_doesnt_increase_unfinished_thread_dealloc_in_thread (greenlet.tests.test_leaks.TestLeaks)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.9/vendor-packages/greenlet/tests/test_leaks.py", line 438, in test_untracked_memory_doesnt_increase_unfinished_thread_dealloc_in_thread
    self._check_untracked_memory_thread(deallocate_in_thread=True)
  File "/usr/lib/python3.9/vendor-packages/greenlet/tests/test_leaks.py", line 416, in _check_untracked_memory_thread
    self.assertEqual(EXIT_COUNT[0], ITER * thread_func.ITER)
AssertionError: 0 != 20000
jamadden commented 10 months ago

That's not a platform I can officially support because I have no CI for it. Those tests are all trying to verify the same thing; if you're comfortable with the possibility of leaks, you can go ahead and skip them.

mtelka commented 10 months ago

Yes, I just skipped those tests: https://github.com/OpenIndiana/oi-userland/pull/14364/commits/cb8a860c524a31a227ac5b892206610f3771cdbb#diff-9ceb6073736e60a522e5ddf6ca74f241987bac7f1031b8c8193c1d0862529d01

Thank you.

jamadden commented 10 months ago

Great! I'll make a note to try to do our best to gate the usage of uss in the future so more of these don't arise, but, unfortunately I can't promise it won't happen.