Closed Bug 1876957 Opened 1 years ago Closed 1 year ago

Bookmark tasks freeze after mass deletion of bookmarks from manager

Categories

(Firefox :: Bookmarks & History, defect)

Firefox 122
defect

Tracking

()

VERIFIED FIXED
124 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox122 --- unaffected
firefox123 --- wontfix
firefox124 --- verified

People

(Reporter: bluetreemonk, Assigned: mak)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [sng-scrubbed][places-regression])

Attachments

(6 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

Steps to reproduce:

  1. Open bookmarks manager
  2. Select first bookmark in list for toolbar.
  3. Press and hold delete button to delete all bookmarks quickly

Actual results:

After a few bookmark deletions, no other bookmark could be deleted.
When I try to create a new bookmark, it shows the star is filled but does not show in bookmark manager after creation.

Console export attached shows the errors during / after bookmark manager freezes.

Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:122.0) Gecko/20100101 Firefox/122.0

Expected results:

Bookmarks should continue to be deleted.

In order for me to continue deleting bookmarks, I have to fully restart firefox browser.
Then the problem repeats.

The Bugbug bot thinks this bug should belong to the 'Firefox::Bookmarks & History' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Bookmarks & History

That TypeError: 'error' called on an object that does not implement interface ConsoleInstance. PlacesTransactions.sys.mjs:358:19 breaks the loop, and it's puzzling, I'm not sure why console.error would suddenly stop working.
I'll try to reproduce with the given steps.

Flags: needinfo?(mak)

How many bookmarks were you trying to remove? How much memory is Firefox using at the end of this?
I wonder if the final breakage is just the same as Bug 1824872, so an halt due to out of memory conditions.

Flags: needinfo?(bluetreemonk)
Flags: needinfo?(mak)
See Also: → 1824872
Flags: needinfo?(mak)

Most of the bookmarks in the "Bookmark Toolbar" are folders: 17
I have over 50 bookmark links.

I was trying to remove all of them, but only around 4 - 6 items or a few folders were deleted before the problem arose.

I ran the memory page, task manager, and browser console for the video attached firefox-mem.mp4.
I hope this can help answer the memory question.

Flags: needinfo?(bluetreemonk)
Attached video firefox-mem.mp4
See Also: → 1878563
Assignee: nobody → mak
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(mak)
Whiteboard: [sng-scrubbed][places-regression]
QA Whiteboard: [qa-regression-triage]

I can easily reproduce the console.error() call being hit, if I create folders with bookmarks, and try to delete them in the right pane of the Library, by holding down the DEL key.

Though I cannot reproduce a situation where console is invalid, or doesn't implement consoleInstance.
Andrew, do you have any idea how we may end up with an invalid console object, maybe it's related to some GC? I wonder if the async function ends up being executed when its global is dead, though it's created in the module.
Without being able to reproduce the failure it's a bit hard to test that hypothesis.

Flags: needinfo?(continuation)

It could be. We've had some weird problems in the past with weak references to XPCWJS, so anything is possible.

Flags: needinfo?(continuation)

There's some unexpected behavior of the console xpc wrapper in this context,
causing console.error to throw and interrupt the operation.

I think the situation here got worse with Bug 1865776 so marking that as regressor

Regressed by: 1865776
Duplicate of this bug: 1878563
See Also: 1878563

Set release status flags based on info from the regressing bug 1865776

Pushed by mak77@bonardo.net: https://hg.mozilla.org/integration/autoland/rev/2a0976bbbb1d console.error sometimes fails in PlacesTransaction. r=places-reviewers,daisuke https://hg.mozilla.org/integration/autoland/rev/b4ad2d3fc0cd Avoid repeated remove operations in Places views. r=places-reviewers,daisuke
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 124 Branch
Flags: qe-verify+

I could partially reproduce the issue on Mac 12.6 (I do not have a Mac 10.15) using Firefox builds 122.0 and 124.0a1(20240127211938), pressing delete button deletes all bookmarks but the error message from comment#6 is displayed on Console.
Bluetreemonk, can you please confirm issue is fixed on your side on latest Beta 124.0b4 (https://archive.mozilla.org/pub/firefox/candidates/124.0b4-candidates). Thank you.

Flags: needinfo?(bluetreemonk)

Build used: https://archive.mozilla.org/pub/firefox/candidates/124.0b4-candidates/build1/mac/en-US/Firefox%20124.0b4.dmg

I did not see any console issues and bookmarks and browser seems to be working as expected after multiple tests.
I was able to repeatedly delete my list of bookmarks without seeing any freeze or other issues.

Videos to be attached.

Flags: needinfo?(bluetreemonk)

Marking issue as fixed on 124, based on comment#17. Thank you.

Status: RESOLVED → VERIFIED

Thank you for the help validating the fix.

Regressions: 1887736
Regressions: 1887989
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: