Dump backtrace on `DeleteLocalRef` failures (to debug mmap failures). am: ebf0dac3fa am: ec246a3282

Original change: https://android-review.googlesource.com/c/platform/art/+/2062289

Change-Id: I1988fc6fc7ad5fab849df3cb5cfc8b6acbb2222c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/runtime/jni/jni_internal.cc b/runtime/jni/jni_internal.cc
index 8463bc2..7a25b4b 100644
--- a/runtime/jni/jni_internal.cc
+++ b/runtime/jni/jni_internal.cc
@@ -899,6 +899,8 @@
       // going quite the way they expect.
       LOG(WARNING) << "JNI WARNING: DeleteLocalRef(" << obj << ") "
                    << "failed to find entry";
+      // Investigating b/228295454: Scudo ERROR: internal map failure (NO MEMORY).
+      soa.Self()->DumpJavaStack(LOG_STREAM(WARNING));
     }
   }