yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #48556
[Bug 1482271] Re: Race condition in multithreaded Apache/WSGI setup
Reviewed: https://review.openstack.org/222173
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=691d497885cf4d8b39bb6ddb384b7c027bb52f95
Submitter: Jenkins
Branch: master
commit 691d497885cf4d8b39bb6ddb384b7c027bb52f95
Author: Boris Bobrov <bbobrov@xxxxxxxxxxxx>
Date: Thu Sep 3 16:05:55 2015 +0500
Move region configuration to a critical section
Cache initialization performed on the request handling
after Apache wsgi module start raises exception
region.RegionAlreadyConfigured on race condition
in multithreaded mode.
Change-Id: I65f85aedd5b087499b889540417b9502e050ce7c
Closes-bug: 1482271
** Changed in: keystone
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Identity (keystone).
https://bugs.launchpad.net/bugs/1482271
Title:
Race condition in multithreaded Apache/WSGI setup
Status in OpenStack Identity (keystone):
Fix Released
Bug description:
When configured as an Apache WSGI module a race condition is possible during keystone cache initialization:
https://github.com/openstack/keystone/blob/a597a86b854215835a4d54885daeb161d7b0efb8/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
References