diff options
author | Josh Gao <jmgao@google.com> | 2021-03-16 01:35:43 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2021-03-16 01:35:43 +0000 |
commit | 3a95fb9b5020797981b08232b4232d38e385729c (patch) | |
tree | a307de28fc5c77175a99a6fe2fa3b1dfefa9c4d5 | |
parent | 2d7f8bcdf440315dc319fdba240aa420a6f214cb (diff) | |
parent | 606e0d12564526da5be5e744b0f93f05ce563440 (diff) |
Merge "fdtrack: emit the most common stack in the abort message."
-rw-r--r-- | services/core/jni/com_android_server_SystemServer.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/services/core/jni/com_android_server_SystemServer.cpp b/services/core/jni/com_android_server_SystemServer.cpp index 729fa71af169..d18043f6b3e9 100644 --- a/services/core/jni/com_android_server_SystemServer.cpp +++ b/services/core/jni/com_android_server_SystemServer.cpp @@ -100,16 +100,9 @@ static void android_server_SystemServer_initZygoteChildHeapProfiling(JNIEnv* /* } static void android_server_SystemServer_fdtrackAbort(JNIEnv*, jobject) { - raise(BIONIC_SIGNAL_FDTRACK); - - // Wait for a bit to allow fdtrack to dump backtraces to logcat. - std::this_thread::sleep_for(5s); - - // Abort on a different thread to avoid ART dumping runtime stacks. - std::thread([]() { - LOG_ALWAYS_FATAL("b/140703823: aborting due to fd leak: check logs for fd " - "backtraces"); - }).join(); + sigval val; + val.sival_int = 1; + sigqueue(getpid(), BIONIC_SIGNAL_FDTRACK, val); } static jlong android_server_SystemServer_startIncrementalService(JNIEnv* env, jclass klass, |