Closed Bug 849220 Opened 11 years ago Closed 10 years ago

Log Java stacks during all crashes

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: jchen, Assigned: jchen)

References

Details

(Whiteboard: [mozbase])

Attachments

(2 files)

It's useful to have all Java stacks too when we crash.

For C++ crashes, sometimes the crash stack shows a bunch of libdvm.so and it's good to know what that represents.

Even for Java crashes, we would get stacks for threads other than the crashing thread, which may be useful for multi-threading bugs.

We would log all Java stacks to logcat, which is picked up by our test harness. However, I don't know if we should increase the crash-reporter logcat limit, because the Java stacks would take up a significant portion of the logcat.

kats pointed out the Dalvik function dvmDumpAllThreads dumps all stacks to logcat, and we can probably call it inside the MinidumpCallback function in Breakpad.
It's not compliant with the Firefox Privacy Policy about Crash Reporting Feature: http://www.mozilla.org/en-US/legal/privacy/firefox.html
"With this feature, you have the option to include Personal Information (including your email address), Potentially Personal Information (including your IP address and the URL of the site you were visiting when Firefox crashed), and a comment."
As stated, it should be an option, maybe the checkbox about URL should be changed in a checkbox about Potentially Personal Information including URL.
The Java stack information shouldn't have any personally identifiable information. Values of local variables and such are not dumped in the java stack info. Can you clarify why it would not be compliant with the privacy policy?
Blocks: 845146
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #2)
> The Java stack information shouldn't have any personally identifiable
> information. Values of local variables and such are not dumped in the java
> stack info. Can you clarify why it would not be compliant with the privacy
> policy?
In that case, it's fine for this point.

It shouldn't be too big for those who pay their communication based on the data volume.
This patch dlopen's libdvm, calls dvmSuspendAllThreads to suspend all Dalvik threads, and then calls dvmDumpAllThreads to dump the Java thread stacks to logcat, which will be picked up by the testing harness or Java crash reporter.
Attachment #723586 - Flags: review?(ted)
The test harness currently filters out logcat from dalvikvm. This patch enables logging for dalvikvm logs with INFO priority and higher. Common dalvikvm logs such as garbage collection are logged using DEBUG priority, and will still be filtered out.
Attachment #723589 - Flags: review?(jmaher)
Assignee: nobody → nchen
Status: NEW → ASSIGNED
Comment on attachment 723589 [details] [diff] [review]
Log Dalvik stack traces during testing crash (v1)

Review of attachment 723589 [details] [diff] [review]:
-----------------------------------------------------------------

this change looks good, but mozbase changes need to go in github and then mirrored over, let me cc the people to make that happen.
Attachment #723589 - Flags: review?(jmaher) → review+
we need to land this patch on mozbase/mozdevice and then mirror to m-c and talos.
Whiteboard: [mozbase]
(In reply to Joel Maher (:jmaher) from comment #7)
> we need to land this patch on mozbase/mozdevice and then mirror to m-c and
> talos.

Just pushed the mozbase patch: https://github.com/mozilla/mozbase/commit/b57f3d45844fc57b04700f993f2198dd224060d2
Comment on attachment 723586 [details] [diff] [review]
Log Java stacks during all crashes (v1)

Review of attachment 723586 [details] [diff] [review]:
-----------------------------------------------------------------

We chatted about this on IRC. As written this seems really unsafe. The exception handler callback can be called when the process is in a really bad state (heap corruption, OOM, etc), so it needs to tread lightly.
Attachment #723586 - Flags: review?(ted) → review-
WONTFIX based on above comment.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: