When greenlet was used, thread interchange was failed

Bug #1945188 reported by renu rani
6
This bug affects 1 person
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/oslo.messaging@22f240b · GitHub

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.try_import('eventlet')
 51 if eventlet and eventletutils.is_monkey_patched("thread"):
 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.patcher.original('threading')
 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
==============================================================

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.