memcache client race in wsgi middleware
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-keystoneclient |
Fix Released
|
Critical
|
Dolph Mathews |
Bug Description
The memcache client that keystoneclient's WSGI middleware uses isn't thread safe, yet keystoneclient.
The consequences of this race are garbage in memcache and errors like these:
2014-03-06 14:04:56.692 16992 INFO glance.wsgi.server [-] Traceback (most recent call last):
File "/usr/lib/
result = self.applicatio
File "/usr/lib/
token_info = self._validate_
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
time=
File "/usr/lib/
return self._set("set", key, val, time, min_compress_len)
File "/usr/lib/
return _unsafe_set()
File "/usr/lib/
server.
File "/usr/lib/
self.
File "/usr/lib/
tail = self.send(data, flags)
File "/usr/lib/
timeout_
File "/usr/lib/
listener = hub.add(hub.WRITE, fileno, current.switch)
File "/usr/lib/
listener = super(Hub, self).add(evtype, fileno, cb)
File "/usr/lib/
evtype, fileno, evtype))
RuntimeError: Second simultaneous write on fileno 6 detected. Unless you really know what you're doing, make sure that only one greenthread can write any particular socket. Consider using a pools.Pool. If you do know what you're doing and want to disable this error, call eventlet.
I've attached a patch to fix the bug.
Changed in python-keystoneclient: | |
milestone: | none → 0.7.0 |
Changed in python-keystoneclient: | |
assignee: | nobody → Dolph Mathews (dolph) |
status: | New → In Progress |
Changed in python-keystoneclient: | |
status: | Fix Committed → Fix Released |
Peter, if you have a chance, can you contact me on IRC regarding this bug and the fix? (dolphm on freenode) Thanks!