Closed Bug 1889808 Opened 11 months ago Closed 9 months ago

org.mozilla.fenix.messaging.state.MessagingMiddleware$onMessagedDisplayed Crash in [@ java.lang.ArrayIndexOutOfBoundsException: at java.util.ArrayList.set(ArrayList.java)]

Categories

(Fenix :: Experimentation and Telemetry, defect)

Unspecified
Android
defect

Tracking

(firefox124 unaffected, firefox125 wontfix, firefox126 fixed, firefox127 fixed, firefox128 fixed)

RESOLVED FIXED
128 Branch
Tracking Status
firefox124 --- unaffected
firefox125 --- wontfix
firefox126 --- fixed
firefox127 --- fixed
firefox128 --- fixed

People

(Reporter: cpeterson, Assigned: royang)

References

Details

(Keywords: crash, regression)

Crash Data

Attachments

(1 file)

Crash report: https://crash-stats.mozilla.org/report/index/8c070069-f86c-4ba0-b3a3-e58e10240404

These crashes might be a regression in Fx 125. The earliest crash reports are from Fx 125.0a1, but it's hard to say when the bug landed because the crash volume is very low.

Exception: java.lang.ArrayIndexOutOfBoundsException
Message: length=1; index=-1

Frame   Module  Function  Source
0   java.util.ArrayList   set   ArrayList.java:483
1   org.mozilla.fenix.messaging.state.MessagingMiddleware$onMessagedDisplayed$1   invokeSuspend   MessagingMiddleware.kt:169
2   kotlin.coroutines.jvm.internal.BaseContinuationImpl   resumeWith  ContinuationImpl.kt:9
3   kotlinx.coroutines.DispatchedTask   run   DispatchedTask.kt:111
4   kotlinx.coroutines.internal.LimitedDispatcher$Worker  run   LimitedDispatcher.kt:4
5   kotlinx.coroutines.scheduling.TaskImpl  run   Tasks.kt:3
6   kotlinx.coroutines.scheduling.CoroutineScheduler$Worker   run   CoroutineScheduler.kt:98

Roger, do you think this MessagingMiddleware crash could be a regression from your fix for ReducerChainBuilder crash bug 1882123?

Flags: needinfo?(royang)
See Also: → 1882123

It is possible my change uncovered a race that used to prevent this crash. A quick investigation seems to indicate there are some missing handling around where we crashed. I'll investigate.

Flags: needinfo?(royang)
Severity: -- → S2
Keywords: regression
Summary: Crash in [@ java.lang.ArrayIndexOutOfBoundsException: at java.util.ArrayList.set(ArrayList.java)] → org.mozilla.fenix.messaging.state.MessagingMiddleware$onMessagedDisplayed Crash in [@ java.lang.ArrayIndexOutOfBoundsException: at java.util.ArrayList.set(ArrayList.java)]

(In reply to Roger Yang [:royang] from comment #2)

It is possible my change uncovered a race that used to prevent this crash. A quick investigation seems to indicate there are some missing handling around where we crashed. I'll investigate.

:royang any update from your investigation?
Have you confirmed or ruled out Bug 1882123 as the regressor?
We still have two planned dot releases left for Fx126 schedule, if you think you might have a fix in time?

Flags: needinfo?(royang)

I did ruled out Bug 1882123 as a regressor but I think I have a fix for this. I'll put it up today. Thanks

Flags: needinfo?(royang)
See Also: → 1897485
Assignee: nobody → royang
Status: NEW → ASSIGNED
Attachment #9402496 - Attachment description: Bug 1889808 - Do not attempt to update a message that was removed → Bug 1889808 - Do not attempt to update a message that was removed.
Pushed by royang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/aab46451484b Do not attempt to update a message that was removed. r=android-reviewers,boek
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch

The patch landed in nightly and beta is affected.
:royang, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox127 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(royang)

To add to comment 8, please consider adding a release uplift request on this also.
Depending on the risk, we could include this in the planned Fx126 dot release.

(In reply to Donal Meehan [:dmeehan] from comment #9)

To add to comment 8, please consider adding a release uplift request on this also.
Depending on the risk, we could include this in the planned Fx126 dot release.

Sounds good. I'll put up the uplift request. The change is pretty safe.

Flags: needinfo?(royang)

Comment on attachment 9402496 [details]
Bug 1889808 - Do not attempt to update a message that was removed.

Beta/Release Uplift Approval Request

  • User impact if declined: In some cases a race condition causes the browser to crash
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This fix only catches the race condition and prevents crashing.
  • String changes made/needed:
  • Is Android affected?: Yes
Attachment #9402496 - Flags: approval-mozilla-release?
Attachment #9402496 - Flags: approval-mozilla-beta?

Comment on attachment 9402496 [details]
Bug 1889808 - Do not attempt to update a message that was removed.

Approved for 127 beta 6, thanks.

Attachment #9402496 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Comment on attachment 9402496 [details]
Bug 1889808 - Do not attempt to update a message that was removed.

Approved for 126.0.1

Attachment #9402496 - Flags: approval-mozilla-release? → approval-mozilla-release+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: