【问题标题】:JNI ERROR (app bug): local reference table overflow (max=512) even with out Native CodeJNI ERROR (app bug): local reference table overflow (max=512) 即使没有本机代码
【发布时间】:2016-05-22 20:12:09
【问题描述】:

我们最近推出了我们的应用程序,实际上是从以前的版本升级..

突然我们开始在大量设备中看到这个错误..我们不知道发生了什么,日志非常模糊..

在此处附上日志。但是任何帮助或一些线索都可能帮助我们调试问题。


构建指纹:'Verizon/zeroltevzw/zeroltevzw:5.1.1/LMY47X/G925VVRU4BOK7:user/release-keys'

修订:'10'

ABI:'arm64'

pid:31610,tid:31610,名称:st.mediamanager >>>

信号6(SIGABRT),代码-6(SI_TKILL),故障地址--------

中止消息:'sart/runtime/indirect_reference_table.cc:98] JNI ERROR (app bug): local reference table overflow (max=512)'

x0   0000000000000000  x1   0000000000007b7a  x2   0000000000000006  x3   0000007fa219fe30

x4   0000007fa219fe30  x5   0000000000000005  x6   0000000000000001  x7   0000000000000020

x8   0000000000000083  x9   00000000000000ca  x10  0000007fa1f2a000  x11  0000000000000001

x12  0000000000000001  x13  0000007fa1f2a000  x14  c4aa4c0daad90e20  x15  0000007f92002a31

x16  0000007fa1f2a610  x17  0000007fa1eca174  x18  0000000000000000  x19  0000007fa219fe30

x20  0000007fa21a00e8  x21  0000007fa1f30000  x22  0000000000000001  x23  0000000000000006

x24  0000007fee90e2d0  x25  0000007f9e0a6000  x26  0000007fee90e2c8  x27  0000007f9dffd520

x28  0000007f9e0a6000  x29  0000007fee90e150  x30  0000007fa1e8c264

sp   0000007fee90e150  pc   0000007fa1eca17c  pstate 0000000060000000

回溯:

#00 pc 000000000005e17c  /system/lib64/libc.so (tgkill+8)

#01 pc 0000000000020260  /system/lib64/libc.so (pthread_kill+160)

#02 pc 0000000000021794  /system/lib64/libc.so (raise+28)

#03 pc 000000000001b17c  /system/lib64/libc.so (abort+60)

#04 pc 0000000000310534  /system/lib64/libart.so (art::Runtime::Abort()+300)

#05 pc 00000000000d5378  /system/lib64/libart.so (art::LogMessage::~LogMessage()+2684)

#06 pc 00000000001e7ff0  /system/lib64/libart.so (art::IndirectReferenceTable::Add(unsigned int, art::mirror::Object*)+416)

#07 pc 00000000002e28cc  /system/lib64/libart.so (art::VMClassLoader_findLoadedClass(_JNIEnv*, _jclass*, _jobject*, _jstring*)+248)

#08 pc 000000000002a5dc  /system/framework/arm64/boot.oat

构建指纹:'Verizon/trltevzw/trltevzw:5.1.1/LMY47X/N910VVRU2BPA1:user/release-keys' 修订:'12' ABI:“手臂” pid:481,tid:481,名称:st.mediamanager >>>

回溯: #00 pc 00038854 /system/lib/libc.so (tgkill+12) #01 pc 00014711 /system/lib/libc.so (pthread_kill+52) #02 pc 0001532f /system/lib/libc.so (raise+10) #03 pc 00011bc9 /system/lib/libc.so (__libc_android_abort+36) #04 pc 0001003c /system/lib/libc.so (abort+4) #05 pc 00230cd1 /system/lib/libart.so (art::Runtime::Abort()+160) #06 pc 000ac58b /system/lib/libart.so (art::LogMessage::~LogMessage()+1322) #07 pc 0016996d /system/lib/libart.so (art::IndirectReferenceTable::Add(unsigned int, art::mirror::Object*)+244) #08 pc 00214f43 /system/lib/libart.so (art::VMClassLoader_findLoadedClass(_JNIEnv*, _jclass*, _jobject*, _jstring*)+162) #09 pc 0001bd8d /system/framework/arm/boot.oat


构建指纹:'Verizon/zenltevzw/zenltevzw:5.1.1/LMY47X/G928VVRU2AOJ3:user/release-keys' 修订:'9' ABI:'arm64' pid:18658,tid:18658,名称:st.mediamanager >>>

回溯:

#00 pc 000000000005e0dc  /system/lib64/libc.so (tgkill+8)
#01 pc 0000000000020220  /system/lib64/libc.so (pthread_kill+160)
#02 pc 0000000000021754  /system/lib64/libc.so (raise+28)
#03 pc 000000000001b13c  /system/lib64/libc.so (abort+60)
#04 pc 00000000002ffca4  /system/lib64/libart.so (art::Runtime::Abort()+300)
#05 pc 00000000000d15b8  /system/lib64/libart.so (art::LogMessage::~LogMessage()+2684)
#06 pc 00000000002ad730  /system/lib64/libart.so (art::Monitor::VisitLocks(art::StackVisitor*, void (*)(art::mirror::Object*, void*), void*, bool)+952

