swift/test/unit
Samuel Merritt 6b4e6aeffa Fix deadlock when logging from a tpool thread.
The object server runs certain IO-intensive methods outside the main
pthread for performance. If one of those methods tries to log, this can
cause a crash that eventually leads to an object server with hundreds
or thousands of greenthreads, all deadlocked.

The short version of the story is that logging.SysLogHandler has a
mutex which Eventlet monkey-patches. However, the monkey-patched mutex
sometimes breaks if used across different pthreads, and it breaks in
such a way that it is still considered held. After that happens, any
attempt to emit a log message blocks the calling greenthread forever.

The fix is to use a mutex that works across different greenlets and
across different pthreads. This patch introduces such a lock based on
an anonymous pipe.

Change-Id: I57decefaf5bbed57b97a62d0df8518b112917480
Closes-Bug: 1710328
(cherry picked from commit 6d160797fc)
2017-09-12 18:54:09 -04:00
..
account Merge "More Test[Account|Container]Controller test updates" 2016-09-13 01:48:59 +00:00
cli Fix timing test error when rebalancing 2017-03-23 02:26:04 +00:00
common Fix deadlock when logging from a tpool thread. 2017-09-12 18:54:09 -04:00
container Open-code eventlet.listen() 2017-05-15 09:49:40 -07:00
obj Merge "Fix race when consolidating new partition" into stable/newton 2017-05-15 22:15:51 +00:00
proxy Open-code eventlet.listen() 2017-05-15 09:49:40 -07:00
test_locale monkeypatch thread for keystoneclient 2015-11-03 16:36:19 +01:00
__init__.py Make ECDiskFileReader check fragment metadata 2016-11-03 12:02:40 +00:00
helpers.py Open-code eventlet.listen() 2017-05-15 09:49:40 -07:00