Closed Bug 688692 Opened 13 years ago Closed 13 years ago

Fennec is not sending crash reports

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
major

Tracking

(firefox7 wontfix, firefox8 fixed, firefox9 fixed)

RESOLVED FIXED
Firefox 8
Tracking Status
firefox7 --- wontfix
firefox8 --- fixed
firefox9 --- fixed

People

(Reporter: gcp, Assigned: gcp)

References

Details

Attachments

(1 file)

Fennec crash reports don't seem to get send in some situations. Tracing on a Galaxy 10.1, I see.

I/GeckoCrashReporter( 8498): moving /data/data/org.mozilla.fennec/files/mozilla/1x2ljzcz.default/minidumps/72164577-ddf7-7313-0a5c8b50-32f1cbef.dmp to /data/data/org.mozilla.fennec/mozilla/Crash Reports/pending/72164577-ddf7-7313-0a5c8b50-32f1cbef.dmp
I/GeckoCrashReporter( 8498): moving /data/data/org.mozilla.fennec/files/mozilla/1x2ljzcz.default/minidumps/72164577-ddf7-7313-0a5c8b50-32f1cbef.extra to /data/data/org.mozilla.fennec/mozilla/Crash Reports/pending/72164577-ddf7-7313-0a5c8b50-32f1cbef.extra
I/GeckoCrashReporter( 8498): Intent { act=android.intent.action.MAIN cmp=org.mozilla.fennec/.App }
E/GeckoCrashReporter( 8498): exception during send: 
E/GeckoCrashReporter( 8498): java.io.FileNotFoundException: /data/data/org.mozilla.fennec/mozilla/Crash Reports/pending/72164577-ddf7-7313-0a5c8b50-32f1cbef.dmp (No such file or directory)
E/GeckoCrashReporter( 8498): 	at org.apache.harmony.luni.platform.OSFileSystem.open(Native Method)
E/GeckoCrashReporter( 8498): 	at dalvik.system.BlockGuard$WrappedFileSystem.open(BlockGuard.java:239)
E/GeckoCrashReporter( 8498): 	at java.io.FileInputStream.<init>(FileInputStream.java:88)
E/GeckoCrashReporter( 8498): 	at org.mozilla.fennec.CrashReporter.sendFile(CrashReporter.java:219)
E/GeckoCrashReporter( 8498): 	at org.mozilla.fennec.CrashReporter.sendReport(CrashReporter.java:286)
E/GeckoCrashReporter( 8498): 	at org.mozilla.fennec.CrashReporter$2.run(CrashReporter.java:146)
E/GeckoCrashReporter( 8498): 	at java.lang.Thread.run(Thread.java:1020)

Nevertheless, that file does seem to exist on the filesystem.
Assignee: nobody → gpascutto
Blocks: 686800
tracking-fennec: --- → ?
Here is another trace of the same issue, but slightly different reasons.

I/GeckoCrashReporter( 1703): moving /data/data/org.mozilla.fennec_morbo/files/mozilla/vdri0f7v.default/minidumps/543ae30b-dbb6-6a39-1c8dbf11-28357760.dmp to /data/data/org.mozilla.fennec/mozilla/Crash Reports/pending/543ae30b-dbb6-6a39-1c8dbf11-28357760.dmp
I/GeckoCrashReporter( 1703): couldn't rename minidump file
E/GeckoCrashReporter( 1703): exception while copying minidump file: 
E/GeckoCrashReporter( 1703): java.io.FileNotFoundException: /data/data/org.mozilla.fennec_morbo/files/mozilla/vdri0f7v.default/minidumps/543ae30b-dbb6-6a39-1c8dbf11-28357760.dmp (Permission denied)
E/GeckoCrashReporter( 1703): 	at org.apache.harmony.luni.platform.OSFileSystem.open(Native Method)
E/GeckoCrashReporter( 1703): 	at dalvik.system.BlockGuard$WrappedFileSystem.open(BlockGuard.java:239)
E/GeckoCrashReporter( 1703): 	at java.io.FileInputStream.<init>(FileInputStream.java:88)
E/GeckoCrashReporter( 1703): 	at org.mozilla.fennec.CrashReporter.moveFile(CrashReporter.java:75)
E/GeckoCrashReporter( 1703): 	at org.mozilla.fennec.CrashReporter.onCreate(CrashReporter.java:125)
E/GeckoCrashReporter( 1703): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1048)
E/GeckoCrashReporter( 1703): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1715)
E/GeckoCrashReporter( 1703): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1767)
E/GeckoCrashReporter( 1703): 	at android.app.ActivityThread.access$1500(ActivityThread.java:122)
E/GeckoCrashReporter( 1703): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1005)
E/GeckoCrashReporter( 1703): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/GeckoCrashReporter( 1703): 	at android.os.Looper.loop(Looper.java:132)
E/GeckoCrashReporter( 1703): 	at android.app.ActivityThread.main(ActivityThread.java:4028)
E/GeckoCrashReporter( 1703): 	at java.lang.reflect.Method.invokeNative(Native Method)
E/GeckoCrashReporter( 1703): 	at java.lang.reflect.Method.invoke(Method.java:491)
E/GeckoCrashReporter( 1703): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
E/GeckoCrashReporter( 1703): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
E/GeckoCrashReporter( 1703): 	at dalvik.system.NativeStart.main(Native Method)
I/GeckoCrashReporter( 1703): moving /data/data/org.mozilla.fennec_morbo/files/mozilla/vdri0f7v.default/minidumps/543ae30b-dbb6-6a39-1c8dbf11-28357760.extra to /data/data/org.mozilla.fennec/mozilla/Crash Reports/pending/543ae30b-dbb6-6a39-1c8dbf11-28357760.extra
I/GeckoCrashReporter( 1703): couldn't rename minidump file
E/GeckoCrashReporter( 1703): exception while copying minidump file: 
E/GeckoCrashReporter( 1703): java.io.FileNotFoundException: /data/data/org.mozilla.fennec_morbo/files/mozilla/vdri0f7v.default/minidumps/543ae30b-dbb6-6a39-1c8dbf11-28357760.extra (Permission denied)
E/GeckoCrashReporter( 1703): 	at org.apache.harmony.luni.platform.OSFileSystem.open(Native Method)
E/GeckoCrashReporter( 1703): 	at dalvik.system.BlockGuard$WrappedFileSystem.open(BlockGuard.java:239)
E/GeckoCrashReporter( 1703): 	at java.io.FileInputStream.<init>(FileInputStream.java:88)
E/GeckoCrashReporter( 1703): 	at org.mozilla.fennec.CrashReporter.moveFile(CrashReporter.java:75)
E/GeckoCrashReporter( 1703): 	at org.mozilla.fennec.CrashReporter.onCreate(CrashReporter.java:129)
E/GeckoCrashReporter( 1703): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1048)
E/GeckoCrashReporter( 1703): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1715)
E/GeckoCrashReporter( 1703): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1767)
E/GeckoCrashReporter( 1703): 	at android.app.ActivityThread.access$1500(ActivityThread.java:122)
E/GeckoCrashReporter( 1703): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1005)
E/GeckoCrashReporter( 1703): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/GeckoCrashReporter( 1703): 	at android.os.Looper.loop(Looper.java:132)
E/GeckoCrashReporter( 1703): 	at android.app.ActivityThread.main(ActivityThread.java:4028)
E/GeckoCrashReporter( 1703): 	at java.lang.reflect.Method.invokeNative(Native Method)
E/GeckoCrashReporter( 1703): 	at java.lang.reflect.Method.invoke(Method.java:491)
E/GeckoCrashReporter( 1703): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
E/GeckoCrashReporter( 1703): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
E/GeckoCrashReporter( 1703): 	at dalvik.system.NativeStart.main(Native Method)
The issue in Comment 1 is due to changing the OFFICIAL setting without a clobber, so not related to this.

There's some strange things going on with the file locations:

/GeckoCrashReporter( 4266): 
moving 
/data/data/org.mozilla.fennec/files/mozilla/profdir/...
to 
/data/data/org.mozilla.fennec/mozilla/Crash Reports/...

Now, if I look on the filesystem, the files are in:
/data/data/org.mozilla.fennec/files/mozilla/Crash Reports/pending 
i.e. in /files/mozilla instead of /mozilla!

which then leads to the:
java.io.FileNotFoundException: /data/data/org.mozilla.fennec/mozilla/Crash Reports/pending/

Upon investigating further, at the moment you see the dialog, the files are in the correct position. Once Fennec starts, they are in the wrong one. So there's a race condition between (I'm guessing) Fennec moving stuff into /files and the CrashReporter being able to send the files from the original location.

Trivial fix is to make sure they are stored in /files in the first place, by fixing the path in CrashReporter.java
What changed that moved everything under /files/? Whatever that was, it broke this.
The wrong path was added in bug 595169, but the code worked fine until bug 615519 was merged, which moves the /mozilla directory under the profile directory.
Fixing the path is enough to avoid the issue. The issue with bug 615519 doesn't trigger if we're not in "ANDROID_PACKAGE_NAME/mozilla".
Attachment #562061 - Flags: review?(ted.mielczarek)
Comment on attachment 562061 [details] [diff] [review]
Patch 1. Fix the paths in crashreporter.

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

Thanks for tracking this down! This was driving me nuts.
Attachment #562061 - Flags: review?(ted.mielczarek) → review+
https://tbpl.mozilla.org/?tree=Try&usebuildbot=1&rev=553f82e7dd5d

We probably want this fix on Aurora and Beta as well?
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/a74138405946
Status: NEW → ASSIGNED
Target Milestone: --- → Firefox 9
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/a74138405946
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Blocks: 615519
No longer blocks: 686800
bug 615519 landed for Fennec 4.0, so this has apparently been broken for quite some time.
Comment on attachment 562061 [details] [diff] [review]
Patch 1. Fix the paths in crashreporter.

Nominating for approval-mozilla-aurora or approval-mozilla-beta (whichever channel Firefox 8 is on by the time this gets approved and landed).  This is a mobile-only change that just corrects the directory path where some Android-specific code looks for crash report files.  It is very low-risk; it just changes a filesystem path in a string literal.  It fixes a regression that prevents some crash reports from getting submitted.
Attachment #562061 - Flags: approval-mozilla-beta?
Attachment #562061 - Flags: approval-mozilla-aurora?
Comment on attachment 562061 [details] [diff] [review]
Patch 1. Fix the paths in crashreporter.

a=LegNeato for aurora. Please land this today on releases/mozilla-aurora.
Attachment #562061 - Flags: approval-mozilla-beta?
Attachment #562061 - Flags: approval-mozilla-beta-
Attachment #562061 - Flags: approval-mozilla-aurora?
Attachment #562061 - Flags: approval-mozilla-aurora+
Pushed to Aurora for Firefox 8: https://hg.mozilla.org/releases/mozilla-aurora/rev/8dcf982fed93
Target Milestone: Firefox 9 → Firefox 8
Whiteboard: [qa+]
Whiteboard: [qa+]
tracking-fennec: ? → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: