From 0b8f1bfdfc721a41d98d13e12c4c67f62f698dfc Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Thu, 10 Dec 2015 17:11:07 -0800 Subject: 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 --- runtime/runtime.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'runtime/runtime.cc') diff --git a/runtime/runtime.cc b/runtime/runtime.cc index b6ba54f2b4..ee703eca39 100644 --- a/runtime/runtime.cc +++ b/runtime/runtime.cc @@ -1302,6 +1302,11 @@ void Runtime::RegisterRuntimeNativeMethods(JNIEnv* env) { } 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); -- cgit v1.2.3-59-g8ed1b