Closed Bug 572600 Opened 14 years ago Closed 14 years ago

Skip jstests which scatter

Categories

(Core :: JavaScript Engine, defect)

1.9.2 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: wes, Unassigned)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

I've identified all the tests which call scatter() that are run jstests.py.  These tests, by their very nature, are no longer reliable with tracemonkey-current and should be disabled by default.
Attachment #451808 - Attachment is patch: true
Attachment #451808 - Attachment mime type: application/octet-stream → text/plain
Attachment #451808 - Flags: review?(jorendorff)
Attachment #451808 - Flags: review?(jorendorff) → review+
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Why are scatter tests unreliable?  Is there a bug for making them reliable again?  I don't like marking tests as "skip" without "# bug _____".
Jesse,

The tracing JIT, fast arrays, and a host of other changes since JS 1.7 (well, 1.6 if you include E4X, generators) have made the "old way" of running multi-threaded JavaScript programs buggy as heck. I don't believe the browser has ever used MT JS.

I'm not sure what bug numbers to reference, as this is more of an underlying design shift within JSAPI. Bug 419537, which is only part of the issue, has been WONTFIXed. At some point, gal(?) hopes to add MT proxies which can be used to share objects across threads again, but I'm not sure if even that will allow scatter to be re-written in a reliable way.
Ok, I see.  scatter() is tied to the old threading model.  There are plans to remove it in bug 547712 and fix the tests that can be fixed.
Wes,

I appreciate that you've had difficulties with threading, certainly.  Even so, only multithreaded programs with free-racing shared-object models are likely to have problems, and without synchronization capabilities exposed to script they were always playing with fire (racing of array mutations and .length updating, for example, or even in-place sorting).  The browser uses multithreaded JS for workers, and in various extensions, and has for some time; problems we have there are very rarely due to issues in the JS engine, but more commonly in XPConnect or embedding/extension code.
Mike,

I think we're having communication difficulties, or rather, I was unclear in comment 3.

When I say "multithreaded JavaScript programs", I literally mean multiple threads executing JavaScript on the same objects (in particular the global object) at the same time.  I.e. the JavaScript code is multi-threaded, as opposed to JS code running in an environment where multiple threads exist running non-racing JS.

Argh. Need vocabulary.
The tests disabled here and scatter() in general are exactly that kind of code.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: