2014-10-29 65 views
3

我已經爲Android目標eabi x86與NDK R10b交叉編譯Valgrind。 按步驟啓動我的應用時,例如here valgrind崩潰。 登錄Valgrind on android 5/L崩潰

10-29 11:16:07.468: D/AndroidRuntime(2240): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<< 
 
10-29 11:16:07.469: D/AndroidRuntime(2240): CheckJNI is ON 
 
10-29 11:16:07.486: E/memtrack(2240): Couldn't load memtrack module (No such file or directory) 
 
10-29 11:16:07.486: E/android.os.Debug(2240): failed to load memtrack module: -2 
 
10-29 11:16:07.500: D/AndroidRuntime(2240): Calling main entry com.android.commands.am.Am 
 
10-29 11:16:07.502: I/ActivityManager(1236): START u0 {act=android.intent.action.MAIN flg=0x10000000 cmp=...} from uid 0 on display 0 
 
10-29 11:16:07.518: D/AndroidRuntime(2240): Shutting down VM 
 
10-29 11:16:07.519: I/art(2240): Debugger is no longer active 
 
10-29 11:16:07.522: E/libprocessgroup(2250): failed to make and chown /acct/uid_10053: Read-only file system 
 
10-29 11:16:07.522: W/Zygote(2250): createProcessGroup failed, kernel missing CONFIG_CGROUP_CPUACCT? 
 
10-29 11:16:07.523: I/art(2250): Not late-enabling -Xcheck:jni (already on) 
 
10-29 11:16:07.524: E/art(2240): Thread attaching while runtime is shutting down: Binder_1 
 
10-29 11:16:07.524: I/AndroidRuntime(2240): NOTE: attach of thread 'Binder_1' failed 
 
10-29 11:16:09.746: D/AndroidRuntime(2264): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<< 
 
10-29 11:16:09.848: D/AndroidRuntime(2264): CheckJNI is ON 
 
10-29 11:16:10.278: I/art(2264): Counter: 1 
 
10-29 11:16:10.318: I/start-valgrind.sh(2263): No [stack] line found in /proc/self/maps! 
 
10-29 11:16:10.321: A/libc(2264): No [stack] line found in /proc/self/maps! 
 
10-29 11:16:10.341: A/libc(2264): Fatal signal 6 (SIGABRT), code -6 in tid 2264 (...) 
 
10-29 11:16:10.580: I/DEBUG(948): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 
 
10-29 11:16:10.580: I/DEBUG(948): Build fingerprint: 'generic_x86/sdk_phone_x86/generic_x86:5.0/LRX09D/1504858:eng/test-keys' 
 
10-29 11:16:10.580: I/DEBUG(948): Revision: '0' 
 
10-29 11:16:10.580: I/DEBUG(948): ABI: 'x86' 
 
10-29 11:16:10.580: I/DEBUG(948): pid: 2264, tid: 2264, name: ... >>> /data/local/Inst/bin/valgrind <<< 
 
10-29 11:16:10.580: I/DEBUG(948): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr -------- 
 
10-29 11:16:10.581: I/DEBUG(948): Abort message: 'No [stack] line found in /proc/self/maps!' 
 
10-29 11:16:10.581: I/DEBUG(948):  eax 00000000 ebx 000008d8 ecx 00000006 edx 00000000 
 
10-29 11:16:10.581: I/DEBUG(948):  esi 00000000 edi 00000000 
 
10-29 11:16:10.581: I/DEBUG(948):  xcs 00000073 xds 0000007b xes 0000007b xfs 00000000 xss 0000007b 
 
10-29 11:16:10.581: I/DEBUG(948):  eip 3806dd52 ebp 00000000 esp 628cfe40 flags 00200202 
 
10-29 11:16:10.581: I/DEBUG(948): backtrace: 
 
10-29 11:16:10.581: I/DEBUG(948):  #00 pc 0006dd52 /data/local/Inst/lib/valgrind/memcheck-x86-linux 
 
10-29 11:16:10.583: W/NativeCrashListener(1236): Couldn't find ProcessRecord for pid 2264 
 
10-29 11:16:10.597: I/DEBUG(948): Tombstone written to: /data/tombstones/tombstone_09 
 
10-29 11:16:10.597: I/BootReceiver(1236): Copying /data/tombstones/tombstone_09 to DropBox (SYSTEM_TOMBSTONE) 
 
10-29 11:16:10.637: I/start-valgrind.sh(2263): start-valgrind.sh terminated by exit(1) 
 
10-29 11:16:10.638: I/Zygote(954): Process 2250 exited cleanly (1) 
 
10-29 11:16:10.639: W/Zygote(954): Error reading pid from wrapped process, child may have died 
 
10-29 11:16:10.639: W/Zygote(954): java.io.EOFException 
 
10-29 11:16:10.639: W/Zygote(954): \t at libcore.io.Streams.readFully(Streams.java:83) 
 
10-29 11:16:10.639: W/Zygote(954): \t at java.io.DataInputStream.readInt(DataInputStream.java:103) 
 
10-29 11:16:10.639: W/Zygote(954): \t at com.android.internal.os.ZygoteConnection.handleParentProc(ZygoteConnection.java:974) 
 
10-29 11:16:10.639: W/Zygote(954): \t at com.android.internal.os.ZygoteConnection.runOnce(ZygoteConnection.java:276) 
 
10-29 11:16:10.639: W/Zygote(954): \t at com.android.internal.os.ZygoteInit.runSelectLoop(ZygoteInit.java:784) 
 
10-29 11:16:10.639: W/Zygote(954): \t at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:690) 
 
10-29 11:16:10.639: W/ActivityManager(1236): Slow operation: 3129ms so far, now at startProcess: returned from zygote! 
 
10-29 11:16:10.639: W/ActivityManager(1236): Slow operation: 3129ms so far, now at startProcess: done updating battery stats 
 
10-29 11:16:10.639: W/ActivityManager(1236): Slow operation: 3129ms so far, now at startProcess: building log message 
 
10-29 11:16:10.639: I/ActivityManager(1236): Start proc ... for activity ...: pid=2250 uid=10053 gids={50053, 9997, 3003, 1028, 1015} abi=x86 
 
10-29 11:16:10.640: W/ActivityManager(1236): Slow operation: 3129ms so far, now at startProcess: starting to update pids map 
 
10-29 11:16:10.640: W/ActivityManager(1236): Slow operation: 3130ms so far, now at startProcess: done updating pids map 
 
10-29 11:16:10.640: W/ActivityManager(1236): Slow operation: 3130ms so far, now at startProcess: done starting proc! 
 
10-29 11:16:17.520: W/ActivityManager(1236): Launch timeout has expired, giving up wake lock! 
 
10-29 11:16:20.650: W/ActivityManager(1236): Process ProcessRecord{1daddf3b 2250:.../u0a53} failed to attach 
 
10-29 11:16:20.650: I/ActivityManager(1236): Killing 2250:.../u0a53 (adj -100): start timeout

  1. 這也發生在我身上的ARM仿真器用於Android的5/L
  2. 我使用Ubuntu的14
  3. 手冊的valgrind推出諸如/數據/本地/ Inst/bin/valgrind/data/local/sample-bin可以毫無問題地工作
  4. 這與工作正常的Valgrind編譯相同ATOR API 18(ARM)
  5. 我試着重新安裝使用 adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 /systemmount -o ro,remount /systemadb root && adb remount 在允許寫入模式的文件系統 - 沒有做的伎倆

有沒有人有任何想法這裏可能是什麼問題?

+0

如何在/ proc/self/maps!中找不到[stack]行?錯誤?你找到了解決方案嗎? – 2016-07-12 16:28:44

回答

3

我從仿真器的控件預覽應用類似的錯誤:

E/libprocessgroup﹕ failed to make and chown /acct/uid_10052: Read-only file system 

各種網絡搜索和實驗後,我發現模擬器/sdcard確實設置爲只讀。 (您可以嘗試在adb shell中嘗試觸摸或推送文件,或使用Android設備管理器來瀏覽文件系統)。

有效的錯誤和解決方法在Issue 78434中描述。

解決方法

  • 轉到您的ADV文件夾中的.android文件夾,找到你的AVD的config.ini文件,例如~/.android/avd/Nexus5_v19.avd/config.ini
  • 用文本編輯器打開它。如果你在Windows上,使用可以處理Unix換行符的文本編輯器。
  • hw.sdCard=no更改爲hw.sdCard=yes
  • 除此之外,重新啓動模擬器,並測試/ sdcard是可寫的。
+1

它一直設置爲yes。它沒有改變任何東西。 – User 2014-11-26 21:04:26

+0

有時甚至使用'hw.sdCard = yes'模擬的SD卡不可寫。當您測試寫入時會發生什麼,例如'adb shell'然後'cd/sdcard && touch foo.txt'?有時我也不得不使用AVD管理器爲AVD創建一個新的模擬SD卡,然後再次檢查'hw.sdCard = yes',然後它是可寫的。無論哪種方式,這可能不是你的問題的(唯一)原因。 – Jerry101 2014-11-26 21:29:00

+0

謝謝!奇蹟般有效 – silly 2014-12-04 14:28:16

0

好吧,我遇到了同樣的問題,上述解決方案對我無效。當我將Firebase存儲添加到我的應用程序後,我發現它恰好發生了。 檢查了build.gradle(Module:app),發現Firebase不同版本發生衝突,將它們全部更改爲相同版本,同步項目,現在它工作:)希望這可以幫助您以後參考。