[v8-users] OOM in Heap::ReserveSpace

2018-07-03 Thread Yvonne Chen
Hi,

I'm in the process of trying to upgrade from v8 6.0.186 to 6.7.288.46. In 
heap.cc, the latter now has a check for !deserialization_complete_ before 
throwing an OOM error. For some reason, my code can create one Isolate just 
fine, but if I try to create another, I run into the error. The comments in 
heap.cc suggest a low max old space size as a possible reason, but my code 
uses all defaults for heap initial values and everything worked fine on the 
previous v8 version, so that seems unlikely to be the culprit. What other 
possible cases could result in deserialization_complete_ being false at 
this point? Or maybe perform_gc is getting set when it's not supposed to be?

Stack trace, not sure if it helps much though:

<--- Last few GCs --->


<--- JS stacktrace --->


#
# Fatal process OOM in insufficient memory to create an Isolate
#


Thread 12 "threadname" received signal SIGILL, Illegal instruction.
[Switching to Thread 0x748eb700 (LWP 2646)]
v8::base::OS::Abort () at ../../src/base/platform/platform-posix.cc:381
381 V8_IMMEDIATE_CRASH();
(gdb) bt
#0  v8::base::OS::Abort () at ../../src/base/platform/platform-posix.cc:381
#1  0x007bb68a in v8::Utils::ReportOOMFailure ()
at ../../src/api.cc:432
#2  0x007bb887 in v8::internal::V8::FatalProcessOutOfMemory ()
at ../../src/api.cc:400
#3  0x0097231c in v8::internal::Heap::ReserveSpace ()
at ../../src/heap/heap.cc:1611
#4  0x00ee7914 in 
v8::internal::DefaultDeserializerAllocator::ReserveSpace () at 
../../src/snapshot/default-deserializer-allocator.cc:177
#5  0x00b87e93 in 
v8::internal::StartupDeserializer::DeserializeInto ()
at ../../src/snapshot/startup-deserializer.cc:21
#6  0x009f8593 in v8::internal::Isolate::Init ()
at ../../src/isolate.cc:3068
#7  0x00b87958 in v8::internal::Snapshot::Initialize ()
at ../../src/snapshot/snapshot-common.cc:54
#8  0x007d1208 in v8::IsolateNewImpl () at ../../src/api.cc:8367

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[v8-users] Re: Building V8 on Windows with Visual Studio 2017

2018-07-03 Thread Mike Moening
Oh and I've tried running: *gclient sync *from my v8 directory:

C:\Dev\common\v8>gclient sync
C:\Dev\common\.gclient_entries missing, .gclient file in parent directory 
C:\Dev\common might not be the file you want to use.

and it doesn't seem to bring down *third_party/llvm-build*
Should it??
What am I missing?

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[v8-users] Building V8 on Windows with Visual Studio 2017

2018-07-03 Thread Mike Moening
I'm trying to build V8 as a static library using Visual Studio 2017 
(apparently 2017 is now required). I've done it in the past with VC 2015 
successfully.
After setting many environment variables and paths and following all the 
instructions multiple times it still won't work.

I've got this in my PATH:
C:\utility\depot_tools;C:\Utility\depot_tools\win_tools-2_7_6_bin\python\bin\

And these variables set:
DEPOT_TOOLS_WIN_TOOLCHAIN = 0
GYP_MSVS_OVERRIDE_PATH = C:\Program Files (x86)\Microsoft Visual 
Studio\2017\Professional
GYP_MSVS_VERSION = 2017
WINDOWSSDKDIR = C:\Program Files (x86)\Windows Kits\10

My args.gn file contains this:
is_debug = false
target_cpu = "x64"
is_component_build = false
v8_static_library = true

I think the build process seems to be looking for this:
*../../third_party/llvm-build/Release+Asserts/bin/clang-cl.exe*

Which was not installed, and I don't have.
See build errors below.  This repeats quite a few times for different .obj 
files.

