oslo.service fails with python3.9 due to Semaphore() not implementing _at_fork_reinit

Bug #1904424 reported by Dimitri John Ledkov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.concurrency
New
Undecided
Unassigned
oslo.service
New
Undecided
Unassigned
python-oslo.concurrency (Ubuntu)
New
Undecided
Unassigned
python-oslo.service (Ubuntu)
New
Undecided
Unassigned

Bug Description

oslo.service fails with python3.9 due to Semaphore() not implementing _at_fork_reinit

when testing oslo.service, it fails with AttributeErrors in python3.9, leading me to believe that oslo.concurrency is not compatible with python3.9 and i'm not sure how to fix it.

https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-hirsute/hirsute/amd64/p/python-oslo.service/20201116_120433_0b2e5@/log.gz

{0} oslo_service.tests.test_periodic.PeriodicTasksTestCase.test_called_correct [0.008885s] ... ok
   ERROR [oslo_service.periodic_task] Error during AService.crashit
Traceback (most recent call last):
  File "/tmp/autopkgtest.yxXbpd/build.9dR/src/oslo_service/periodic_task.py", line 216, in run_periodic_tasks
    task(self, context)
  File "/tmp/autopkgtest.yxXbpd/build.9dR/src/oslo_service/tests/test_periodic.py", line 54, in crashit
    raise AnException('urg')
oslo_service.tests.test_periodic.AnException: urg
   ERROR [oslo_service.periodic_task] Error during AService.crashit
Traceback (most recent call last):
  File "/tmp/autopkgtest.yxXbpd/build.9dR/src/oslo_service/periodic_task.py", line 216, in run_periodic_tasks
    task(self, context)
  File "/tmp/autopkgtest.yxXbpd/build.9dR/src/oslo_service/tests/test_periodic.py", line 54, in crashit
    raise AnException('urg')
oslo_service.tests.test_periodic.AnException: urg
{0} oslo_service.tests.test_periodic.PeriodicTasksTestCase.test_called_thrice [0.005251s] ... ok
{0} oslo_service.tests.test_periodic.PeriodicTasksTestCase.test_name [0.002083s] ... ok
{0} oslo_service.tests.test_periodic.PeriodicTasksTestCase.test_raises [0.002519s] ... ok
Exception ignored in: <function _after_fork at 0x7f4da9878790>
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 1486, in _after_fork
    thread._reset_internal_locks(True)
  File "/usr/lib/python3.9/threading.py", line 827, in _reset_internal_locks
    self._started._at_fork_reinit()
  File "/usr/lib/python3.9/threading.py", line 527, in _at_fork_reinit
    self._cond._at_fork_reinit()
  File "/usr/lib/python3.9/threading.py", line 253, in _at_fork_reinit
    self._lock._at_fork_reinit()
AttributeError: 'Semaphore' object has no attribute '_at_fork_reinit'
Exception ignored in: <function _after_at_fork_child_reinit_locks at 0x7f4da93150d0>
Traceback (most recent call last):
  File "/usr/lib/python3.9/logging/__init__.py", line 251, in _after_at_fork_child_reinit_locks
    handler._at_fork_reinit()
  File "/usr/lib/python3.9/logging/__init__.py", line 890, in _at_fork_reinit
    self.lock._at_fork_reinit()
  File "/usr/lib/python3.9/threading.py", line 126, in _at_fork_reinit
    self._block._at_fork_reinit()
AttributeError: 'Semaphore' object has no attribute '_at_fork_reinit'
Exception ignored in: <function _after_fork at 0x7f4da8a203a0>
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 1492, in _after_fork
    thread._reset_internal_locks(False)
  File "/usr/lib/python3.9/threading.py", line 827, in _reset_internal_locks
    self._started._at_fork_reinit()
  File "/usr/lib/python3.9/threading.py", line 527, in _at_fork_reinit
    self._cond._at_fork_reinit()
  File "/usr/lib/python3.9/threading.py", line 253, in _at_fork_reinit
    self._lock._at_fork_reinit()

tags: added: python3.9 update-excuse update-excuses
tags: added: hirsute
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.