We are trying to diagnose random reboots on our Nexus 7 tablets. Reboots look like: Application is non-responsive, black screen, cyanogenmod splash screen, normal lock screen, tablets function normally. One theory is kernel panics. I've yet to get my hands on a device after a crash (they are in the field) but I can cause a kernel panic that produces the same crash as described by the testers. The resulting /proc/last_kmsg shows this:
[ 2431.183227] Kernel panic - not syncing: Fatal exception
[ 2431.183502] wcnss_8960: crash shutdown : 0
[ 2434.686065] Rebooting in 5 seconds..
[ 2439.688842] Going down for restart now
[ 2439.689239] in panic
No errors detected
Boot info:
Last boot reason: Panic
For testing I wrote a little program that tests for the existence of /proc/last_kmsg. If it is there, I use cat /proc/last_kmsg > file_path to get a copy of the file. I'd like to remove, clear, rename the /proc/last_kmsg file so I don't keep getting files copied over. It seems like once the last_kmsg file is there, it is there forever. Is there a way to get rid of this file?
Any thoughts about debugging random crashes? I already have ACRA running when my program is running and I've never seen a bug report when a sudden crash is reported by a user.
Thanks
Should note we're running on the new Nexus 7 with cyanogenmod.
Related
I made a Jenkins job to continually test Android Monkey.
My purpose is to find hidden errors of exceptions.
I ran it 420 times and cannot find any error.
Is there a way I can find errors or exceptions automatically and save log file?
ADB monkey generates crash log to STDERR.
However, sometimes, it goes to STDOUT.
So, if you check both STDERR and STDOUT, you can get crashlog and by checking the size of STDERR, you can identify if there was a crash or not.
I met a weird issue when I tried to search some logs during emulator booting.
When I create an emulator, the adb device started with "offline" first, then I type
adb logcat -v time | tee log1.txt
and adb will keep "wait-for-device" until the adb became online.
Then when the emulator boots up, I type adb logcat -v time | tee log2.txt again except the destination of the log file.
Now, I use vimdiff log1.txt log2.txt to compare these two logs and found log1 missed many logs as Log_Diff
I have no idea why some logs in log1.txt will missed.
Any ideas?
P.S. I am using Android 5.1-64bit Emulator in sdk.
After some research, finally I found the root cause in Android log daemon.
The main problem is the LogBufferElement is using a CLOCK_MONOTONIC timestamp as the sorting index.
When the timestamp of the multiple LogBufferElement are the same, LogReader may only dump the last entry. That's why some logs seem being lost.
AOSP Android 5.1 still had this issue, but Android 6.0 had fixed it.
You can refer to this patch.
Btw, I also did some modification for this patch.
The main reason is Android 6.0 supports the C++ 11 atomic std libs, but Android 5.1 is not yet. Some the atomic APIs need to roll back. (e.g. atomic_fetch_add_explicit())
I'm getting the above error repeatedly in my logcat - and it seems to be preventing me from launching my app onto the device.
Any ideas?
Your nand seems faulty. Log into adb shell and type dmesg you will see that the kernel complains that the hardware is defective.
Ok so I fixed this by deleting the \system\bin\toolbox file from my device, as this is supposedly only for emulators. Still can't boot my app onto the device though :/
I have a problem.
I've been working with Android in Eclipse for the past 4-5 weeks now and never had a problem with the VM (they were slow, yes. But never crashed).
Now, I believe since 4.2 when I started working on a new project for uni (deadline next week) my 4.2 VM suddently starts crashing on launch, because of "Kernel Panic" (resport at the end).
I wanted to ask if there is anything I could do, maybe download a hotfix or anything. Both the API and Eclipse are pretty much up to date or might there be something wrong with my computer?
(Somehow even my old VMs (2.3.3, 3.1 and 4.1) crash on launch 99% of the time)
Any advice would be highly appreciated. Here the beginning of the Crash-Log:
Process: emulator64-arm [1334] Path:
/Users/USER/*/emulator64-arm Identifier: emulator64-arm Version:
??? Code Type: X86-64 (Native) Parent Process: eclipse [1156]
User ID: 501
Date/Time: 2012-12-01 00:25:27.469 +0100 OS Version: Mac OS
X 10.8.2 (12C2034) Report Version: 10
Interval Since Last Report: 130686 sec Crashes Since Last
Report: 96 Per-App Crashes Since Last Report: 32 Anonymous
UUID: ABE51F99-F7A9-2595-016E-C47FFD1F6C50
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes:
KERN_INVALID_ADDRESS at 0x0000000000000000
VM Regions Near 0:
-->
__TEXT 0000000100000000-0000000100247000 [ 2332K] r-x/rwx SM=COW /Users/USER/*
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
Do you have two screens? if yes, did you launch avd/vm on secondary screen last time?
If yes, then check config vm file at:
cd ~/.android/avd/
ls -la => here you see all avds
cd [your_vm.avd]
joe emulator-user.ini => edit this config file and see value
window.x = 2054 - this is stupid value, cause says where to display emulator window. Value is set cause emulator window was displayed at second screen on x position 2054 but as I say it's bug at avd. Simply change it to better value to display window at your main screen so like my case:
window.x = 954
window.y = 199
uuid = 1342941165631
Save config file, start eclipse, start your avd/vm and all must run well.
It looks like this happens when an external monitor is connected. Try disconnecting your external monitor and then start emulator. You can attach it back after the emulator starts.
I had the same problem. Yesterday it worked fine. Today crashes with EXC_BAD_ACCESS. Then I noticed that the audio I was listening to stopped for half a second when launching the AVD. I though that might have something to do with it. I stopped iTunes I was listening to, restarted the AVD and yes success. No crash, it started up nicely.
I've been experiencing a great deal of instability on my Verizon Galaxy S III, and I believe it's related to the WiFi driver, or at least something in the networking stack. I get daily full system crashes that cause soft reboots of the OS.
In order to trace to the root of the issue, I'd like to see historical crash data for the Android OS. Please note that I am NOT developing an app, and I do not want instruction on how to use LogCat to trace issues within an in-development app. I want to see the Android system crash logs, but I'm not sure where to look for them.
After ANR happens, you would find call stack of related process at /data/anr/traces.txt
After application crashes, you might find call stack of crashed application under /data/tombstones directory.
See Android: How to get kernel logs after kernel panic?
It looks like /data/dontpanic/ should contain some "apanic" files, but only if the kernel's apanic support is enabled, and it worked. (I haven't seen anything there in my case, but maybe you'll be luckier than I ...)
crash report can be found at default path: /data/anr/
some manufacture place in custom path like: /data/system/ckerror
use cmd: adb pull /data/anr "dest path"
example:
in windows cmd prompt:
adb pull /data/anr c:\trace
The document states that
Android stores trace information when it experiences an ANR. On older OS releases, there's >a single /data/anr/traces.txt file on the device.
On newer OS releases, there are multiple >/data/anr/anr_* files. You can access ANR traces from a device or emulator by using >Android Debug Bridge (adb) as root:
adb root
adb shell ls /data/anr
adb pull /data/anr/<filename>
Usually the every crash is stored in traces.txt file under /data/anr/ folder of internal storage. Try checking this file.
I found a file call crash.txt inside the directory /data/Logging which seems to contain brief stack-traces from the last several crashes that occurred on the device.