Closed
Bug 941649
Opened 11 years ago
Closed 11 years ago
Multiple jit-tests fail on single core ARM target. (mostly parallel tests)
Categories
(Core :: JavaScript Engine: JIT, defect)
Tracking
()
RESOLVED
FIXED
mozilla28
People
(Reporter: rankov, Assigned: pnkfelix)
References
Details
Attachments
(4 files, 3 obsolete files)
1002 bytes,
patch
|
Details | Diff | Splinter Review | |
1.77 KB,
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
3.65 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
709 bytes,
patch
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0 (Beta/Release)
Build ID: 20131115110311
Steps to reproduce:
On ARM target with a single core, build SpiderMonkey with following configure options:
../configure --target=arm-linux-gnueabi --enable-debug --disable-optimize --without-intl-api --disable-gold --with-system-nspr --with-nspr-prefix=....
The code was taken from mozilla-central repository.
Run the jit tests with following options
./jit-test/jit_test.py arm_build/shell/js --tbpl --write-failure-output -w test-jit.log -t 5000
Actual results:
The following tests failed:
basic/bug839215.js
basic/offThreadCompileScript.js
debug/onNewScript-off-main-thread.js
ion/bug906885.js
parallel/Array-buildPar-nested.js
parallel/Array-filterPar-truthy.js
parallel/Array-mapPar-assign-to-def-prop.js
parallel/Array-mapPar-nested.js
parallel/Array-mapPar-short.js
parallel/Array-reducePar-nested-sum-each-row.js
parallel/alloc-array-nonwritable.js
parallel/alloc-array.js
parallel/alloc-different-objs.js
parallel/alloc-many-objs.js
parallel/alloc-obj.js
parallel/alloc-too-many-objs.js
parallel/bailout-executed.js
parallel/bitops-values.js
parallel/bug853573.js
parallel/bug909743.js
parallel/closure-allocate-invoke.js
parallel/closure-creation.js
parallel/closure-eta-expand.js
parallel/closure-invoke.js
parallel/closure-nested-branch.js
parallel/closure-nested-compute.js
parallel/closure-nested.js
parallel/createthis.js
parallel/ic-setelement.js
parallel/ic-setproperty.js
parallel/reduce-higher-dim.js
parallel/scan-3.js
parallel/scatter-10.js
parallel/scatter-11.js
parallel/scatter-12.js
parallel/scatter-13.js
parallel/scatter-6.js
parallel/scatter-7.js
parallel/scatter-8.js
parallel/strings.js
parallel/write-array.js
parallel/write-obj.js
Expected results:
The tests should pass.
Reporter | ||
Updated•11 years ago
|
Hardware: x86_64 → ARM
Reporter | ||
Comment 1•11 years ago
|
||
I have investigated the cause of these failures:
basic/bug839215.js is due to low memory, so it should be ignored. It works once swap is enabled.
All the other failures are provoked by this change: https://hg.mozilla.org/mozilla-central/rev/86ffabbadeb6
If this is reverted, the tests pass.
Tests basic/offThreadCompileScript.js and debug/onNewScript-off-main-thread.js fail because there are no worker threads on which to compile.
The rest of the tests fail because rt->workerThreadState is not initialized.
Assignee | ||
Comment 2•11 years ago
|
||
rankov: If you could give this a whirl on your platform, that would be great.
Assignee: nobody → pnkfelix
Attachment #8339274 -
Flags: review?(shu)
Attachment #8339274 -
Flags: feedback?(branislav.rankov)
Assignee | ||
Comment 3•11 years ago
|
||
My hope is that this will catch future instances of this bug.
Attachment #8339278 -
Flags: review?(shu)
Reporter | ||
Comment 4•11 years ago
|
||
Comment on attachment 8339274 [details] [diff] [review]
patch A v1: init workerThreadState in ForkJoinShared
Review of attachment 8339274 [details] [diff] [review]:
-----------------------------------------------------------------
I applied the patch and tested the bugs that previously failed. All the bugs that segfaulted previously, now pass.
Only bugs that fail now are: basic/offThreadCompileScript.js and debug/onNewScript-off-main-thread.js. These are a separate issue and are reported under bug941672.
Comment 5•11 years ago
|
||
Comment on attachment 8339274 [details] [diff] [review]
patch A v1: init workerThreadState in ForkJoinShared
Review of attachment 8339274 [details] [diff] [review]:
-----------------------------------------------------------------
I'm not comfortable with us initializing workerThreadState here. We're don't use asynchronous worker threads -- other than getting the # of threads we should try to use here: http://dxr.mozilla.org/mozilla-central/source/js/src/vm/ThreadPool.cpp#198
The existing assumption in bhackett's code seems to be: if it's not a JSContext, it's an async worker thread. Seems like the correct fix here would be fix those places to also take into account ForkJoin as well.
Attachment #8339274 -
Flags: review?(shu)
Comment 6•11 years ago
|
||
s/We're/We/
Updated•11 years ago
|
Attachment #8339278 -
Flags: review?(shu)
Comment 7•11 years ago
|
||
Brian, is WorkerThreadState only meant to be used for synchronization between the async worker threads with specific workloads (parsing, Ion, etc)?
Flags: needinfo?(bhackett1024)
Comment 8•11 years ago
|
||
Comment on attachment 8339278 [details] [diff] [review]
patch B v1: assert workerThreadState inited for non JS context
Review of attachment 8339278 [details] [diff] [review]:
-----------------------------------------------------------------
On second thought, this seems like a useful addition.
Felix, could you make this only for ExclusiveContext, not JS or ForkJoin?
Attachment #8339278 -
Flags: review+
Comment 9•11 years ago
|
||
No reason to special case when the machine is single-cored. There'll always be a main thread, so always report num workers as num CPUs - 1.
Attachment #8339660 -
Flags: review?(luke)
Comment 10•11 years ago
|
||
PJS hits the off-main-thread path as well, but since PJS is synchronous with the main thread, there's no need to lock or wait.
Attachment #8339662 -
Flags: review?(bhackett1024)
Comment 11•11 years ago
|
||
Comment on attachment 8339660 [details] [diff] [review]
Part 1: Always report number of workers as number of CPUs - 1
The reason for the original change is that, in various cases, including parallel asm.js compilation, the main thread blocks on compilation threads so we actually want, e.g., 2 helper threads on a 2 core machine. The one-core special case is to avoid turning on background ion compilation when there is only 1 core since this measurably hurt perf. That's kindof a hack, though, and I have a better fix in bug 941827 which hopefully would land soon.
Attachment #8339660 -
Flags: review?(luke)
Comment 12•11 years ago
|
||
We should be using # of worker threads to test for success of OMT stuff, not whether or not the build is threadsafe.
Attachment #8339691 -
Flags: review?(luke)
Comment 13•11 years ago
|
||
(In reply to Luke Wagner [:luke] from comment #11)
> Comment on attachment 8339660 [details] [diff] [review]
> Part 1: Always report number of workers as number of CPUs - 1
>
> The reason for the original change is that, in various cases, including
> parallel asm.js compilation, the main thread blocks on compilation threads
> so we actually want, e.g., 2 helper threads on a 2 core machine. The
> one-core special case is to avoid turning on background ion compilation when
> there is only 1 core since this measurably hurt perf. That's kindof a hack,
> though, and I have a better fix in bug 941827 which hopefully would land
> soon.
I see. In that case PJS needs to do its own thing.
Comment 14•11 years ago
|
||
Part 2 fixes the parallel tests, and part 3 fixes the rest.
Updated•11 years ago
|
Attachment #8339691 -
Flags: review?(luke) → review+
Updated•11 years ago
|
Attachment #8339662 -
Flags: review?(bhackett1024) → review+
Updated•11 years ago
|
Attachment #8339660 -
Attachment is obsolete: true
Comment 15•11 years ago
|
||
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/2e43ded4b791
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/de5aa094b55f
Marking as [leave open] for Felix's assert patch.
Whiteboard: [leave open]
Comment 16•11 years ago
|
||
Reporter | ||
Comment 17•11 years ago
|
||
I run tests on my platform with the latest code from mozilla-central and all the test listed above pass now.
A side note: I cannot modify the feedback flag. Can someone else update it for me?
Assignee | ||
Updated•11 years ago
|
Attachment #8339274 -
Flags: feedback?(branislav.rankov)
Assignee | ||
Comment 18•11 years ago
|
||
Attachment #8339278 -
Attachment is obsolete: true
Assignee | ||
Updated•11 years ago
|
Attachment #8340302 -
Attachment description: patch B v1: assert workerThreadState inited for exclusive context → patch B v2: assert workerThreadState inited for exclusive context
Assignee | ||
Comment 19•11 years ago
|
||
(added #ifdef JS_WORKER_THREADS guard)
Attachment #8340302 -
Attachment is obsolete: true
Updated•11 years ago
|
Flags: needinfo?(bhackett1024)
Assignee | ||
Comment 20•11 years ago
|
||
try build for patch B v3:
https://tbpl.mozilla.org/?tree=Try&rev=87887d8f805f
Assignee | ||
Comment 21•11 years ago
|
||
The assert landed in:
https://hg.mozilla.org/integration/mozilla-inbound/rev/17aacd34982c
thus removing [leave open] mark.
Whiteboard: [leave open]
Comment 22•11 years ago
|
||
You need to manually close the bug, because the scripts that update bugs to closed only run when patches are merged to mozilla-central.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
You need to log in
before you can comment on or make changes to this bug.
Description
•