Skip DumpForSigQuit if debugger is active
Otherwise, the SIGQUIT dumping may get blocked on the mutator lock
and freeze the debugger.
Future work: Ideally we want to dump what we can instead of nothing.
Bug: 26118154
(cherry picked from commit 0b8f1bfdfc721a41d98d13e12c4c67f62f698dfc)
Change-Id: I28e5352dab3b8abce0b39850e3e58282ae454b51
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index dedc110..291b9a0 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -1293,6 +1293,11 @@
}
void Runtime::DumpForSigQuit(std::ostream& os) {
+ // Dumping for SIGQIT may cause deadlocks if the the debugger is active. b/26118154
+ if (Dbg::IsDebuggerActive()) {
+ LOG(INFO) << "Skipping DumpForSigQuit due to active debugger";
+ return;
+ }
GetClassLinker()->DumpForSigQuit(os);
GetInternTable()->DumpForSigQuit(os);
GetJavaVM()->DumpForSigQuit(os);