java.util.ConcurrentModificationException when typing in the URL bar
Categories
(Firefox for Android :: Toolbar, defect)
Tracking
()
People
(Reporter: josh.hight, Unassigned)
References
Details
(Keywords: crash)
Crash Data
Attachments
(1 file, 1 obsolete file)
|
150.36 KB,
image/png
|
Details |
Steps to reproduce:
- Launch Firefox
- Type search terms in the URL bar
- If no crash, repeat step 2
Actual results:
Firefox will eventually crash. Stacktrace, grabbed from logcat:
EditToolbar: Error while processing autocomplete input
java.util.ConcurrentModificationException
at java.util.TreeMap$PrivateEntryIterator.nextEntry(TreeMap.java:1209)
at java.util.TreeMap$KeyIterator.next(TreeMap.java:1263)
at mozilla.components.feature.toolbar.ToolbarAutocompleteFeature$2.invokeSuspend(ToolbarAutocompleteFeature.kt:87)
at mozilla.components.feature.toolbar.ToolbarAutocompleteFeature$2.invoke(ToolbarAutocompleteFeature.kt:20)
at mozilla.components.browser.toolbar.AsyncFilterListener$invoke$1.invokeSuspend(BrowserToolbar.kt:46)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:9)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:112)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
Expected results:
No crash
Updated•2 years ago
|
Comment 1•2 years ago
|
||
The severity field is not set for this bug.
:skhan, could you have a look please?
For more information, please visit BugBot documentation.
Comment 2•2 years ago
•
|
||
I've found this crash in some of our automation tests logs as well, and can sometimes reproduce it locally (not manually though). Here are a few examples of this crash:
deleteCollectionTest
verifyOpenAllInPrivateTabsTest
goes back to at least Fx122: urlBarQuickActionsTest
STR as seen in the test recordings are exactly what the reporter described:
- On the first run, click the search toolbar, type in a URL.
- Some of the UI tests are set up to retry in case of flakiness, so it could crash only the second time it edits the URL bar. On the second retry, the URL bar should already contain the first URL, so it will replace that.
device used: Pixel 2, Android 11, virtual device.
Comment 3•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
Comment 4•2 years ago
|
||
| Reporter | ||
Comment 6•2 years ago
|
||
(In reply to [:skhan] from comment #5)
Possible duplicate? Bug 1864557
Yes, this seems to be a duplicate.
Comment 7•2 years ago
|
||
Since the crash volume is low (less than 15 per week), the severity is downgraded to S3. Feel free to change it back if you think the bug is still critical.
For more information, please visit BugBot documentation.
Comment 8•2 years ago
|
||
I chased this error for a bit thinking I'd caused it with some other work before realizing it was already in fenix/android-components. I traced it further.
It's getting triggers by the fan out of autocomplete providers at
with
val result = autocompleteProviders
.firstNotNullOfOrNull { it.getAutocompleteSuggestion(query) }
After some testing I was able to pin it to one provider, PlacesHistoryStorage and its getAutocompleteSuggestion method at
val url = handlePlacesExceptions("getAutoCompleteSuggestions", default = null) {
autocompleteReader.interrupt()
autocompleteReader.matchUrl(query)
} ?: return null
It appears that autocompleteReader.interrupt() always in my testing generates a ConcurrentModificationException but also autocompleteReader.matchUrl(query) sometimes can generate it as well.
PlacesHistoryStorag's autocompleteReader is from PlacesReaderConnection which belongs to a separate package, appservice:places, so that's where my tracing ended.
Hope this helps
Comment 9•1 year ago
|
||
The bug is linked to a topcrash signature, which matches the following criterion:
- Top 10 AArch64 and ARM crashes on nightly
:royang, could you consider increasing the severity of this top-crash bug?
For more information, please visit BugBot documentation.
Comment 10•1 year ago
|
||
I was able to reproduce this with Focus recently as well: https://crash-stats.mozilla.org/signature/?product=Focus&signature=java.util.ConcurrentModificationException%3A%20at%20java.util.LinkedHashMap%24LinkedHashIterator.nextNode%28LinkedHashMap.java%29
The spike increase doesn't look good from the crash signature graph above.
Comment 8 looks pretty useful, thanks for that Dan!
Comment 11•1 year ago
|
||
:boek Bug 1950991 released in 136.0.1, but the crash volume is still significantly higher than 135.
Are any further investigations happening? If yes, is there a bug tracking it?
If not, could we track a bug for investigation?
Comment 12•1 year ago
|
||
Tracking here in the interim unless Comment 11 points to another bug to track.
Comment 13•1 year ago
|
||
Comment 14•1 year ago
|
||
Comment on attachment 9472212 [details]
Bug 1872735 - Make a copy of the observers list to avoid a race condition that triggers a CME
Revision D241706 was moved to bug 1954228. Setting attachment 9472212 [details] to obsolete.
Comment 15•1 year ago
|
||
Tracking with Bug 1954228
Comment 16•1 year ago
|
||
Moved tracking to Bug 1954228
Updated•1 year ago
|
Comment 17•1 year ago
|
||
Based on the topcrash criteria, the crash signatures linked to this bug are not in the topcrash signatures anymore.
For more information, please visit BugBot documentation.
Updated•1 year ago
|
Description
•