#07 pc 0000000000314978  /system/lib64/libart.so (art::StackDumpVisitor::VisitFrame()+568)
#08 pc 000000000030ba08  /system/lib64/libart.so (art::StackVisitor::WalkStack(bool)+308)
#09 pc 0000000000313754  /system/lib64/libart.so (art::Thread::DumpJavaStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const+268)
#10 pc 0000000000313968  /system/lib64/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const+272)
#11 pc 000000000031e8dc  /system/lib64/libart.so (art::ThreadList::DumpLocked(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)+100)
#12 pc 00000000002ffd34  /system/lib64/libart.so (art::Runtime::Abort()+444)
#13 pc 00000000000d15b8  /system/lib64/libart.so (art::LogMessage::~LogMessage()+2684)
#14 pc 00000000001d7468  /system/lib64/libart.so (art::IndirectReferenceTable::Add(unsigned int, art::mirror::Object*)+416)
#15 pc 00000000002d2018  /system/lib64/libart.so (art::VMClassLoader_findLoadedClass(_JNIEnv*, _jclass*, _jobject*, _jstring*)+248)
#16 pc 000000000002a5dc  /system/framework/arm64/boot.oat

构建指纹:'Verizon/kltevzw/kltevzw:5.0/LRX21T/G900VVRU2BOK3:user/release-keys'

修订:'14'

ABI:“手臂”

pid:32148,tid:32148,名称:st.mediamanager >>>

信号6(SIGABRT),代码-6(SI_TKILL),故障地址--------

中止消息:'art/runtime/indirect_reference_table.cc:113] JNI ERROR (app bug): local reference table overflow (max=512)'

r0 00000000  r1 00007d94  r2 00000006  r3 00000000

r4 b6f92114  r5 00000006  r6 00000016  r7 0000010c

r8 00000000  r9 b4e4f520  sl b4e07800  fp 000004ba

ip 00007d94  sp be8a3b38  lr b6f1bfd1  pc b6f40268  cpsr 60070010

回溯:

#00 pc 00038268  /system/lib/libc.so (tgkill+12)

#01 pc 00013fcd  /system/lib/libc.so (pthread_kill+52)

#02 pc 00014beb  /system/lib/libc.so (raise+10)

#03 pc 00011531  /system/lib/libc.so (__libc_android_abort+36)

#04 pc 0000fcbc  /system/lib/libc.so (abort+4)

#05 pc 0021d5d9  /system/lib/libart.so (art::Runtime::Abort()+160)

#06 pc 000a834b  /system/lib/libart.so (art::LogMessage::~LogMessage()+1322)

#07 pc 001574b7  /system/lib/libart.so (art::IndirectReferenceTable::Add(unsigned int, art::mirror::Object*)+346)

#08 pc 002010d5  /system/lib/libart.so (art::VMClassLoader_findLoadedClass(_JNIEnv*, _jclass*, _jobject*, _jstring*)+136)


#09 pc 0001b151  /system/framework/arm/boot.oat

【问题讨论】:

    标签: android


    【解决方案1】:

    我没有完整的答案,但是太长了,无法发表评论,所以我将其作为一个发布。

    所以这个错误正是你所期望的——它调用了本机代码,导致你有超过 512 个对象与本机共享。通常这是由于某处泄漏而发生的。而且您不需要直接使用本机代码来执行此操作-该框架在幕后进行了大量本机调用。

    从堆栈跟踪 - 我看到它的 libart.so,而不是 libdalvik.so。所以这发生在从 Dalvik VM 切换到 Art 的新设备上。堆栈跟踪看起来像是在尝试加载一个类并为一些 JNI 代码添加对它的引用,但我不能确定这一点。我确实知道我们已经看到在 dalvik 上不存在的 Art 上的类加载错误。

    如果您有任何本机代码,我会确保您正确地释放了对 java 内存和类的所有引用。如果你不这样做 - 这可能是 Art 中的一个错误,知道应用程序在崩溃时正在做什么会很有用。崩溃是否一致?如果有,你在做什么?

    【讨论】:

    • 我们刚刚开始在 Google Play 崩溃中看到它。我们公司中没有人能够重现它,或者我们没有人在我们的 QA 周期中发现这个错误。我们只是碰巧在崩溃报告中看到了很多这样的情况。可能是崩溃是一致的,但此时我们没有比这些日志更多的详细信息。
    猜你喜欢
    • 2014-12-28
    • 2016-12-01
    • 2012-06-21
    • 2017-06-06
    • 2020-11-30
    • 2017-07-24
    • 2012-03-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多