Module: check_mk
Branch: master
Commit: 176d9cdfc22b69adf69540d79b7cc8488d061f53
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=176d9cdfc22b69…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Mar 5 14:45:40 2013 +0100
FIX: fix deadlock due to lock on contacts.mk
---
ChangeLog | 1 +
web/htdocs/index.py | 3 +++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8b70289..c7a6884 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -96,6 +96,7 @@
* FIX: sidebar snapins which refresh do not register for restart detection anymore
* FIX: fix user database corruption in case of a race condition
* FIX: added checks wether or not a contactgroup can be deleted
+ * FIX: Avoid deadlock due to lock on contacts.mk in some situations
* Changed sidebar snapin reload to a global interval (option:
sidebar_update_interval), defaults to 30 seconds
* Sidebar snapins are now bulk updated with one HTTP request each interval
diff --git a/web/htdocs/index.py b/web/htdocs/index.py
index ffd836c..81fd8a8 100644
--- a/web/htdocs/index.py
+++ b/web/htdocs/index.py
@@ -236,6 +236,7 @@ def handler(req, profiling = True):
retcode = cProfile.run("import index; from mod_python import apache;
index.handler(apache._profiling_req, False)", profilefile)
file(profilefile + ".py",
"w").write("#!/usr/bin/python\nimport pstats\nstats =
pstats.Stats(%r)\nstats.sort_stats('time').print_stats()\n" % profilefile)
os.chmod(profilefile + ".py", 0755)
+ release_all_locks()
return apache.OK
# Make sure all plugins are avaiable as early as possible. At least
@@ -271,6 +272,7 @@ def handler(req, profiling = True):
handler()
except Exception, e:
html.write(str(e))
+ release_all_locks()
return apache.OK
# Prepare output format
@@ -300,6 +302,7 @@ def handler(req, profiling = True):
req.myfile = req.uri.split("/")[-1][:-3]
handler = pagehandlers.get(req.myfile, page_not_found)
else:
+ release_all_locks()
return result
# Call userdb page hooks which are executed on a regular base to e.g. syncronize