Closed Bug 2070171 Opened 7 days ago Closed 6 days ago

Infinite loop in `position-anchor` layout

Categories

(Core :: Layout: Positioned, defect, P2)

Firefox 155
defect

Tracking

()

RESOLVED FIXED
157 Branch
Tracking Status
firefox-esr140 --- unaffected
firefox-esr153 --- affected
firefox155 --- wontfix
firefox156 --- affected
firefox157 --- verified
firefox158 --- verified

People

(Reporter: chrisxuche, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression)

Attachments

(6 files)

Attached file about:support.json

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:155.0) Gecko/20100101 Firefox/155.0

Steps to reproduce:

Reproduce:

I captured the stack trace and coredump after I encountered this bug.

I handed the backtrace and core file to my AI agent, they gave me the minimal reproducible example HTML file. I checked and it can reproduce.

  1. I'm running latest ArchLinux + Wayland + KDE. See my setup in attached about:support file
  2. Create a new profile.
  3. Go to about:config and set widget.gtk.overlay-scrollbars.enabled to false.
  4. Open the attached HTML file.
  5. Infinite loop in content process, eats one full CPU core.
  6. Can't gracefully shutdown browser because it's in infinite loop.

GDB backtrace is also attached.


BTW:

Seems it's cause by a skipped result write back of the if (currentFallbackIndex) block.

(I need to figure out how to put multiple attachments on Enter Bug page...)

Attached file Browser Backtrace
Attached file min-repro.html
Component: Untriaged → Graphics: Text
Product: Firefox → Core
Component: Graphics: Text → Layout: Positioned

:emilio, since you are the author of the regressor, bug 1897279, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(emilio)

Thanks for the reduced test-case! Curious, did you spot it on the wild? That would help in terms of considering uplifting the fix to beta / release.

Assignee: nobody → emilio
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(emilio) → needinfo?(chrisxuche)

Yes. I found it when I was using https://chatgpt.com, the page froze when I tried to scroll

Flags: needinfo?(chrisxuche)

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

Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/62567 for changes under testing/web-platform/tests

Please set a severity for this bug.

Flags: needinfo?(emilio)
Status: ASSIGNED → RESOLVED
Closed: 6 days ago
Resolution: --- → FIXED
Target Milestone: --- → 157 Branch
Severity: -- → S2
Flags: needinfo?(emilio)
Priority: -- → P2

If a fallback used to fit, but after fallback none of the positions fit,
we end up in the base position, but we didn't clear the last index
properly, so the fallback reflow kept triggering.

Move the clear to after the loop, and add a test that repros with or
without overlay scrollbars. Add also the test as a crashtest.

Pull request: https://github.com/mozilla-firefox/firefox/pull/362

Attachment #9640298 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: Causes content process hang in realistic scenarios (chatgpt.com seems to be affected for example).
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: yes
  • Steps to reproduce for manual QE testing: comment 0
  • Risk associated with taking this patch: low
  • Explanation of risk level: Relatively straight-forward fix.
  • String changes made/needed?: none
  • Is Android affected?: yes
Flags: qe-verify+

Upstream PR merged by moz-wptsync-bot

Comment on attachment 9640298 [details]
Bug 2070171 - Clear last fallback properly when don't fit after fitting.

It's too late for Fx156 beta, switching the request to release for the planned dot release

Attachment #9640298 - Flags: approval-mozilla-beta? → approval-mozilla-release?

Please add an uplift reqeust for ESR153

Flags: needinfo?(emilio)

firefox-esr153 Uplift Approval Request

  • User impact if declined/Reason for urgency: See above
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: yes
  • Steps to reproduce for manual QE testing: see above
  • Risk associated with taking this patch: low
  • Explanation of risk level: see above
  • String changes made/needed?: none
  • Is Android affected?: yes
Attachment #9640479 - Flags: approval-mozilla-esr153?

If a fallback used to fit, but after fallback none of the positions fit,
we end up in the base position, but we didn't clear the last index
properly, so the fallback reflow kept triggering.

Move the clear to after the loop, and add a test that repros with or
without overlay scrollbars. Add also the test as a crashtest.

Pull request: https://github.com/mozilla-firefox/firefox/pull/362

Flags: needinfo?(emilio)
QA Whiteboard: [uplift][qa-ver-needed-c158/b157]

I was able to reproduce the issue on Ubuntu 24.04 using FF build 155.0.1.
Verified as fixed on Ubuntu 24.04 using FF build 158.0a1 and 157.0b1.

QA Contact: mchiorean
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: