New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 686663 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug



Sign in to add a comment

Fatal error in v8::Isolate::Dispose

Project Member Reported by ClusterFuzz, Jan 30 2017

Issue description

Components: Blink>JavaScript
Cc: mstarzinger@chromium.org yangguo@chromium.org
Owner: jgruber@chromium.org
Status: Assigned (was: Untriaged)
Looks like a plain OOM while generating RegExp code. Please confirm that this is working as intended and close if not actionable.
Weird. I remember Erik adding an upper limit to the RegExp code size. Maybe the AST is hitting OOM?
Nah, it's specifically the Assembler buffer that is OOMing, here are the top-most ten frames at the OOM site:

#0  v8::base::OS::Abort () at ../src/base/platform/platform-posix.cc:253
#1  0x0000000000faf2a8 in v8::Utils::ReportOOMFailure (location=0x221e89b "Assembler::GrowBuffer", is_heap_oom=false) at ../src/api.cc:409
#2  0x0000000000faf11d in v8::internal::V8::FatalProcessOutOfMemory (location=0x221e89b "Assembler::GrowBuffer", is_heap_oom=false) at ../src/api.cc:380
#3  0x0000000001936ceb in v8::internal::Assembler::GrowBuffer (this=0x7fffffffcb80) at ../src/x64/assembler-x64.cc:413
#4  0x0000000001033900 in v8::internal::EnsureSpace::EnsureSpace (this=0x7fffffff5668, assembler=0x7fffffffcb80) at .././src/x64/assembler-x64.h:2516
#5  0x000000000193d29a in v8::internal::Assembler::movsxlq (this=0x7fffffffcb80, dst=..., src=...) at ../src/x64/assembler-x64.cc:1646
#6  0x00000000019b7f1f in v8::internal::RegExpMacroAssemblerX64::Pop (this=0x7fffffffcb60, target=...) at ../src/regexp/x64/regexp-macro-assembler-x64.cc:1331
#7  0x00000000019becb2 in v8::internal::RegExpMacroAssemblerX64::PopCurrentPosition (this=0x7fffffffcb60) at ../src/regexp/x64/regexp-macro-assembler-x64.cc:1066
#8  0x00000000017731a8 in v8::internal::Trace::Flush (this=0x7fffffff5d38, compiler=0x7fffffffcd78, successor=0x28197d8) at ../src/regexp/jsregexp.cc:1425
#9  0x000000000177409d in v8::internal::RegExpNode::LimitVersions (this=0x28197d8, compiler=0x7fffffffcd78, trace=0x7fffffff5d38) at ../src/regexp/jsregexp.cc:2272
#10 0x000000000177e096 in v8::internal::ActionNode::Emit (this=0x28197d8, compiler=0x7fffffffcd78, trace=0x7fffffff5d38) at ../src/regexp/jsregexp.cc:4275

(gdb) f 3
(gdb) p desc.buffer_size 
$1 = 1073741824

This regexp seems to have quadratic growth in code size through backtracking (each \b causes us to backtrack through all previous \b's).

RegExpCompiler::reg_exp_too_big_ does not seem to handle this case, it is only triggered through (regexp) register allocation, TextNode::Emit and Trace::AdvanceCurrentPosition.

Yang, perhaps it'd make sense to collapse successive '\b' and '\B's? They seem to be idempotent.
collapsing makes sense. but adding more checks for size limit also makes sense, to catch similar issues.
 Issue 702135  has been merged into this issue.
Status: WontFix (was: Assigned)
We don't have a mechanism to abort regexp code generation and I don't see an easy way to add code size checks.

Opened  crbug.com/v8/6126  for collapsing repeated boundary check nodes and closing the OOM as not actionable.
Acknowledged. Will triage further OOM reports by ClusterFuzz accordingly. Thanks!
Cc: mmoroz@chromium.org jgruber@chromium.org
 Issue 735559  has been merged into this issue.
 Issue 759531  has been merged into this issue.
 Issue 760599  has been merged into this issue.
Cc: msrchandra@chromium.org sandeepkumars@chromium.org
 Issue 761133  has been merged into this issue.
 Issue 765981  has been merged into this issue.
Cc: pnangunoori@chromium.org
 Issue 778948  has been merged into this issue.
 Issue 784034  has been merged into this issue.

Sign in to add a comment