TypedArrays should more gracefully handle OOM during slowDownAndWasteMemory
Created attachment 394635 [details] Patch
rdar://problem/60139974
Comment on attachment 394635 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=394635&action=review r=me > Source/JavaScriptCore/API/JSTypedArray.cpp:255 > + return nullptr; remove this? > JSTests/stress/typed-array-oom-in-buffer-accessor.js:1 > +let z = new Float64Array(1000); How slow is this test?
Comment on attachment 394635 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=394635&action=review >> Source/JavaScriptCore/API/JSTypedArray.cpp:255 >> + return nullptr; > > remove this? Removed. >> JSTests/stress/typed-array-oom-in-buffer-accessor.js:1 >> +let z = new Float64Array(1000); > > How slow is this test? 1-2s in Debug.
Created attachment 394644 [details] Patch for landing
Committed r259069: <https://trac.webkit.org/changeset/259069> All reviewed patches have been landed. Closing bug and clearing flags on attachment 394644 [details].
(In reply to EWS from comment #6) > Committed r259069: <https://trac.webkit.org/changeset/259069> The newly added test stress/typed-array-oom-in-buffer-accessor.js seems to be consistently failing on jsc-armv7 and jsc-mips. History: https://results.webkit.org/?suite=javascriptcore-tests&suite=javascriptcore-tests&suite=javascriptcore-tests&test=stress%2Ftyped-array-oom-in-buffer-accessor.js.eager-jettison-no-cjit&test=stress%2Ftyped-array-oom-in-buffer-accessor.js.no-llint&test=stress%2Ftyped-array-oom-in-buffer-accessor.js.no-cjit-validate-phases EWS: https://ews-build.webkit.org/#/builders/26/builds/12663, https://ews-build.webkit.org/#/builders/25/builds/12587 Log: stress/typed-array-oom-in-buffer-accessor.js.dfg-eager: Aborted stress/typed-array-oom-in-buffer-accessor.js.dfg-eager: ERROR: Unexpected exit code: 134 FAIL: stress/typed-array-oom-in-buffer-accessor.js.dfg-eager
(In reply to Aakash Jain from comment #7) > (In reply to EWS from comment #6) > > Committed r259069: <https://trac.webkit.org/changeset/259069> > The newly added test stress/typed-array-oom-in-buffer-accessor.js seems to > be consistently failing on jsc-armv7 and jsc-mips. > > History: > https://results.webkit.org/?suite=javascriptcore-tests&suite=javascriptcore- > tests&suite=javascriptcore-tests&test=stress%2Ftyped-array-oom-in-buffer- > accessor.js.eager-jettison-no-cjit&test=stress%2Ftyped-array-oom-in-buffer- > accessor.js.no-llint&test=stress%2Ftyped-array-oom-in-buffer-accessor.js.no- > cjit-validate-phases > > EWS: https://ews-build.webkit.org/#/builders/26/builds/12663, > https://ews-build.webkit.org/#/builders/25/builds/12587 > > Log: > stress/typed-array-oom-in-buffer-accessor.js.dfg-eager: Aborted > stress/typed-array-oom-in-buffer-accessor.js.dfg-eager: ERROR: Unexpected > exit code: 134 > FAIL: stress/typed-array-oom-in-buffer-accessor.js.dfg-eager If this tests require to allocate more than 512MB of RAM then they need to have this at the top: //@ skip if $memoryLimited And then the ARMv7 and MIPS JSC testers should skip this tests. We run the testers on boards with only 2GB of RAM, also Linux doesn't handle OOM situations as good as Mac/iOS, so this testers run with $memoryLimited config option enabled.
(In reply to Carlos Alberto Lopez Perez from comment #8) > (In reply to Aakash Jain from comment #7) > > (In reply to EWS from comment #6) > > > Committed r259069: <https://trac.webkit.org/changeset/259069> > > The newly added test stress/typed-array-oom-in-buffer-accessor.js seems to > > be consistently failing on jsc-armv7 and jsc-mips. > > > > History: > > https://results.webkit.org/?suite=javascriptcore-tests&suite=javascriptcore- > > tests&suite=javascriptcore-tests&test=stress%2Ftyped-array-oom-in-buffer- > > accessor.js.eager-jettison-no-cjit&test=stress%2Ftyped-array-oom-in-buffer- > > accessor.js.no-llint&test=stress%2Ftyped-array-oom-in-buffer-accessor.js.no- > > cjit-validate-phases > > > > EWS: https://ews-build.webkit.org/#/builders/26/builds/12663, > > https://ews-build.webkit.org/#/builders/25/builds/12587 > > > > Log: > > stress/typed-array-oom-in-buffer-accessor.js.dfg-eager: Aborted > > stress/typed-array-oom-in-buffer-accessor.js.dfg-eager: ERROR: Unexpected > > exit code: 134 > > FAIL: stress/typed-array-oom-in-buffer-accessor.js.dfg-eager > > If this tests require to allocate more than 512MB of RAM then they need to > have this at the top: > //@ skip if $memoryLimited > > And then the ARMv7 and MIPS JSC testers should skip this tests. We run the > testers on boards with only 2GB of RAM, also Linux doesn't handle OOM > situations as good as Mac/iOS, so this testers run with $memoryLimited > config option enabled. Added bug 209661