When greenlet was used, thread interchange was failed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo.messaging |
New
|
Undecided
|
Unassigned |
Bug Description
A deadlock issue occurred in Tacker. It was found that the even when greenlet was used, thread interchange was failed because threads occurred in threading, which is causing this issue.
In below solution, it was found that when greenlet is used, using thread module of eventlet works.
Allow users run the rabbitmq heartbeat inside a standard pthread. · openstack/
However, in the below case, decision is performed in "thread", so in python2 series decision can be made correctly. However, in python3 series, it is required to make "_thread" as key, and even if eventlet is eventlet, perform else process, and so thread will be generated in threading.
Hence, we think it is required to modify so that the decision is correctly made even in case of "_thread".
=======
50 eventlet = importutils.
51 if eventlet and eventletutils.
52 # Here we initialize module with the native python threading module
53 # if it was already monkey patched by eventlet/greenlet.
54 stdlib_threading = eventlet.
55 else:
56 # Manage the case where we run this driver in a non patched environment
57 # and where user even so configure the driver to run heartbeat through
58 # a python thread, if we don't do that when the heartbeat will start
59 # we will facing an issue by trying to override the threading module.
60 stdlib_threading = threading
=======