Testcases hangs : /usr/local/lib/python3.7/threading.py", line 1335, in _after_fork
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python3.7 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
When py3.7 test is executed for nova-powervm, it hangs and gets timed_out. the same testcases executes fine in py3.6 env.
below exception occurs and doesnt exit from the tests.
Exception ignored in: <function _after_fork at 0x7fe220046e18>
Traceback (most recent call last):
File "/usr/local/
assert len(_active) == 1
AssertionError:
Exception ignored in: <function _after_fork at 0x7f40f5346e18>
Traceback (most recent call last):
File "/usr/local/
assert len(_active) == 1
AssertionError:
Exception ignored in: <function _after_fork at 0x7f2795418e18>
Traceback (most recent call last):
File "/usr/local/
assert len(_active) == 1
AssertionError:
Exception ignored in: <function _after_fork at 0x7ff2e7d26e18>
Traceback (most recent call last):
File "/usr/local/
assert len(_active) == 1
AssertionError:
Exception ignored in: <function _after_fork at 0x7f17debb7e18>
Traceback (most recent call last):
File "/usr/local/
assert len(_active) == 1
AssertionError:
```````
def _after_fork():
"""
Cleanup threading module state that should not exist after a fork.
"""
# Reset _active_limbo_lock, in case we forked while the lock was held
# by another (non-forked) thread. http://
global _active_limbo_lock, _main_thread
_active_
# fork() only copied the current thread; clear references to others.
new_active = {}
current = current_thread()
_main_thread = current
with _active_limbo_lock:
# Dangling thread instances must still have their locks reset,
# because someone may join() them.
threads = set(_enumerate())
for thread in threads:
# Any lock/condition variable may be currently locked or in an
# invalid state, so we reinitialize them.
if thread is current:
# There is only one active thread. We reset the ident to
# its new value since it can have changed.
else:
# All the others are already stopped.
assert len(_active) == 1
affects: | python-launchpad-bugs → python3.7 (Ubuntu) |