我在没有自定义ROM的nvidia屏蔽平板电脑k1上使用,我对valgrind和我的android设备存在一些问题。当我这样做时:
setenforce 0
setprop wrap.<mypackage> "logwrapper/data/local/valgrind.sh"
然后启动我的应用程序,我的平板电脑因以下日志跟踪而崩溃:
02-04 12:58:27.845 10242 10242 E Zygote : Unsupported st_mode 4480
02-04 12:58:27.845 10242 10242 E Zygote : Unsupported st_mode 4480
02-04 12:58:27.845 10242 10242 F art : art/runtime/jni_internal.cc:492] JNI FatalError called: frameworks/base/core/jni/com_android_internal_os_Zygote.cpp:482: Unable to restat file descriptor table.
02-04 12:58:27.895 10242 10242 F art : art/runtime/runtime.cc:403] Runtime aborting...
02-04 12:58:27.896 10242 10242 F art : art/runtime/runtime.cc:403] Aborting thread:
02-04 12:58:27.896 10242 10242 F art : art/runtime/runtime.cc:403] "main" prio=5 tid=1 Native
02-04 12:58:27.896 10242 10242 F art : art/runtime/runtime.cc:403] | group="" sCount=0 dsCount=0 obj=0x748e6f60 self=0xae708400
02-04 12:58:27.896 10242 10242 F art : art/runtime/runtime.cc:403] | sysTid=10242 nice=0 cgrp=default sched=0/0 handle=0xb14d4534
02-04 12:58:27.896 10242 10242 F art : art/runtime/runtime.cc:403] | state=R schedstat=( 0 0 0 ) utm=104 stm=103 core=2 HZ=100
02-04 12:58:27.896 10242 10242 F art : art/runtime/runtime.cc:403] | stack=0xbe047000-0xbe049000 stackSize=8MB
02-04 12:58:27.896 10242 10242 F art : art/runtime/runtime.cc:403] | held mutexes= "abort lock"
02-04 12:58:27.896 10242 10242 F art : art/runtime/runtime.cc:403] native: #00 pc 0034f9e1 /system/lib/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+128)
02-04 12:58:27.896 10242 10242 F art : art/runtime/runtime.cc:403] native: #01 pc 00330105 /system/lib/libart.so (_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+304)
02-04 12:58:27.896 10242 10242 F art : art/runtime/runtime.cc:403] native: #02 pc 003231d9 /system/lib/libart.so (_ZNK3art10AbortState10DumpThreadERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPNS_6ThreadE+24)
02-04 12:58:27.896 10242 10242 F art : art/runtime/runtime.cc:403] native: #03 pc 00323061 /system/lib/libart.so (_ZNK3art10AbortState4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEE+424)
02-04 12:58:27.896 10242 10242 F art : art/runtime/runtime.cc:403] native: #04 pc 00319edf /system/lib/libart.so (_ZN3art7Runtime5AbortEv+90)
02-04 12:58:27.896 10242 10242 F art : art/runtime/runtime.cc:403] native: #05 pc 000b4977 /system/lib/libart.so (_ZN3art10LogMessageD2Ev+866)
02-04 12:58:27.898 10242 10242 F art : art/runtime/runtime.cc:403] native: #06 pc 0026255f /system/lib/libart.so (_ZN3art3JNI10FatalErrorEP7_JNIEnvPKc+94)
02-04 12:58:27.898 10242 10242 F art : art/runtime/runtime.cc:403] native: #07 pc 000c64c1 /system/lib/libandroid_runtime.so (???)
02-04 12:58:27.898 10242 10242 F art : art/runtime/runtime.cc:403] native: #08 pc 000c68f1 /system/lib/libandroid_runtime.so (???)
02-04 12:58:27.898 10242 10242 F art : art/runtime/runtime.cc:403] native: #09 pc 000c72c5 /system/lib/libandroid_runtime.so (???)
02-04 12:58:27.898 10242 10242 F art : art/runtime/runtime.cc:403] native: #10 pc 01098d61 /data/dalvik-cache/arm/system@framework@boot.oat (???)
02-04 12:58:27.898 10242 10242 F art : art/runtime/runtime.cc:403] at com.android.internal.os.Zygote.nativeForkAndSpecialize(Native method)
02-04 12:58:27.898 10242 10242 F art : art/runtime/runtime.cc:403] at com.android.internal.os.Zygote.forkAndSpecialize(Zygote.java:95)
02-04 12:58:27.898 10242 10242 F art : art/runtime/runtime.cc:403] at com.android.internal.os.ZygoteConnection.runOnce(ZygoteConnection.java:225)
02-04 12:58:27.898 10242 10242 F art : art/runtime/runtime.cc:403] at com.android.internal.os.ZygoteInit.runSelectLoop(ZygoteInit.java:829)
02-04 12:58:27.898 10242 10242 F art : art/runtime/runtime.cc:403] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:751)
02-04 12:58:27.898 10242 10242 F art : art/runtime/runtime.cc:403] Dumping all threads without appropriate locks held: thread list lock mutator lock
02-04 12:58:27.898 10242 10242 F art : art/runtime/runtime.cc:403] All threads:
02-04 12:58:27.898 10242 10242 F art : art/runtime/runtime.cc:403] DALVIK THREADS (1):
02-04 12:58:27.898 10242 10242 F art : art/runtime/runtime.cc:403] "main" prio=5 tid=1 Runnable
02-04 12:58:27.898 10242 10242 F art : art/runtime/runtime.cc:403] | group="" sCount=0 dsCount=0 obj=0x748e6f60 self=0xae708400
02-04 12:58:27.898 10242 10242 F art : art/runtime/runtime.cc:403] | sysTid=10242 nice=0 cgrp=default sched=0/0 handle=0xb14d4534
02-04 12:58:27.898 10242 10242 F art : art/runtime/runtime.cc:403] | state=R schedstat=( 0 0 0 ) utm=104 stm=104 core=1 HZ=100
02-04 12:58:27.899 10242 10242 F art : art/runtime/runtime.cc:403] | stack=0xbe047000-0xbe049000 stackSize=8MB
02-04 12:58:27.899 10242 10242 F art : art/runtime/runtime.cc:403] | held mutexes= "abort lock" "mutator lock"(shared held)
02-04 12:58:27.899 10242 10242 F art : art/runtime/runtime.cc:403] native: #00 pc 0034f9e1 /system/lib/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+128)
02-04 12:58:27.899 10242 10242 F art : art/runtime/runtime.cc:403] native: #01 pc 00330105 /system/lib/libart.so (_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+304)
02-04 12:58:27.899 10242 10242 F art : art/runtime/runtime.cc:403] native: #02 pc 00342053 /system/lib/libart.so (_ZN3art14DumpCheckpoint3RunEPNS_6ThreadE+622)
02-04 12:58:27.899 10242 10242 F art : art/runtime/runtime.cc:403] native: #03 pc 0033bfe1 /system/lib/libart.so (_ZN3art10ThreadList13RunCheckpointEPNS_7ClosureE+336)
02-04 12:58:27.899 10242 10242 F art : art/runtime/runtime.cc:403] native: #04 pc 0033bd01 /system/lib/libart.so (_ZN3art10ThreadList4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEb+180)
02-04 12:58:27.899 10242 10242 F art : art/runtime/runtime.cc:403] native: #05 pc 0032302d /system/lib/libart.so (_ZNK3art10AbortState4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEE+372)
02-04 12:58:27.899 10242 10242 F art : art/runtime/runtime.cc:403] native: #06 pc 00319edf /system/lib/libart.so (_ZN3art7Runtime5AbortEv+90)
02-04 12:58:27.899 10242 10242 F art : art/runtime/runtime.cc:403] native: #07 pc 000b4977 /system/lib/libart.so (_ZN3art10LogMessageD2Ev+866)
02-04 12:58:27.899 10242 10242 F art : art/runtime/runtime.cc:403] native: #08 pc 0026255f /system/lib/libart.so (_ZN3art3JNI10FatalErrorEP7_JNIEnvPKc+94)
02-04 12:58:27.899 10242 10242 F art : art/runtime/runtime.cc:403] native: #09 pc 000c64c1 /system/lib/libandroid_runtime.so (???)
02-04 12:58:27.899 10242 10242 F art : art/runtime/runtime.cc:403] native: #10 pc 000c68f1 /system/lib/libandroid_runtime.so (???)
02-04 12:58:27.899 10242 10242 F art : art/runtime/runtime.cc:403] native: #11 pc 000c72c5 /system/lib/libandroid_runtime.so (???)
02-04 12:58:27.899 10242 10242 F art : art/runtime/runtime.cc:403] native: #12 pc 01098d61 /data/dalvik-cache/arm/system@framework@boot.oat (Java_com_android_internal_os_Zygote_nativeForkAndSpecialize__II_3II_3_3IILjava_lang_String_2Ljava_lang_String_2_3ILjava_lang_String_2Ljava_lang_String_2+292)
02-04 12:58:27.900 10242 10242 F art : art/runtime/runtime.cc:403] at com.android.internal.os.Zygote.nativeForkAndSpecialize(Native method)
02-04 12:58:27.900 10242 10242 F art : art/runtime/runtime.cc:403] at com.android.internal.os.Zygote.forkAndSpecialize(Zygote.java:95)
02-04 12:58:27.900 10242 10242 F art : art/runtime/runtime.cc:403] at com.android.internal.os.ZygoteConnection.runOnce(ZygoteConnection.java:225)
02-04 12:58:27.900 10242 10242 F art : art/runtime/runtime.cc:403] at com.android.internal.os.ZygoteInit.runSelectLoop(ZygoteInit.java:829)
02-04 12:58:27.900 10242 10242 F art : art/runtime/runtime.cc:403] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:751)
02-04 12:58:27.900 10242 10242 F art : art/runtime/runtime.cc:403]
02-04 12:58:27.900 10242 10242 F art : art/runtime/runtime.cc:403]
02-04 12:58:27.900 10242 10242 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 10242 (main)
02-04 12:58:27.967 14921 14921 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-04 12:58:27.967 14921 14921 F DEBUG : Build fingerprint: 'nvidia/sb_na_wf/shieldtablet:7.0/NRD90M/1928188_1065.2559:user/release-keys'
02-04 12:58:27.968 14921 14921 F DEBUG : Revision: '0'
02-04 12:58:27.968 14921 14921 F DEBUG : ABI: 'arm'
02-04 12:58:27.968 14921 14921 F DEBUG : pid: 10242, tid: 10242, name: main >>> zygote <<<
02-04 12:58:27.968 14921 14921 F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
02-04 12:58:27.971 14921 14921 F DEBUG : Abort message: 'art/runtime/jni_internal.cc:492] JNI FatalError called: frameworks/base/core/jni/com_android_internal_os_Zygote.cpp:482: Unable to restat file descriptor table.'
02-04 12:58:27.971 14921 14921 F DEBUG : r0 00000000 r1 00002802 r2 00000006 r3 00000008
02-04 12:58:27.971 14921 14921 F DEBUG : r4 b14d458c r5 00000006 r6 b14d4534 r7 0000010c
02-04 12:58:27.971 14921 14921 F DEBUG : r8 afc22478 r9 af0e4008 sl be843034 fp afc3413c
02-04 12:58:27.971 14921 14921 F DEBUG : ip 00000002 sp be842f68 lr af09eaf7 pc af0a1360 cpsr 600f0010
02-04 12:58:27.986 14921 14921 F DEBUG :
02-04 12:58:27.986 14921 14921 F DEBUG : backtrace:
02-04 12:58:27.986 14921 14921 F DEBUG : #00 pc 0004a360 /system/lib/libc.so (tgkill+12)
02-04 12:58:27.986 14921 14921 F DEBUG : #01 pc 00047af3 /system/lib/libc.so (pthread_kill+34)
02-04 12:58:27.986 14921 14921 F DEBUG : #02 pc 0001db6d /system/lib/libc.so (raise+10)
02-04 12:58:27.986 14921 14921 F DEBUG : #03 pc 000196b9 /system/lib/libc.so (__libc_android_abort+34)
02-04 12:58:27.987 14921 14921 F DEBUG : #04 pc 00017038 /system/lib/libc.so (abort+4)
02-04 12:58:27.987 14921 14921 F DEBUG : #05 pc 00319f81 /system/lib/libart.so (_ZN3art7Runtime5AbortEv+252)
02-04 12:58:27.987 14921 14921 F DEBUG : #06 pc 000b4977 /system/lib/libart.so (_ZN3art10LogMessageD2Ev+866)
02-04 12:58:27.987 14921 14921 F DEBUG : #07 pc 0026255f /system/lib/libart.so (_ZN3art3JNI10FatalErrorEP7_JNIEnvPKc+94)
02-04 12:58:27.987 14921 14921 F DEBUG : #08 pc 000c64c1 /system/lib/libandroid_runtime.so
02-04 12:58:27.987 14921 14921 F DEBUG : #09 pc 000c68f1 /system/lib/libandroid_runtime.so
02-04 12:58:27.987 14921 14921 F DEBUG : #10 pc 000c72c5 /system/lib/libandroid_runtime.so
02-04 12:58:27.987 14921 14921 F DEBUG : #11 pc 74600d61 /data/dalvik-cache/arm/system@framework@boot.oat (offset 0x2789000)
如何在我的Android平板电脑下使用valgrind? (valgrind已正确编译,可执行valgrind正常工作。)
谢谢!