C:\Dev\common\v8>ninja -C out.gn/x64.release
ninja: Entering directory `out.gn/x64.release'
[1/1711] CXX obj/v8_libbase/bits.obj
FAILED: obj/v8_libbase/bits.obj
../../third_party/llvm-build/Release+Asserts/bin/clang-cl.exe /nologo 
/showIncludes  "-imsvc..\..\..\..\..\Program Files (x86)\Microsoft Visual 
Studio\2017\Professional\VC\Tools\MSVC\14.14.26428\ATLMFC\include" 
"-imsvc..\..\..\..\..\Program Files (x86)\Microsoft Visual 
Studio\2017\Professional\VC\Tools\MSVC\14.14.26428\include" 
"-imsvc..\..\..\..\..\Program Files (x86)\Windows 
Kits\NETFXSDK\4.6.1\include\um" "-imsvc..\..\..\..\..\Program Files 
(x86)\Windows Kits\10\include\10.0.17134.0\ucrt" 
"-imsvc..\..\..\..\..\Program Files (x86)\Windows 
Kits\10\include\10.0.17134.0\shared" "-imsvc..\..\..\..\..\Program Files 
(x86)\Windows Kits\10\include\10.0.17134.0\um" 
"-imsvc..\..\..\..\..\Program Files (x86)\Windows 
Kits\10\include\10.0.17134.0\winrt" "-imsvc..\..\..\..\..\Program Files 
(x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" -D_CRT_RAND_S 
-DV8_DEPRECATION_WARNINGS -DUSE_AURA=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING 
-DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD 
-DFIELDTRIAL_TESTING_ENABLED "-DCR_CLANG_REVISION=\"335608-1\"" 
-D_HAS_NODISCARD -D_HAS_EXCEPTIONS=0 -D__STD_C -D_CRT_RAND_S 
-D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE -D_ATL_NO_OPENGL 
-D_WINDOWS -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -DPSAPI_VERSION=1 -DWIN32 
-D_SECURE_ATL -D_USING_V110_SDK71_ 
-DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -DWIN32_LEAN_AND_MEAN -DNOMINMAX 
-D_UNICODE -DUNICODE -DNTDDI_VERSION=0x0A02 -D_WIN32_WINNT=0x0A00 
-DWINVER=0x0A00 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 
-DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -DENABLE_MINOR_MC -DV8_INTL_SUPPORT 
-DENABLE_HANDLE_ZAPPING -DV8_USE_SNAPSHOT -DV8_USE_EXTERNAL_STARTUP_DATA 
-DV8_CONCURRENT_MARKING -DV8_EMBEDDED_BUILTINS -DV8_TARGET_ARCH_X64 -I../.. 
-Igen -I../.. -Igen /utf-8 /X -Wno-builtin-macro-redefined -D__DATE__= 
-D__TIME__= -D__TIMESTAMP__= -fcolor-diagnostics -fmerge-all-constants 
-Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 
-no-canonical-prefixes -fcomplete-member-pointers /Gy /FS /bigobj 
/d2FastFail /Zc:sizedDealloc- -fmsc-version=1911 -m64 /Brepro /W4 
-Wimplicit-fallthrough -Wthread-safety /WX /wd4091 /wd4127 /wd4251 /wd4275 
/wd4312 /wd4324 /wd4351 /wd4355 /wd4503 /wd4589 /wd4611 /wd4100 /wd4121 
/wd4244 /wd4505 /wd4510 /wd4512 /wd4610 /wd4838 /wd4995 /wd4996 /wd4456 
/wd4457 /wd4458 /wd4459 /wd4200 /wd4201 /wd4204 /wd4221 /wd4018 /wd4245 
/wd4267 /wd4305 /wd4389 /wd4702 /wd4701 /wd4703 /wd4661 /wd4706 /wd4715 
/wd4702 -Wno-missing-field-initializers -Wno-unused-parameter 
-Wno-c++11-narrowing -Wno-covered-switch-default 
-Wno-unneeded-internal-declaration -Wno-undefined-var-template 
-Wno-address-of-packed-member -Wno-nonportable-include-path 
-Wno-user-defined-warnings -Wno-unused-lambda-capture 
-Wno-null-pointer-arithmetic -Wno-enum-compare-switch 
-Wno-ignored-pragma-optimize /Z7 -fno-standalone-debug /MT -Wheader-hygiene 
-Wstring-conversion -Wtautological-overlap-compare 
-Wmissing-field-initializers -Winconsistent-missing-override 
-Wunreachable-code -Wshorten-64-to-32 /wd4245 /wd4267 /wd4324 /wd4701 
/wd4702 /wd4703 /wd4709 /wd4714 /wd4715 /wd4718 /wd4723 /wd4724 /wd4800 /O2 
/Ob2 /Oy- /Zc:inline /Gw /TP /wd4577 /GR- /c ../../src/base/bits.cc 
/Foobj/v8_libbase/bits.obj /Fd"obj/v8_libbase_cc.pdb"CreateProcess failed: 
The system cannot find the file specified.

How do I fix this?
Do I need *third_party/llvm-build/Release+Asserts/bin/clang-cl.exe* ??
or is there some other magic switch I need to set?

Thanks,

Mike

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit