Firefox becomes unresponsive after using an infinite loop while visiting about:config page
Categories
(DevTools :: Console, defect)
Tracking
(firefox-esr115 affected, firefox127 affected, firefox128 affected, firefox129 affected)
People
(Reporter: bhidecuti, Unassigned)
References
Details
(Keywords: regressionwindow-wanted)
Attachments
(1 file)
1.97 MB,
video/mp4
|
Details |
Found in
- 128.0b5
Affected versions
- 129.0a1 (2024-06-19)
- 128.0b5
- 127.0.1
- 115.12.0esr
Preconditions
- ‘devtools.chrome.enabled’ pref set to ‘true’
Tested platforms
- Affected platforms: Windows 11, Ubuntu 22.04, MacOS 13 / 14
- Unaffected platforms: none
Steps to reproduce
- Go to about:config and open the Web console (Ctrl + Shift + K)
- Paste ‘while(true);’ in web console and press ‘Enter’
- Interact with the browser
Expected result
- Firefox functions as expected
Actual result
- Firefox becomes unresponsive
Regression range
- Will look for a regressions range ASAP
Additional notes
- See the attached video
- Also reproducing if pasting the expression in the Browser console
- Not reproducing if about:config page was not opened in the current session. However, slowness occurs after running the expression in the current tab
Comment 1•8 months ago
|
||
Do you need devtools.webconsole.input.eagerEvaluation
pref set to true
? In the STR, you say that Firefox becomes unresponsive when you hit Enter, which suggest this is not caused by eager evaluation.
At least if I do all the steps without pressing Enter, everything is fine for me.
I'm asking because we have a specific mechanism in eager evaluation to just bail out in case the evaluation takes too long (added in Bug 1610682): https://searchfox.org/mozilla-central/rev/74518d4f6979b088e28405ba7e6238f4707639cf/devtools/server/actors/webconsole/eval-with-debugger.js#476-484
const timeoutDuration = 100;
const endTime = Date.now() + timeoutDuration;
let count = 0;
function shouldCancel() {
// To keep the evaled code as quick as possible, we avoid querying the
// current time on ever single step and instead check every 100 steps
// as an arbitrary count that seemed to be "often enough".
return ++count % 100 === 0 && Date.now() > endTime;
}
Reporter | ||
Comment 2•8 months ago
|
||
(In reply to Nicolas Chevobbe [:nchevobbe] from comment #1)
Do you need
devtools.webconsole.input.eagerEvaluation
pref set totrue
? In the STR, you say that Firefox becomes unresponsive when you hit Enter, which suggest this is not caused by eager evaluation.
At least if I do all the steps without pressing Enter, everything is fine for me.
I'm asking because we have a specific mechanism in eager evaluation to just bail out in case the evaluation takes too long (added in Bug 1610682): https://searchfox.org/mozilla-central/rev/74518d4f6979b088e28405ba7e6238f4707639cf/devtools/server/actors/webconsole/eval-with-debugger.js#476-484const timeoutDuration = 100; const endTime = Date.now() + timeoutDuration; let count = 0; function shouldCancel() { // To keep the evaled code as quick as possible, we avoid querying the // current time on ever single step and instead check every 100 steps // as an arbitrary count that seemed to be "often enough". return ++count % 100 === 0 && Date.now() > endTime; }
Hi @nchevobbe,
You are correct. This is reproducing if devtools.webconsole.input.eagerEvaluation
pref is set to 'false' as well, and only when pressing the 'Enter' key. I will update the prerequisites accordingly.
Please let me know if I can provide more details. Thanks!
Description
•