← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1506958] [NEW] TypeError: object.__new__(thread.lock) is not safe, use thread.lock.__new__()

 

Public bug reported:

When using /usr/bin/nova-api, running $ openstack  availability zone
list -> works fine.

If using the wsgi scripts, and running nova-api via e.g. uwsgi, the same
client command fails as following:

2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions [req-184fd1f3-ae97-49d0-85dd-05ef08800238 0e56b818bc9c4eaea4b8d6a2f5da6227 906359c0c71749ceb27e46612e0419ce - - -] Unexpected exception in API method
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions Traceback (most recent call last):
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/site-packages/nova/api/openstack/extensions.py", line 478, in wrapped
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions     return f(*args, **kwargs)
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/site-packages/nova/api/openstack/compute/availability_zone.py", line 115, in detail
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions     return self._describe_availability_zones_verbose(context)
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/site-packages/nova/api/openstack/compute/availability_zone.py", line 61, in _describe_availability_zones_verbose
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions     ctxt = context.elevated()
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/site-packages/nova/context.py", line 198, in elevated
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions     context = copy.deepcopy(self)
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/copy.py", line 190, in deepcopy
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions     y = _reconstruct(x, rv, 1, memo)
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/copy.py", line 334, in _reconstruct
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions     state = deepcopy(state, memo)
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions     y = copier(x, memo)
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions     y[deepcopy(key, memo)] = deepcopy(value, memo)
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/copy.py", line 190, in deepcopy
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions     y = _reconstruct(x, rv, 1, memo)
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/copy.py", line 334, in _reconstruct
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions     state = deepcopy(state, memo)
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions     y = copier(x, memo)
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions     y[deepcopy(key, memo)] = deepcopy(value, memo)
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/copy.py", line 190, in deepcopy
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions     y = _reconstruct(x, rv, 1, memo)
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/copy.py", line 329, in _reconstruct
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions     y = callable(*args)
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/copy_reg.py", line 93, in __newobj__
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions     return cls.__new__(cls, *args)
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions TypeError: object.__new__(thread.lock) is not safe, use thread.lock.__new__()
2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions
2015-10-16 16:58:20.721 18938 INFO nova.api.openstack.wsgi [req-184fd1f3-ae97-49d0-85dd-05ef08800238 0e56b818bc9c4eaea4b8d6a2f5da6227 906359c0c71749ceb27e46612e0419ce - - -] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<type 'exceptions.TypeError'>


Looks like a dejavu of https://bugs.launchpad.net/python-novaclient/+bug/1123561 but I am not certain.

This is with liberty final release (or so i believe at the moment).

** Affects: nova
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1506958

Title:
  TypeError: object.__new__(thread.lock) is not safe, use
  thread.lock.__new__()

Status in OpenStack Compute (nova):
  New

Bug description:
  When using /usr/bin/nova-api, running $ openstack  availability zone
  list -> works fine.

  If using the wsgi scripts, and running nova-api via e.g. uwsgi, the
  same client command fails as following:

  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions [req-184fd1f3-ae97-49d0-85dd-05ef08800238 0e56b818bc9c4eaea4b8d6a2f5da6227 906359c0c71749ceb27e46612e0419ce - - -] Unexpected exception in API method
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions Traceback (most recent call last):
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/site-packages/nova/api/openstack/extensions.py", line 478, in wrapped
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions     return f(*args, **kwargs)
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/site-packages/nova/api/openstack/compute/availability_zone.py", line 115, in detail
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions     return self._describe_availability_zones_verbose(context)
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/site-packages/nova/api/openstack/compute/availability_zone.py", line 61, in _describe_availability_zones_verbose
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions     ctxt = context.elevated()
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/site-packages/nova/context.py", line 198, in elevated
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions     context = copy.deepcopy(self)
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/copy.py", line 190, in deepcopy
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions     y = _reconstruct(x, rv, 1, memo)
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/copy.py", line 334, in _reconstruct
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions     state = deepcopy(state, memo)
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions     y = copier(x, memo)
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions     y[deepcopy(key, memo)] = deepcopy(value, memo)
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/copy.py", line 190, in deepcopy
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions     y = _reconstruct(x, rv, 1, memo)
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/copy.py", line 334, in _reconstruct
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions     state = deepcopy(state, memo)
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions     y = copier(x, memo)
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions     y[deepcopy(key, memo)] = deepcopy(value, memo)
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/copy.py", line 190, in deepcopy
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions     y = _reconstruct(x, rv, 1, memo)
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/copy.py", line 329, in _reconstruct
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions     y = callable(*args)
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/copy_reg.py", line 93, in __newobj__
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions     return cls.__new__(cls, *args)
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions TypeError: object.__new__(thread.lock) is not safe, use thread.lock.__new__()
  2015-10-16 16:58:20.720 18938 ERROR nova.api.openstack.extensions
  2015-10-16 16:58:20.721 18938 INFO nova.api.openstack.wsgi [req-184fd1f3-ae97-49d0-85dd-05ef08800238 0e56b818bc9c4eaea4b8d6a2f5da6227 906359c0c71749ceb27e46612e0419ce - - -] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
  <type 'exceptions.TypeError'>

  
  Looks like a dejavu of https://bugs.launchpad.net/python-novaclient/+bug/1123561 but I am not certain.

  This is with liberty final release (or so i believe at the moment).

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


Follow ups