Open Bug 1969818 Opened 1 year ago Updated 9 months ago

[Crash Reporter] Fenix content process always crash when GeckoView is isolated process build

Categories

(GeckoView :: General, defect, P2)

All
Android
defect

Tracking

(Not tracked)

People

(Reporter: m_kato, Unassigned)

References

(Blocks 4 open bugs)

Details

(Whiteboard: [fxdroid][geckoview])

Attachments

(1 obsolete file)

When using isolated process build of GeckoView, Fenix's content process always crash by the following exception.

06-02 15:27:22.795  3217  3217 E AndroidRuntime: java.lang.RuntimeException: Unable to create application org.mozilla.fenix.DebugFenixApplication: java.lang.SecurityException: Isolated process not allowed to call getIntentSender
06-02 15:27:22.795  3217  3217 E AndroidRuntime: 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5364)
06-02 15:27:22.795  3217  3217 E AndroidRuntime: 	at android.app.ActivityThread.-wrap2(ActivityThread.java)
06-02 15:27:22.795  3217  3217 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1528)
06-02 15:27:22.795  3217  3217 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:102)
06-02 15:27:22.795  3217  3217 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:154)
06-02 15:27:22.795  3217  3217 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6077)
06-02 15:27:22.795  3217  3217 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
06-02 15:27:22.795  3217  3217 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
06-02 15:27:22.795  3217  3217 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
06-02 15:27:22.795  3217  3217 E AndroidRuntime: Caused by: java.lang.SecurityException: Isolated process not allowed to call getIntentSender
06-02 15:27:22.795  3217  3217 E AndroidRuntime: 	at android.os.Parcel.readException(Parcel.java:1683)
06-02 15:27:22.795  3217  3217 E AndroidRuntime: 	at android.os.Parcel.readException(Parcel.java:1636)
06-02 15:27:22.795  3217  3217 E AndroidRuntime: 	at android.app.ActivityManagerProxy.getIntentSender(ActivityManagerNative.java:4637)
06-02 15:27:22.795  3217  3217 E AndroidRuntime: 	at android.app.PendingIntent.getActivity(PendingIntent.java:342)
06-02 15:27:22.795  3217  3217 E AndroidRuntime: 	at android.app.PendingIntent.getActivity(PendingIntent.java:302)
06-02 15:27:22.795  3217  3217 E AndroidRuntime: 	at org.mozilla.fenix.components.Analytics.crashReporter_delegate$lambda$2(Analytics.kt:106)
06-02 15:27:22.795  3217  3217 E AndroidRuntime: 	at org.mozilla.fenix.components.Analytics.$r8$lambda$x5HuOztnO17vm8v56YjjO2-UJ6w(Analytics.kt)
06-02 15:27:22.795  3217  3217 E AndroidRuntime: 	at org.mozilla.fenix.components.Analytics$$ExternalSyntheticLambda5.invoke(D8$$SyntheticClass:0)
06-02 15:27:22.795  3217  3217 E AndroidRuntime: 	at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:83)
06-02 15:27:22.795  3217  3217 E AndroidRuntime: 	at org.mozilla.fenix.components.Analytics.getCrashReporter(Analytics.kt:50)
06-02 15:27:22.795  3217  3217 E AndroidRuntime: 	at org.mozilla.fenix.FenixApplication.setupCrashReporting(FenixApplication.kt:497)
06-02 15:27:22.795  3217  3217 E AndroidRuntime: 	at org.mozilla.fenix.FenixApplication.setupInAllProcesses(FenixApplication.kt:194)
06-02 15:27:22.795  3217  3217 E AndroidRuntime: 	at org.mozilla.fenix.FenixApplication.initialize(FenixApplication.kt:156)
06-02 15:27:22.795  3217  3217 E AndroidRuntime: 	at org.mozilla.fenix.FenixApplication.onCreate(FenixApplication.kt:146)
06-02 15:27:22.795  3217  3217 E AndroidRuntime: 	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1024)
06-02 15:27:22.795  3217  3217 E AndroidRuntime: 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5361)
06-02 15:27:22.795  3217  3217 E AndroidRuntime: 	... 8 more
Whiteboard: [fxdroid][geckoview]

The severity field is not set for this bug.
:royang, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(royang)
Component: Crash Reporting → General
Flags: needinfo?(royang)
Product: Firefox for Android → GeckoView
Severity: -- → S2
Priority: -- → P2

Gabriele, do you think you or someone close to crash reporting could look into this?

Flags: needinfo?(gsvelto)

How urgent is this? It will require a fair amount of work and both me and the others working on crash reporting have their hands full at the moment, but I can plan for the coming months.

Flags: needinfo?(gsvelto)

Hi Gabriele, this is part of our current project that we hope to complete this year. If you could plan this for the coming months, that would be great!

Flags: needinfo?(gsvelto)

I replied in bug 1710940, maybe we should duplicate one of the two bugs since they're the same issue (i.e. the crash generator can't ptrace() isolated processes and we need to change the minidump-writer crate to work around it).

Flags: needinfo?(gsvelto)

Actually, I think I was wrong about this. This is about the Java part of the crash reporting code, not the native part which is what I mentioned in comment 5. I think we might need another person to work on this.

Blocks: 1983341
See Also: → 1983811
Blocks: 1983814
See Also: → 1984075

I plan on suppressing the crash reporter for isolated processes for now in bug 1984075, since this seems like a larger unit of work and we'd like to get information on other parts of Fenix + Isolated Processes. (This crash of the crash reporter occurs early in the stack and appears blocking to me.)

Summary: Fenix content process always crash when GeckoView is isolated process build → [Crash Reporter] Fenix content process always crash when GeckoView is isolated process build
Assignee: nobody → ohall
Status: NEW → ASSIGNED
Attachment #9508137 - Attachment description: Bug 1969818 - Suppress Crash Reporter in Isolated Processes on Fenix → Bug 1984075 - Suppress Crash Reporter in Isolated Processes on Fenix

Comment on attachment 9508137 [details]
Bug 1984075 - Suppress Crash Reporter in Isolated Processes on Fenix

Revision D261732 was moved to bug 1984075. Setting attachment 9508137 [details] to obsolete.

Attachment #9508137 - Attachment is obsolete: true
Assignee: ohall → nobody
Status: ASSIGNED → NEW

As long as looking AC's crash service, we use Intent to launch crash service. We may have to have something crash helper in GeckoView to run Intent or service.

If native crash, we will call ContentDelegate.onCrash(). But if Java's uncaughtException, we might be catch it by Java's crash handler. I guess that we may have to have an API like onJavaUncaughtException() in ContentDelegate, to catch content process's UncaughException on parent process.

Fenix's Crash handler is installed on content process too, then it call Thread.setDefaultUncaughtException, then it will use Intent to notify a lot of things (telemetry, device notification and etc). Isolated process doesn't allow all, so we might have to re-connect to parent process.

Bug 1992765 also introduced another if clause that needs to be removed once the crash reporter is working.

See Also: → 1992765
See Also: → 2005839
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: