aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@yahooinc.com>2022-06-02 09:48:37 +0000
committerTor Brede Vekterli <vekterli@yahooinc.com>2022-06-02 14:20:57 +0000
commitd0701928d86487e5331bd8159cf7da49004edbef (patch)
tree179eaec4ca06cfeae581ed798aa0f7b5e8518b46 /vespalib
parent714d3bf6b0a4b60dde75143c3062cdddf69af093 (diff)
Let deadlock detector dump stack of potentially deadlocked threads
Enable cross-thread stack tracing as part of signal handler init code in both storage and proton daemons. Make deadlock detector parameters live configurable. Remove existing `restart` config definition annotations to reflect this. Remove dumping of bucket DB locks which hasn't really worked for a long time now.
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/vespa/vespalib/util/document_runnable.cpp5
-rw-r--r--vespalib/src/vespa/vespalib/util/document_runnable.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/vespalib/src/vespa/vespalib/util/document_runnable.cpp b/vespalib/src/vespa/vespalib/util/document_runnable.cpp
index d7534514f41..c0af72dbbb1 100644
--- a/vespalib/src/vespa/vespalib/util/document_runnable.cpp
+++ b/vespalib/src/vespa/vespalib/util/document_runnable.cpp
@@ -72,6 +72,11 @@ bool Runnable::join() const
return true;
}
+FastOS_ThreadId Runnable::native_thread_id() const noexcept
+{
+ return GetThread()->GetThreadId();
+}
+
void Runnable::Run(FastOS_ThreadInterface*, void*)
{
{
diff --git a/vespalib/src/vespa/vespalib/util/document_runnable.h b/vespalib/src/vespa/vespalib/util/document_runnable.h
index 5ca344ea7ef..89388bac34c 100644
--- a/vespalib/src/vespa/vespalib/util/document_runnable.h
+++ b/vespalib/src/vespa/vespalib/util/document_runnable.h
@@ -88,6 +88,8 @@ public:
* Checks if runnable is running or not. (Started is considered running)
*/
[[nodiscard]] bool running() const noexcept;
+
+ FastOS_ThreadId native_thread_id() const noexcept;
};
}