Closed Bug 1481696 Opened Last year Closed Last year

Create Socorro product for "Focus" (Android GeckoView crashes)

Categories

(Socorro :: General, task, P1)

Tracking

(firefox-esr52 unaffected, firefox-esr60 unaffected, firefox61 unaffected, firefox62 affected, firefox63 affected)

VERIFIED FIXED
Tracking Status
firefox-esr52 --- unaffected
firefox-esr60 --- unaffected
firefox61 --- unaffected
firefox62 --- affected
firefox63 --- affected

People

(Reporter: cpeterson, Assigned: willkg)

References

Details

(Whiteboard: [geckoview:klar:p2])

Attachments

(2 files)

Focus for Android is switching from Android WebView to GeckoView. The WebView version of Focus sent its crash reports to the Google Play Store or Sentry. The new GeckoView Focus version ("Focus+GV" for short) will send Breakpad crash reports to Socorro for GeckoView's native code crashes.

REQUESTS:

1. We would like a new Socorro product called "Focus". Focus or GeckoView will need to set the "ProductName" field to "Focus" in the crash report. This comes from MOZ_APP_NAME in other products.

2. Focus+GV is currently submitting Breakpad crash reports to Socorro. Unfortunately, Focus+GV's crash reports currently are lumped together with Fennec reports in the "FennecAndroid" Product because both Fennec and Focus+GV have MOZ_APP_NAME "fennec". The Focus+GV team can change its MOZ_APP_NAME to something like "focus", but in the meantime Socorro's crash processor can differentiate Focus+GV crashes and legitimate Fennec crashes using the "Process Type" field:

Focus+GV uses e10s so its crash reports have Process Type "content", e.g.
bp-3a684db6-dbca-442c-ab42-3a22f0180805

Fennec does not use e10s so its crash reports have no Process Type field, e.g.
bp-7cccaf9e-e119-4ba9-9a07-9f69c0180805

IN SUMMARY:

1. Create "Focus" product.

2. Temporarily process new and existing crash reports with (ProductName == "fennecandroid" AND Process Type == "content") as Product "Focus".
Does the case of MOZ_APP_NAME matter ("focus" vs "Focus")? Fennec's MOZ_APP_NAME is lowercase "fennec", but the Socorro product name is capitalized "Fennec" (and "FennecAndroid").
Fennec/FennecAndroid is complex and who knows where those values are coming from.

