Closed Bug 855040 Opened 9 years ago Closed 9 years ago

[Crash Reporter] Crash reporter is not sending system crashes after b2g restart itself.

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: nhirata, Assigned: hub)

References

Details

(Keywords: crash, Whiteboard: c= p=3 [leave open])

Attachments

(1 file, 1 obsolete file)

"mozilla-central" revision="28b048ffb7a7"
"integration/gaia-central" revision="44f6a17f24d4"
"gecko.git"revision="a800f14ea7022a78966f7fe14a9b0d11c569b151"
"gaia.git" revision="ace1eb32a313da1232bbdf9cff2581a4b036356d"

STR : 
1. verify you have wifi
2. launch camera
3. leave it alone for 10 seconds
4. crash occurs and will reboot the system
5. wait for reboot
6. adb shell ls /data/b2g/mozilla/Crash\ Reports/pending

Expected: crash report will be sent after reboot and connection to wifi, ie no files in the pending folder

Actual: 
First time you crash is bug 855036.  repeated attempts result in Firefox OS crashes that does not send.

182f1c4c-a285-7964-56b0ee02-58532d25.dmp
182f1c4c-a285-7964-56b0ee02-58532d25.extra
6668263b-0a7e-e79f-057b5257-3e76b68d.dmp
6668263b-0a7e-e79f-057b5257-3e76b68d.extra
6c2693ac-299b-34f8-1453373c-2124ea0e.dmp
6c2693ac-299b-34f8-1453373c-2124ea0e.extra
7f697f08-9491-5080-2de8acee-3a277fa1.dmp
7f697f08-9491-5080-2de8acee-3a277fa1.extra
root@android:/data/b2g/mozilla/Crash Reports/pending # 


note: 
1. Rebooting the phone after the phone had rebooted itself will cause the files to send.
Will look at it.
Assignee: nobody → hub
I can't seem to be able crash that way.

How can I cause a reboot ? I'd like to understand what is going on :-/
Flags: needinfo?(nhirata.bugzilla)
The crash has to be an OS crash and it should cause the system to reboot itself (or at the very least cause the b2g process to restart).

Example will be |kill -11 <b2g proceess>|

That may or may not send a crash report.  When I just tried it, on 1.1 it crashed and did not send the report.

