New issue
Advanced search Search tips

Issue 734023 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

[Windows] Error C3859: virtual memory range for PCH exceeded

Project Member Reported by msarda@chromium.org, Jun 16 2017

Issue description

Each time I sync a my tree, I get the following error (not necessarely when building the same file though):
FAILED: obj/content/browser/browser/synthetic_mouse_driver.obj
ninja -t msvc -e environment.x64 -- "c:\src\chromium\src\third_party\depot_tools\win_toolchain\vs_files\a11b39300bafe01d9d46bbc16483e373503acc29\vc\bin\amd64/cl.exe" /nologo /showIncludes /FC @obj/content/browser/browser/synthetic_mouse_driver.obj.rsp /c ../../content/browser/renderer_host/input/synthetic_mouse_driver.cc /Foobj/content/browser/browser/synthetic_mouse_driver.obj /Fd"obj/content/browser/browser_cc.pdb"
c1xx: error C3859: virtual memory range for PCH exceeded; please recompile with a command line option of '-Zm14' or greater
c1xx: fatal error C1076: compiler limit: internal heap limit reached; use /Zm to specify a higher limit

Details of my machine: Windows 10, 64 GB or RAM, a lot of free space on disk

I use the following command to generate my project:
gn gen --ide=vs2017 --filters=//base/*;//chrome/*;//components/*;//google_apis/* --sln=all_chrome_nodeps --no-deps out\Debug_2017

I have found the following link that discusses about this issue: https://msdn.microsoft.com/en-us/library/bdscwf1c.aspx
 

Comment 1 by msarda@chromium.org, Jun 16 2017

Cc: jsc...@chromium.org brucedaw...@chromium.org
Bruce / Justin: I am CC-ing you on this bug as it looks like it is related to the Windows build and I am not sure what the right component for this bug should be. 

Would you mind helping me to find the right owner for this bug? Thank you.
What is the ninja command that you are invoking?

Since other people are not reporting this I would assume that there is something specific about your build steps which is causing this.

For building purposes the only part of your "gn gen" line which should be relevant is this:

> gn gen out\Debug_2017

which is pretty boring. So, there must be something about how you are building Chrome. Are you building from the command-line or from VS 2017? The simplest build command would be:

gn clean out\Debug_2017
ninja -C out\Debug_2017 chrome

Comment 3 by msarda@chromium.org, Jun 22 2017

I do not have any special gn arguments.

I generate my projects with: 
gn gen --ide=vs2017 --filters=//base/*;//chrome/*;//components/*;//google_apis/* --sln=all_chrome_nodeps --no-deps out\Debug_2017

I build with:
ninja -C out\Debug_2017 -j 200 chrome

I've used a lower limit for the number of jobs and builds fine now. Is 200 jobs too much for a local build on a very powerful machine (a Z840)?
Status: WontFix (was: Untriaged)
ninja defaults to -j N+2 where 'N' is the number of hardware threads. So, on a 24-core 48-thread Z840 it defaults to -j 50.

I think that that is too high as it can end up starving the programs that I am trying to use. And, given the nature of hyper-threading, it offers little benefit over -j N-2.

So yeah, -j 200 is too much. It probably has no advantages and it risks having you run out of memory, or at least run dangerously low. You need as much free memory as possible to work as disk cache. I'll bet your builds will be faster if you use a much smaller -j value, or just omit it and use the ninja default.

Sign in to add a comment