← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1482271] [NEW] Race condition in multithreaded Apache/WSGI setup

 

Public bug reported:

When configured as an Apache WSGI module a race condition is possible during keystone cache initialization:
https://github.com/openstack/keystone/blob/master/keystone/common/kvs/core.py#L240
The operation raises exception region.RegionAlreadyConfigured.
This is a result of the race condition involving global 'application' variable being initialized several times (1 per thread).
application is required to be global according to Paste Deploy documentation:
http://pythonpaste.org/deploy/
Apache modwsgi documentation suggests protecting global objects with thread locks:
http://code.google.com/p/modwsgi/wiki/ProcessesAndThreading#Building_A_Portable_Application

** Affects: keystone
     Importance: Undecided
     Assignee: Alexander Makarov (amakarov)
         Status: In Progress

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1482271

Title:
  Race condition in multithreaded Apache/WSGI setup

Status in Keystone:
  In Progress

Bug description:
  When configured as an Apache WSGI module a race condition is possible during keystone cache initialization:
  https://github.com/openstack/keystone/blob/master/keystone/common/kvs/core.py#L240
  The operation raises exception region.RegionAlreadyConfigured.
  This is a result of the race condition involving global 'application' variable being initialized several times (1 per thread).
  application is required to be global according to Paste Deploy documentation:
  http://pythonpaste.org/deploy/
  Apache modwsgi documentation suggests protecting global objects with thread locks:
  http://code.google.com/p/modwsgi/wiki/ProcessesAndThreading#Building_A_Portable_Application

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


Follow ups