Closed Bug 540306 Opened 15 years ago Closed 14 years ago

Ubiquity hangs since tracemonkey 2010-01-05-04, no "Unresponsive script" message

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
critical

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: asqueella, Unassigned)

References

Details

(Keywords: hang, regression)

Attachments

(1 file)

Steps to reproduce:
1. hg clone https://ubiquity.mozilla.com/hg/ubiquity-firefox
2. hg tip
changeset:   3447:55f148ad19d6
tag:         tip
user:        satyr <murky.satyr@gmail.com>
date:        Sat Dec 05 09:00:19 2009 +0900
summary:     locale/it-IT: Removed an accidental "f".
3. cd ubiquity-firefox
4. ./manage.py install -p <clean profile>
5. Run firefox on that profile, activate ubiquity (Ctrl+TAB on windows, Alt+TAB on Mac by default).
6. Press "z"

Actual results: Firefox stops responding, no "Unresponsive script" message, despite the dom.max_chrome_script_run_time > 0.

Expected results: no hang.

2010-01-04-04-tracemonkey: works
2010-01-05-04-tracemonkey: fail
2010-01-05-04-mozilla-central: works (so this is not due to the merge from m-c)
2010-01-11-04-mozilla-central: works
2010-01-12-05-mozilla-central: fail (with the merge from tracemonkey)
http://hg.mozilla.org/tracemonkey/pushloghtml?fromchange=c00e5b745651&tochange=6d00d56ab3ed

The hanging process is initialized in __delayedProcessInput in ubiquity.js, which apparently creates a generator that does the actual work.

No minimized testcase, sorry, because I hit bug 531886.
> 5. Run firefox on that profile, activate ubiquity (Ctrl+TAB on windows, Alt+TAB
> on Mac by default).

Sorry, CTRL/ALT+SPACE, not TAB.
Any chance you could test builds and bisect that TM regression range down to one patch?
If I didn't mess it up, bisect points to http://hg.mozilla.org/tracemonkey/rev/3862a7e48e79 (bug 98409)... If so, ubiquity probably was relying on the old behavior and should be fixed, but it requires someone familiar with that code to figure it out...

The "Unresponsive script" not appearing is probably a separate issue, which I think is a bug.
can you clarify what the fix is? remove the re-use of a regexp inside a loop?
Reusing a regexp literal in a loop now means re-evaluating it to a fresh object every iteration, just as with object, array, and function literals -- so it seems there's a loop that expected the regexp literal to create a singleton, which would eventually mismatch due to its one and only lastIndex marching off the end of the target string -- assuming the g flag was used.

Someone needs to use firebug or poor-man's profiling (interrupt in gdb or msvc) and find the loop.

/be
satyr: yes, that appears to fix the hang I experienced. Thanks!

Anyone interested in figuring out why the "Unresponsive script" dialog didn't pop up in this case?
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: