检测到堆栈损坏,dalvik VM崩溃

时间:2015-05-11 13:08:53

标签: android dalvik

我在Android平板电脑上运行了一个跟踪器应用程序。我注意到某些平板电脑不时会重新启动。

当我调查问题时发现我收到“检测到堆栈损坏”错误,然后几毫秒后android VM崩溃。

这些崩溃每5分钟到20分钟发生一次,除了跟踪器应用程序运行和使用GPS和3G之外没有其他模式。

这些平板电脑运行android 4.2.2,这是三星最新的更新。

在日志中没有提到我的apk,我的应用程序是纯java。究竟是什么导致了这个问题,我该如何解决?

以下是logcat输出:

05-11 15:33:16.084: A/<unknown>(30963): stack corruption detected: aborted
05-11 15:33:16.116: I/ServiceManager(99): service 'bluetooth_manager' died
05-11 15:33:16.155: I/ServiceManager(99): service 'bluetooth_secure_mode_manager' died
05-11 15:33:16.155: I/ServiceManager(99): service 'input_method' died
05-11 15:33:16.155: I/ServiceManager(99): service 'accessibility' died
05-11 15:33:16.155: I/ServiceManager(99): service 'meminfo' died
05-11 15:33:16.155: I/ServiceManager(99): service 'DirEncryptService' died
05-11 15:33:16.155: I/ServiceManager(99): service 'container_service' died
05-11 15:33:16.155: I/ServiceManager(99): service 'audio' died
05-11 15:33:16.155: I/ServiceManager(99): service 'wallpaper' died
05-11 15:33:16.155: I/ServiceManager(99): service 'display' died
05-11 15:33:16.155: I/ServiceManager(99): service 'power' died
05-11 15:33:16.155: I/ServiceManager(99): service 'activity' died
05-11 15:33:16.155: I/ServiceManager(99): service 'CustomFrequencyManagerService' died
05-11 15:33:16.155: I/ServiceManager(99): service 'gfxinfo' died
05-11 15:33:16.155: I/ServiceManager(99): service 'usagestats' died
05-11 15:33:16.155: I/ServiceManager(99): service 'content' died
05-11 15:33:16.155: I/ServiceManager(99): service 'log_manager_service' died
05-11 15:33:16.155: I/ServiceManager(99): service 'cpuinfo' died
05-11 15:33:16.155: I/ServiceManager(99): service 'account' died
05-11 15:33:16.155: I/ServiceManager(99): service 'telephony.registry' died
05-11 15:33:16.155: I/ServiceManager(99): service 'battery' died
05-11 15:33:16.155: I/ServiceManager(99): service 'entropy' died
05-11 15:33:16.155: I/ServiceManager(99): service 'mount' died
05-11 15:33:16.155: I/ServiceManager(99): service 'sensorservice' died
05-11 15:33:16.155: I/ServiceManager(99): service 'dbinfo' died
05-11 15:33:16.155: I/ServiceManager(99): service 'vibrator' died
05-11 15:33:16.155: I/ServiceManager(99): service 'mdm.remotedesktop' died
05-11 15:33:16.155: I/ServiceManager(99): service 'alarm' died
05-11 15:33:16.155: I/ServiceManager(99): service 'scheduling_policy' died
05-11 15:33:16.155: I/ServiceManager(99): service 'hardware' died
05-11 15:33:16.155: I/ServiceManager(99): service 'user' died
05-11 15:33:16.155: I/ServiceManager(99): service 'permission' died
05-11 15:33:16.155: I/ServiceManager(99): service 'batteryinfo' died
05-11 15:33:16.155: I/ServiceManager(99): service 'edmnativehelper' died
05-11 15:33:16.155: I/ServiceManager(99): service 'harmony_eas_service' died
05-11 15:33:16.155: I/ServiceManager(99): service 'enterprise_policy' died
05-11 15:33:16.155: I/ServiceManager(99): service 'remoteinjection' died
05-11 15:33:16.155: I/ServiceManager(99): service 'clipboard' died
05-11 15:33:16.155: I/ServiceManager(99): service 'clipboardEx' died
05-11 15:33:16.155: I/ServiceManager(99): service 'netstats' died
05-11 15:33:16.155: I/ServiceManager(99): service 'textservices' died
05-11 15:33:16.155: I/ServiceManager(99): service 'statusbar' died
05-11 15:33:16.155: I/ServiceManager(99): service 'application_policy' died
05-11 15:33:16.155: I/ServiceManager(99): service 'wifi_policy' died
05-11 15:33:16.155: I/ServiceManager(99): service 'package' died
05-11 15:33:16.155: I/ServiceManager(99): service 'phone_restriction_policy' died
05-11 15:33:16.155: I/ServiceManager(99): service 'network_management' died
05-11 15:33:16.155: I/ServiceManager(99): service 'enterprise_license_policy' died
05-11 15:33:16.155: I/ServiceManager(99): service 'window' died
05-11 15:33:16.155: I/ServiceManager(99): service 'input' died
05-11 15:33:16.155: I/ServiceManager(99): service 'netpolicy' died
05-11 15:33:16.155: I/ServiceManager(99): service 'multiwindow' died
05-11 15:33:16.155: I/ServiceManager(99): service 'wifip2p' died
05-11 15:33:16.155: I/ServiceManager(99): service 'sec_analytics' died
05-11 15:33:16.155: I/ServiceManager(99): service 'wifi' died
05-11 15:33:16.155: I/ServiceManager(99): service 'wfd' died
05-11 15:33:16.155: I/ServiceManager(99): service 'notification' died
05-11 15:33:16.155: I/ServiceManager(99): service 'dropbox' died
05-11 15:33:16.155: I/ServiceManager(99): service 'devicestoragemonitor' died
05-11 15:33:16.155: I/ServiceManager(99): service 'search' died
05-11 15:33:16.155: I/ServiceManager(99): service 'country_detector' died
05-11 15:33:16.155: I/ServiceManager(99): service 'location' died
05-11 15:33:16.155: I/ServiceManager(99): service 'updatelock' died
05-11 15:33:16.155: I/ServiceManager(99): service 'throttle' died
05-11 15:33:16.155: I/ServiceManager(99): service 'servicediscovery' died
05-11 15:33:16.155: I/ServiceManager(99): service 'connectivity' died
05-11 15:33:16.155: I/ServiceManager(99): service 'lock_settings' died
05-11 15:33:16.155: I/ServiceManager(99): service 'device_policy' died
05-11 15:33:16.155: I/ServiceManager(99): service 'usb' died
05-11 15:33:16.155: I/ServiceManager(99): service 'serial' died
05-11 15:33:16.155: I/ServiceManager(99): service 'uimode' died
05-11 15:33:16.155: I/ServiceManager(99): service 'backup' died
05-11 15:33:16.155: I/ServiceManager(99): service 'appwidget' died
05-11 15:33:16.155: I/ServiceManager(99): service 'diskstats' died
05-11 15:33:16.155: I/ServiceManager(99): service 'AtCmdFwd' died
05-11 15:33:16.155: I/ServiceManager(99): service 'samplingprofiler' died
05-11 15:33:16.155: I/ServiceManager(99): service 'commontime_management' died
05-11 15:33:16.155: I/ServiceManager(99): service 'motion_recognition' died
05-11 15:33:16.155: I/ServiceManager(99): service 'voip' died
05-11 15:33:16.155: I/ServiceManager(99): service 'dreams' died
05-11 15:33:16.155: I/ServiceManager(99): service 'license_log_service' died
05-11 15:33:16.162: W/AudioFlinger(30688): power manager service died !!!
05-11 15:33:16.170: I/audio_policy_mrvl(30688): mrvl_ap_dev_release_output: 2 (hardware output)
05-11 15:33:16.170: I/audio_policy_mrvl(30688): mrvl_ap_dev_release_output: 2 (hardware output)
05-11 15:33:16.178: W/Sensors(31110): sensorservice died [0x5d194240]
05-11 15:33:16.178: W/Sensors(31315): sensorservice died [0x5d1b4d70]
05-11 15:33:16.178: W/Sensors(31217): sensorservice died [0x5bab4fa0]
05-11 15:33:16.178: W/Sensors(31204): sensorservice died [0x5d1ae190]
05-11 15:33:16.178: W/Sensors(2742): sensorservice died [0x5d13c0e8]
05-11 15:33:16.186: D/SurfaceFlinger(111): Screen acquired, type=0 flinger=0x405083c8
05-11 15:33:16.186: D/SurfaceFlinger(111):  screen was previously acquired
05-11 15:33:16.373: D/AndroidRuntime(31204): Shutting down VM
05-11 15:33:16.373: W/dalvikvm(31204): threadid=1: thread exiting with uncaught exception (group=0x40dee930)
05-11 15:33:16.420: E/AndroidRuntime(31204): FATAL EXCEPTION: main
05-11 15:33:16.420: E/AndroidRuntime(31204): java.lang.RuntimeException: android.os.DeadObjectException
05-11 15:33:16.420: E/AndroidRuntime(31204):    at android.net.TrafficStats.getMobileIfaces(TrafficStats.java:641)
05-11 15:33:16.420: E/AndroidRuntime(31204):    at android.net.TrafficStats.getMobileTxPackets(TrafficStats.java:270)
05-11 15:33:16.420: E/AndroidRuntime(31204):    at com.android.internal.telephony.DataConnectionTracker$TxRxSum.updateTxRxSum(DataConnectionTracker.java:510)
05-11 15:33:16.420: E/AndroidRuntime(31204):    at com.android.internal.telephony.DataConnectionTracker.updateDataActivity(DataConnectionTracker.java:1566)
05-11 15:33:16.420: E/AndroidRuntime(31204):    at com.android.internal.telephony.DataConnectionTracker$2.run(DataConnectionTracker.java:431)
05-11 15:33:16.420: E/AndroidRuntime(31204):    at android.os.Handler.handleCallback(Handler.java:725)
05-11 15:33:16.420: E/AndroidRuntime(31204):    at android.os.Handler.dispatchMessage(Handler.java:92)
05-11 15:33:16.420: E/AndroidRuntime(31204):    at android.os.Looper.loop(Looper.java:176)
05-11 15:33:16.420: E/AndroidRuntime(31204):    at android.app.ActivityThread.main(ActivityThread.java:5365)
05-11 15:33:16.420: E/AndroidRuntime(31204):    at java.lang.reflect.Method.invokeNative(Native Method)
05-11 15:33:16.420: E/AndroidRuntime(31204):    at java.lang.reflect.Method.invoke(Method.java:511)
05-11 15:33:16.420: E/AndroidRuntime(31204):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
05-11 15:33:16.420: E/AndroidRuntime(31204):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
05-11 15:33:16.420: E/AndroidRuntime(31204):    at dalvik.system.NativeStart.main(Native Method)
05-11 15:33:16.420: E/AndroidRuntime(31204): Caused by: android.os.DeadObjectException
05-11 15:33:16.420: E/AndroidRuntime(31204):    at android.os.BinderProxy.transact(Native Method)
05-11 15:33:16.420: E/AndroidRuntime(31204):    at android.net.INetworkStatsService$Stub$Proxy.getMobileIfaces(INetworkStatsService.java:232)
05-11 15:33:16.420: E/AndroidRuntime(31204):    at android.net.TrafficStats.getMobileIfaces(TrafficStats.java:639)
05-11 15:33:16.420: E/AndroidRuntime(31204):    ... 13 more
05-11 15:33:16.452: E/installd(116): eof
05-11 15:33:16.452: E/installd(116): failed to read size
05-11 15:33:16.452: I/installd(116): closing connection
05-11 15:33:16.452: I/Process(31204): Sending signal. PID: 31204 SIG: 9
05-11 15:33:16.452: E/AndroidRuntime(31204): Error reporting crash
05-11 15:33:16.452: E/AndroidRuntime(31204): android.os.DeadObjectException
05-11 15:33:16.452: E/AndroidRuntime(31204):    at android.os.BinderProxy.transact(Native Method)
05-11 15:33:16.452: E/AndroidRuntime(31204):    at android.app.ActivityManagerProxy.handleApplicationCrash(ActivityManagerNative.java:3624)
05-11 15:33:16.452: E/AndroidRuntime(31204):    at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:138)
05-11 15:33:16.452: E/AndroidRuntime(31204):    at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
05-11 15:33:16.452: E/AndroidRuntime(31204):    at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
05-11 15:33:16.452: E/AndroidRuntime(31204):    at dalvik.system.NativeStart.main(Native Method)
05-11 15:33:16.467: I/ServiceManager(99): service 'phone' died
05-11 15:33:16.467: I/ServiceManager(99): service 'isms' died
05-11 15:33:16.467: I/ServiceManager(99): service 'phoneext' died
05-11 15:33:16.467: I/ServiceManager(99): service 'iphonesubinfo' died
05-11 15:33:16.467: I/ServiceManager(99): service 'sip' died
05-11 15:33:16.467: I/ServiceManager(99): service 'simphonebook' died
05-11 15:33:16.467: I/audio_policy_mrvl(30688): mrvl_ap_dev_release_output: 2 (hardware output)
05-11 15:33:16.608: I/BootAnimation(6191): ret=2, fps:12, interval:83333
05-11 15:33:16.639: I/BootAnimation(6191): createSurface RGB565
05-11 15:33:16.639: E/BootAnimation(6191): /sys/class/sec/led/led_pattern: open error, fd = -1
05-11 15:33:16.639: W/BootAnimation(6191): resolution w=600, h=1024
05-11 15:33:16.639: W/BootAnimation(6191): original qmg w=600, h=1024
05-11 15:33:17.233: E/InputEventReceiver(31217): channel ~ Publisher closed input channel or an error occurred.  events=0x9
05-11 15:33:17.444: E/InputEventReceiver(31110): channel ~ Publisher closed input channel or an error occurred.  events=0x9
05-11 15:33:17.444: E/Sensors(31315): SensorEventQueue::waitForEvent error HANGUP
05-11 15:33:17.444: E/InputEventReceiver(835): channel ~ Publisher closed input channel or an error occurred.  events=0x9
05-11 15:33:17.452: E/InputEventReceiver(31110): channel ~ Publisher closed input channel or an error occurred.  events=0x9
05-11 15:33:17.452: E/InputEventReceiver(835): channel ~ Publisher closed input channel or an error occurred.  events=0x9
05-11 15:33:17.452: E/InputEventReceiver(835): channel ~ Publisher closed input channel or an error occurred.  events=0x9
05-11 15:33:17.452: E/InputEventReceiver(835): channel ~ Publisher closed input channel or an error occurred.  events=0x9
05-11 15:33:17.452: D/Zygote(30691): Process 30963 terminated by signal (6)
05-11 15:33:17.452: I/Zygote(30691): Exit zygote because system server (30963) has terminated
05-11 15:33:17.616: I/Netd(6197): Netd 1.0 starting
05-11 15:33:17.623: W/InterfaceController(6197): Warning (Cannot load library: load_library(linker.cpp:745): library "/system/lib/libnetcmdiface.so" not found) while opening the net interface command library
05-11 15:33:17.772: E/SMD(107): DCD OFF
05-11 15:33:17.928: I/ServiceManager(99): service 'media.audio_flinger' died
05-11 15:33:17.928: I/ServiceManager(99): service 'media.player' died
05-11 15:33:17.928: I/ServiceManager(99): service 'media.camera' died
05-11 15:33:17.928: I/ServiceManager(99): service 'media.audio_policy' died
05-11 15:33:17.936: D/FileMonitorService(120): binderDied() 1 0x40918c90, tid 158, calling tid 120

3 个答案:

答案 0 :(得分:6)

那不是你的应用程序崩溃。这就是Android运行时崩溃,并且它正在使用它(包括你的应用程序)。

每当你看到大量服务死亡时,你就知道system_server已经死了。一些特定日志突出显示失败:

05-11 15:33:16.084: A/<unknown>(30963): stack corruption detected: aborted
[...]
05-11 15:33:17.452: D/Zygote(30691): Process 30963 terminated by signal (6)
05-11 15:33:17.452: I/Zygote(30691): Exit zygote because system server (30963) has terminated

第一个将本机system_server堆的堆栈损坏识别为失败原因,另外两个将pid 30963识别为system_server。信号6是SIGABRT,当检测到损坏时,system_server发送给自己。

这不是您可以解决的问题 - 平台中存在错误,而不是您的应用。我的猜测是,在可能由OEM引入的system_server中运行了一些糟糕的代码,这些代码正由您的应用程序执行。您可以通过更改应用程序的行为来解决问题,以避免错误,但不知道更多关于可能很难的错误。如果此设备没有超过4.2.2的更新,则不太可能从制造商那里获得系统修复。

通过使用adb logcat -v threadtime收集日志以显示线程ID,然后查看哪个线程报告损坏,您可以学到更多知识。崩溃前adb shell ps -t可能会为线程提供有意义的标签。当然,对于本机损坏,任何线程都可以踩到任何其他线程,但是由于堆栈损坏,线程更可能会伤害自己。

答案 1 :(得分:2)

这个问题与GPS有关,在工厂重置几周后它会很顺利,然后再次发生。所以我采取了疯狂的猜测,并认为它与A-GPS缓存有关。

我使用以下代码在每次重启后清除GPS缓存,它似乎正在运行。

locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);
locationManager.sendExtraCommand(LocationManager.GPS_PROVIDER,"delete_aiding_data", null);
Bundle bundle = new Bundle();
locationManager.sendExtraCommand("gps", "force_xtra_injection", bundle);
locationManager.sendExtraCommand("gps", "force_time_injection", bundle);

这仍然不是一个修复,它只是一个忽略和推迟问题的解决方法。 SM-T111NQ设备存在实际问题,三星尚未提供修复。

答案 2 :(得分:-1)

似乎有时候找不到adb。所以请尝试重新安装Dalvik机器和adb安装程序。