However, MOZ_APP_NAME for Firefox is "firefox", but the ProductName coming in is "Firefox". I'll have to look into that. Maybe I'm wrong about the MOZ_APP_NAME origin.
(In reply to Will Kahn-Greene [:willkg] ET needinfo? me from comment #2)
> However, MOZ_APP_NAME for Firefox is "firefox", but the ProductName coming
> in is "Firefox". I'll have to look into that. Maybe I'm wrong about the
> MOZ_APP_NAME origin.

Looks like crash report ProductName is set from MOZ_APP_BASENAME. This is current a build-time constant, but GeckoView will probably need to make this dynamic if we want different GeckoView-based apps (e.g. Focus, FxR, and Fenix) to have their own ProductNames.

https://searchfox.org/mozilla-central/rev/f0c15db995198a1013e1c5f5b5bea54ef83f1049/mobile/android/geckoview/src/main/java/org/mozilla/gecko/CrashHandler.java#472

https://searchfox.org/mozilla-central/rev/f0c15db995198a1013e1c5f5b5bea54ef83f1049/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java#135

https://searchfox.org/mozilla-central/search?q=MOZ_APP_BASENAME%3D
Ahh... ok. I'll fix the docs I wrote up. Thank you for finding that!
Making this a P1 so it shows up on the radar to get done soon.
Priority: -- → P1
Depends on: 1482227
On Monday, I'll add "Focus" as a product and also add a processor rule to stomp on the ProductName for Focus crashes. I can reprocess the existing crashes, too. I can test all that out on stage and we can see how things look.

One thing I noticed while looking at the data is that Focus is also using the Fennec ProductID. There's a processor rule that keys off of that specific ProductID and sets the ProductName to FennecAndroid. Focus (and all Mozilla products) should have its own ProductID.
(In reply to Will Kahn-Greene [:willkg] ET needinfo? me from comment #6)
> One thing I noticed while looking at the data is that Focus is also using
> the Fennec ProductID. There's a processor rule that keys off of that
> specific ProductID and sets the ProductName to FennecAndroid. Focus (and all
> Mozilla products) should have its own ProductID.

Thanks! I'll note in GeckoView ProductName bug 1482227 that GeckoView should also change ProductID.
Assignee: nobody → willkg
Status: NEW → ASSIGNED
Commits pushed to master at https://github.com/mozilla-services/socorro

https://github.com/mozilla-services/socorro/commit/5e5ca37bde2c7291c626f2310d9bef873a1b27ac
bug 1481696: add focus

This adds Focus as a supported product.

This also fixes a problem in local development environments where if you
haven't set up ES, it causes the product home page to throw HTTP 500s.

https://github.com/mozilla-services/socorro/commit/c3bc1c77be6cc66532865c5a3ecf8e6b370aa19f
Merge pull request #4560 from willkg/1481696-focus

bug 1481696: add focus
Socorro has stage and production systems. The stage system supports Focus now. There aren't any crash reports, yet, so there's no data, but the Focus product home page on stage is here:

https://crash-stats.allizom.org/home/product/Focus
                    ^^^^^^^^^^^

We can test that by sending crash reports to the stage collector using this crash report submit url:

https://crash-reports.allizom.org/submit
                      ^^^^^^^^^^^

Let me know how that works out and whether you hit any problems.

Once we've tested crash report submission and things are working out, I can push it to production.
Flags: needinfo?(cpeterson)
(In reply to Will Kahn-Greene [:willkg] ET needinfo? me from comment #12)
> Let me know how that works out and whether you hit any problems.
> 
> Once we've tested crash report submission and things are working out, I can
> push it to production.

Thanks, Will. I'll note your test instructions from GeckoView bug 1482227 about the new product name and id.
Flags: needinfo?(cpeterson)
Commits pushed to master at https://github.com/mozilla-services/socorro

https://github.com/mozilla-services/socorro/commit/93f2bc73e27cb5b409c010fd954dc38e279cff4f
bug 1481696: add processor rule to fix Focus crashes

This reworks the ProductRewrite rule so it logs what it did in the crash
report better. It also adjusts the rule to act as a "this is where we're
going to do all the product rewriting" place.

This adds product rewriting logic for Focus GV. That's using GeckoView,
but incoming crash reports are using ProductName=Fennec. So the ProductRewrite
rule was convering those to FennecAndroid. This will then convert it to
Focus if the ProcessType=content.

We should remove this as soon as we can, but it'll fix an existing issue
we have right now.

https://github.com/mozilla-services/socorro/commit/89617b26f43dcac904398b3e0ce5abab3cbff36e
Merge pull request #4563 from willkg/1481696-focus-processor-rule

bug 1481696: add processor rule to fix Focus crashes
I landed a processor rule that follows the logic in comment #0. And now we've got Focus crashes on stage:

https://crash-stats.allizom.org/report/index/092d9d96-5cd3-48d9-b3ff-ea48b0180816

That's not in prod, yet. It'll go with everything else.
I pushed everything to prod just now.

I'm reprocessing existing crash reports that are for FennecAndroid and have a process type of "content". They should show up as "Focus" now. All new crash reports that meet this criteria will show up as "Focus", too.

I wrote up bug #1484755 to remove that product rewrite rule that we added. That rule should be temporary until incoming crashes have the correct ProductName and ProductID.

Everything we need to do on the Socorro-side is done now. Marking as FIXED.
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
(In reply to Will Kahn-Greene [:willkg] ET needinfo? me from comment #16)
> Everything we need to do on the Socorro-side is done now. Marking as FIXED.

Thanks, Will! I verified that the existing "FennecAndroid" GeckoView crash reports now have product name "Focus". (GeckoView engineers have not started sending the new "Focus" product name yet.)

https://crash-stats.mozilla.com/search/?product=Focus&version=62.0b
Status: RESOLVED → VERIFIED
See Also: → 1492506
You need to log in before you can comment on or make changes to this bug.