Last Comment Bug 990806 - Fix "Assertion failure: gGotError, at js/src/shell/js.cpp:448" after OOM in the shell
: Fix "Assertion failure: gGotError, at js/src/shell/js.cpp:448" after OOM in t...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
-- normal (vote)
: mozilla31
Assigned To: Jason Orendorff [:jorendorff]
:
: Jason Orendorff [:jorendorff]
Mentors:
Depends on: 1108155
Blocks: 912928 988953
  Show dependency treegraph
 
Reported: 2014-04-01 17:17 PDT by Jason Orendorff [:jorendorff]
Modified: 2014-12-05 16:11 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Part 1 - Call js_ReportOutOfMemory when deliberately triggering an OOM for testing (1.18 KB, patch)
2014-04-01 19:09 PDT, Jason Orendorff [:jorendorff]
terrence.d.cole: review+
Details | Diff | Splinter Review
Part 2 - Add an oomCallback to the shell to make the assertion correct (1.42 KB, patch)
2014-04-01 19:10 PDT, Jason Orendorff [:jorendorff]
terrence.d.cole: review+
Details | Diff | Splinter Review

Description User image Jason Orendorff [:jorendorff] 2014-04-01 17:17:17 PDT
It is surprisingly hard to get this to trip using oomAfterAllocations, because that usually crashes. But for example:

$OBJDIR/dist/bin/js  -e 'const libdir = "js/src/jit-test/lib/";' -f js/src/jit-test/lib/prolog.js -e 'oomAfterAllocations(5301);' -f js/src/jit-test/tests/ion/lookupswitch.js

You may have to try several different numbers in place of 5301.
Comment 1 User image Jason Orendorff [:jorendorff] 2014-04-01 19:09:35 PDT
Created attachment 8400336 [details] [diff] [review]
Part 1 - Call js_ReportOutOfMemory when deliberately triggering an OOM for testing

I have no idea what the performance consequences of this will be. If the compiler is smart, none.
Comment 2 User image Jason Orendorff [:jorendorff] 2014-04-01 19:10:23 PDT
Created attachment 8400337 [details] [diff] [review]
Part 2 - Add an oomCallback to the shell to make the assertion correct
Comment 3 User image Terrence Cole [:terrence] 2014-04-02 07:53:21 PDT
Comment on attachment 8400336 [details] [diff] [review]
Part 1 - Call js_ReportOutOfMemory when deliberately triggering an OOM for testing

Review of attachment 8400336 [details] [diff] [review]:
-----------------------------------------------------------------

r=me If you get regression warnings after pushing it we can revisit.
Comment 4 User image Terrence Cole [:terrence] 2014-04-02 07:54:33 PDT
Comment on attachment 8400337 [details] [diff] [review]
Part 2 - Add an oomCallback to the shell to make the assertion correct

Review of attachment 8400337 [details] [diff] [review]:
-----------------------------------------------------------------

Great! r=me
Comment 6 User image Hannes Verschore [:h4writer] 2014-04-07 02:09:25 PDT
I can still get this assertion failure rather quickly, even with this patch applied. I assume there are other places where we hit this? See bug 727333 comment 9. I don't know if you want to open a new bug for this or fix it in this bug?
Comment 7 User image Jason Orendorff [:jorendorff] 2014-04-08 09:21:48 PDT
New bug, assigned to me, please.

Note You need to log in before you can comment on or make changes to this bug.