[Bug 1782647] Re: py3.7 deadlock in threading

OpenStack Infra 1782647 at bugs.launchpad.net
Wed Oct 24 06:28:46 UTC 2018


Reviewed:  https://review.openstack.org/586336
Committed: https://git.openstack.org/cgit/openstack/designate/commit/?id=72e4e13d8ee681cae5564ef538a44ddd96ca586c
Submitter: Zuul
Branch:    master

commit 72e4e13d8ee681cae5564ef538a44ddd96ca586c
Author: Graham Hayes <gr at ham.ie>
Date:   Thu Jul 26 20:57:10 2018 +0100

    Move to GreenThreadPoolExecutor
    
    python3.7 and eventlet cause the `future.ThreadPoolExecutor` to hang
    indefinitely. Moving to `futurist.GreenThreadPoolExecutor` allows the
    `designate-worker` process to use native eventlet greenthreads, which bypasses
    the hanging issue.
    
    Closes-Bug: #1782647
    
    Related-Bug: https://bugs.python.org/issue34173
    Related-Bug: eventlet/eventlet#508
    
    Change-Id: I36c79ca72635d81cfcc8d3cc87b1bc5e0657d9e8
    Signed-off-by: Graham Hayes <gr at ham.ie>


** Changed in: designate
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python3.7 in Ubuntu.
https://bugs.launchpad.net/bugs/1782647

Title:
  py3.7 deadlock in threading

Status in Designate:
  Fix Released
Status in eventlet:
  New
Status in Python:
  Unknown
Status in python3.7 package in Ubuntu:
  New

Bug description:
  I have a feeling this is an issue with a dependency that designate is
  using, or even with py3.7 itself, and not directly a designate issue.
  I'm hitting something similar in heat and will append the bug with
  details there once I get them narrowed down to a simple recreate.

  Things seem to get hung up in:

    File "/usr/lib/python3.7/threading.py", line 296, in wait
      waiter.acquire()

  and:

    File "/usr/lib/python3.7/threading.py", line 1048, in _wait_for_tstate_lock
      elif lock.acquire(block, timeout):

  To reproduce with designate, update tox.ini with the following:

  --- a/tox.ini
  +++ b/tox.ini
  @@ -1,6 +1,6 @@
   [tox]
   minversion = 2.0
  -envlist = py35,py27,flake8
  +envlist = py35,py37,py27,flake8
   skipsdist = True

   [testenv]
  @@ -39,6 +39,12 @@ commands =
     {[testenv]commands}
     stestr run '{posargs}'

  +[testenv:py37]
  +basepython = python3.7
  +commands =
  +  {[testenv]commands}
  +  stestr run 'designate\.tests\.test_workers\.test_processing\.TestProcessingExecutor\.(test_execute_multiple_tasks)'
  +
   [testenv:docs]
   basepython = python3
   deps =

  Notice that while updating tox with a py3.7 target, that also runs a
  single test, test_execute_multiple_tasks. The test will hang and
  require a Control-C to cancel it. The results look like this:
  https://paste.ubuntu.com/p/SwXsCcghjt/

  To recreate with py3.7 you can use Ubuntu Cosmic like so:

  lxc launch ubuntu-daily:cosmic c1
  lxc exec c1 /bin/bash
  root at c1:~# git clone https://github.com/openstack/designate
  root at c1:~# #update tox.ini as shown above
  root at c1:~# tox -e py37

To manage notifications about this bug go to:
https://bugs.launchpad.net/designate/+bug/1782647/+subscriptions



More information about the foundations-bugs mailing list