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
Change-Id: I365612a3a34ca6d3215892e6c54b649b93365c80
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index b6ba54f..ee703ec 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -1302,6 +1302,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);