Closed Bug 1603316 Opened 6 years ago Closed 6 years ago

repeating . and a letter (s) causes firefox to hang in browser

Categories

(Firefox :: Address Bar, defect, P2)

71 Branch
Desktop
All
defect
Points:
1

Tracking

()

VERIFIED FIXED
Firefox 74
Iteration:
74.1 - Jan 6 - Jan 19
Tracking Status
firefox71 --- wontfix
firefox72 --- wontfix
firefox73 --- wontfix
firefox74 --- verified

People

(Reporter: astroparty1232, Assigned: adw)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:71.0) Gecko/20100101 Firefox/71.0

Steps to reproduce:

open tab
alternate inputting s and .
after a while browser slows, hangs and forces to restart manually

Actual results:

browser hanged

Expected results:

nothing

i was able to replicate in windows10 64bit and Ubuntu 18.04 64bit and Macos 10.15 using:

Firefox Nightly 73.0a1
Firefox beta 72.0b7
Firefox release 71

Component: Untriaged → Search
OS: Unspecified → All
Hardware: Unspecified → Desktop

Doesn't reproduce in the search bar, but it does in the address bar. I suspect this is something to do with the ip-detection code.

Component: Search → Address Bar
Status: UNCONFIRMED → NEW
Ever confirmed: true

The priority flag is not set for this bug.
:adw, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(adw)

Doesn't take a very long string to make this happen. Maybe it's hitting the same regexp that bug 1587867 hit. If so, we can see if the original patch in that bug helps. Worth investigating for sure.

Points: --- → 3
Flags: needinfo?(adw)
Priority: -- → P2
See Also: → 1587867
See Also: → 1605108

The problem seems to be that there is a dot in both the first square-bracket group and after the group, in this regexp: https://searchfox.org/mozilla-central/rev/c52d5f8025b5c9b2b4487159419ac9012762c40c/toolkit/components/places/UnifiedComplete.jsm#565

Removing the one inside the group fixes both bug 1603316 and bug 1605108. I'm not sure why there was a dot inside the group to begin with. Am I missing something? This regexp is testing for IPv4 addresses.

Assignee: nobody → adw
Status: NEW → ASSIGNED
Iteration: --- → 74.1 - Jan 6 - Jan 19
Points: 3 → 1
Pushed by dwillcoxon@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/84322e2831b1 Quantumbar: Fix slow regexp that tests for IPv4 URLs. r=mak
Blocks: 1605108
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 74

Ryan, did you mean to set 73 to wontfix? Is it too late? This would be nice, and it's only a one-line regexp change, so it's safe to uplift.

Flags: needinfo?(ryanvm)

I was a bit worried about unintended consequences and we're building the Fx73 RC the week after next (with next week being an All Hands), so there won't be a lot of time to deal with any fallout. Based on that, I felt that getting more bake time with 74 seemed reasonable. How confident are we in our test coverage here uplifting into late Beta isn't scary?

Flags: needinfo?(ryanvm) → needinfo?(adw)

I'm pretty confident about test coverage. We don't have coverage for this regexp's performance, but we do have lots of coverage for the urlbar that would catch regressions.

But there's no rush for this and it's more of a nice to have, and given your reasoning, which makes sense, I'm OK with not uplifting. Thanks Ryan.

Flags: needinfo?(adw)

Reproduced the initial issue on Windows 10 x64 using Fx 72.0b7.

Confirming this is fixed using Fx 74.0b4, build ID 20200216164042 on:

  • Windows 10 x64
  • Ubuntu 18.04 x64
  • macOS 10.15.3
Status: RESOLVED → VERIFIED
Flags: qe-verify+
QA Contact: cornel.ionce
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: