Last Comment Bug 688692 - Fennec is not sending crash reports
: Fennec is not sending crash reports
Status: RESOLVED FIXED
:
Product: Fennec Graveyard
Classification: Graveyard
Component: General (show other bugs)
: Trunk
: ARM Android
: -- major (vote)
: Firefox 8
Assigned To: Gian-Carlo Pascutto [:gcp]
:
Mentors:
: 686492 686800 (view as bug list)
Depends on:
Blocks: 615519
  Show dependency treegraph
 
Reported: 2011-09-22 22:19 PDT by Gian-Carlo Pascutto [:gcp]
Modified: 2013-12-10 10:00 PST (History)
10 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Patch 1. Fix the paths in crashreporter. (2.28 KB, patch)
2011-09-23 09:24 PDT, Gian-Carlo Pascutto [:gcp]
ted: review+
christian: approval‑mozilla‑aurora+
christian: approval‑mozilla‑beta-
Details | Diff | Review

Description Gian-Carlo Pascutto [:gcp] 2011-09-22 22:19:02 PDT
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.
Comment 1 Gian-Carlo Pascutto [:gcp] 2011-09-23 04:13:24 PDT
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)
Comment 2 Gian-Carlo Pascutto [:gcp] 2011-09-23 07:58:30 PDT
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
Comment 3 Ted Mielczarek [:ted.mielczarek] 2011-09-23 08:10:50 PDT
What changed that moved everything under /files/? Whatever that was, it broke this.
Comment 4 Ted Mielczarek [:ted.mielczarek] 2011-09-23 08:26:03 PDT
*** Bug 686492 has been marked as a duplicate of this bug. ***
Comment 5 Gian-Carlo Pascutto [:gcp] 2011-09-23 08:54:26 PDT
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.
Comment 6 Gian-Carlo Pascutto [:gcp] 2011-09-23 09:24:20 PDT
Created attachment 562061 [details] [diff] [review]
Patch 1. Fix the paths in crashreporter.

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".
Comment 7 Ted Mielczarek [:ted.mielczarek] 2011-09-23 09:41:55 PDT
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.
Comment 8 Gian-Carlo Pascutto [:gcp] 2011-09-24 02:26:06 PDT
https://tbpl.mozilla.org/?tree=Try&usebuildbot=1&rev=553f82e7dd5d

We probably want this fix on Aurora and Beta as well?
Comment 10 Matt Brubeck (:mbrubeck) 2011-09-24 08:27:40 PDT
https://hg.mozilla.org/mozilla-central/rev/a74138405946
Comment 11 Doug Turner (:dougt) 2011-09-25 14:12:20 PDT
*** Bug 686800 has been marked as a duplicate of this bug. ***
Comment 12 Ted Mielczarek [:ted.mielczarek] 2011-09-26 07:27:49 PDT
bug 615519 landed for Fennec 4.0, so this has apparently been broken for quite some time.
Comment 13 Matt Brubeck (:mbrubeck) 2011-09-26 12:59:04 PDT
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.
Comment 14 christian 2011-09-26 14:48:18 PDT
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.
Comment 15 Matt Brubeck (:mbrubeck) 2011-09-26 15:40:34 PDT
Pushed to Aurora for Firefox 8: https://hg.mozilla.org/releases/mozilla-aurora/rev/8dcf982fed93

Note You need to log in before you can comment on or make changes to this bug.