The STR in comment 0 has gotten fixed in bug 855036.
Flags: needinfo?(nhirata.bugzilla)
Bug 862097 is actually b2g process' crash, but it is not reported otherwise only crash in content process caused by the b2g process' crash is reported.
(In reply to Sotaro Ikeda [:sotaro] from comment #4)
> Bug 862097 is actually b2g process' crash, but it is not reported otherwise
> only crash in content process caused by the b2g process' crash is reported.

Naoki, is my understanding about Bug 862097 correct?
Flags: needinfo?(nhirata.bugzilla)
Thanks Sotaro-san!  That bug will also reproduce this bug, Hub.

I have commented in the bug.  I believe that you may be right in what's causing it.  I am unsure about the fix...
Flags: needinfo?(nhirata.bugzilla)
(In reply to Naoki Hirata :nhirata (please use needinfo instead of cc) from comment #3)
> The crash has to be an OS crash and it should cause the system to reboot
> itself (or at the very least cause the b2g process to restart).

The problem is that I haven't figured out how to crash the OS :-)


> 
> Example will be |kill -11 <b2g proceess>|

Crashing b2g, that I know.

> 
> That may or may not send a crash report.  When I just tried it, on 1.1 it
> crashed and did not send the report.
> 
> The STR in comment 0 has gotten fixed in bug 855036.

I had checkout the revisions of gecko and gaia you specified, so I should have been hit by the bug.

(In reply to Sotaro Ikeda [:sotaro] from comment #4)
> Bug 862097 is actually b2g process' crash, but it is not reported otherwise
> only crash in content process caused by the b2g process' crash is reported.

I'll try this.
(In reply to Hubert Figuiere [:hub] from comment #7)
> The problem is that I haven't figured out how to crash the OS :-)

Oh, we usually say "OS crash" when we actually mean "crash of the B2G process" as from the user perspective, "the whole OS goes away and restarts" even if it's "just" the B2G process.
(In reply to Robert Kaiser (:kairo@mozilla.com) from comment #8)
> (In reply to Hubert Figuiere [:hub] from comment #7)
> > The problem is that I haven't figured out how to crash the OS :-)
> 
> Oh, we usually say "OS crash" when we actually mean "crash of the B2G
> process" as from the user perspective, "the whole OS goes away and restarts"
> even if it's "just" the B2G process.

That explains everything. I was stuck on trying to cause the "OS to crash" and "reboot" as "causing a Linux kernel panic" and the "phone rebooting" instead of just "b2g crash" and "restart".

Lost in translation.
Summary: [Crash Reporter] Crash reporter is not sending system crashes after it reboots itself. → [Crash Reporter] Crash reporter is not sending system crashes after b2g restart itself.
Actually I tried to reproduce over and over and over and I can't reproduce the issue. I do get the crash report sent. Including with bug 862097.

I'll try to rationalise my debugging log and add some well place to try to get a better diagnostic from the runtime.
Comment on attachment 740445 [details] [diff] [review]
Add a bit of logging in the crash report to help diagnostics.

Just added some logging. I use "dump()" to do it as it does not seems shell.js has a better facility.

Let me know if this is incorrect.
Attachment #740445 - Flags: review?(fabrice)
Comment on attachment 740445 [details] [diff] [review]
Add a bit of logging in the crash report to help diagnostics.

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

What about doing something like:
#ifdef MOZ_CRASHREPORTER
function debugCrashReport(aStr) {
  dump("Crash reporter : " + aStr);
}
#else
function debugCrashReport(aStr) {}
#endif

and replace all the dump() by debugCrashReport()?
Attachment #740445 - Flags: review?(fabrice)
That would work, indeed.
Attachment #740445 - Attachment is obsolete: true
Attachment #740935 - Flags: review?(fabrice)
Comment on attachment 740935 [details] [diff] [review]
Add a bit of logging in the crash report to help diagnostics.

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

r=me if you also change the dump() at https://mxr.mozilla.org/mozilla-central/source/b2g/chrome/content/shell.js#245 to use debugCrashReport()
Attachment #740935 - Flags: review?(fabrice) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/50842c3744ec

(adressed comment above)
Whiteboard: [leave open]
Status: NEW → ASSIGNED
Whiteboard: [leave open] → c=performance [leave open]
Whiteboard: c=performance [leave open] → c=crash [leave open]
Whiteboard: c=crash [leave open] → c= [leave open]
Whiteboard: c= [leave open] → c= p=3 [leave open]
Can you retest this? The additional logging should help. I can't reproduce on my end.
Flags: needinfo?(nhirata.bugzilla)
From Bug 874568 :
STR:
1. on a separate phone call unagi device
2. answer the call on the unagi device
3. as soon as you answer the call on unagi, hang up on other phone

logcat and dump files can be found in that bug.

Note:
05-21 12:25:21.663: I/GeckoDump(696): Crash reporter : Can't fetch app.reportCrashes. Exception: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getBoolPref]"  nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)"  location: "JS frame :: chrome://browser/content/shell.js :: shell_reportCrash :: line 130"  data: no]
Flags: needinfo?(nhirata.bugzilla)
This dump in logcat is fine. Blame nsIPrefBranch.getBoolPref for throwing exception on "key not found" and it just mean that the user we be asked whether we want to send it or not. - maybe I can make that message a bit more informative.

I can't go through the STR as I no longer have a SIM card for service compatible with Unagi. This will be harder to test....
I can't run the reproduction steps because the only B2G phone I have that allegedly support my carrier (Inari) does not seem to work with it anyway. 

I guess this will have to wait for either STR that don't require placing a phone call or hardware that actually work here.
Depends on: 882159
Hub, now that you have a phone that works, can you resume looking at this?
Flags: needinfo?(hub)
Keywords: crash
I can, but doing so mean that:

1. I have to wipe clean the build for Unagi as I can hardly have two at the same time

2. I will have to stop dogfooding FxOS and switch back to Android since I would be using the Keon for development. Experience show I can't trust a development phone as a phone. - but then I end up swapping SIMs all the time since I only have one SIM card.
Flags: needinfo?(hub)
Different blocker. Bug 888436
Depends on: 888436
No longer depends on: 882159
blocking-b2g: --- → koi?
I haven't been able to reproduce the problem on Keon - the only phone I have that works as a phone.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
This no longer occurs, however it always sends after marking ask each time.  Will follow up with a different bug.
I just saw this reoccurring, I think it only happens after the first flash.  We are ok after a reboot of the system.
blocking-b2g: koi? → ---
You need to log in before you can comment on or make changes to this bug.