sdk icon indicating copy to clipboard operation
sdk copied to clipboard

Building the CLI gives a out of memory exception

Open davidfowl opened this issue 10 years ago • 22 comments

On OSX El Capitan.

~/dev/cli
*** Testing stage2... ***
Publishing E2E for DNXCore,Version=v5.0/osx.10.10-x64
Compiling Microsoft.Extensions.DependencyModel for DNXCore,Version=v5.0

Unhandled Exception: OutOfMemoryException.
Copy From: /Users/dfowler/dev/cli/artifacts/tests/Microsoft.Extensions.DependencyModel.dll
       To: /Users/dfowler/dev/cli/artifacts/osx.10.10-x64/stage2/bin/
Copy From: /Users/dfowler/dev/cli/artifacts/tests/Microsoft.Extensions.DependencyModel.pdb
       To: /Users/dfowler/dev/cli/artifacts/osx.10.10-x64/stage2/bin/

Compilation failed.
    0 Warning(s)
    0 Error(s)

Time elapsed 00:00:01.3028968

Published 0/1 projects successfully

davidfowl avatar Dec 26 '15 10:12 davidfowl

I'm seeing the same. This only started yesterday and only repros on el cap. Exception is getting swallowed so no idea where this is coming from...

TheRealPiotrP avatar Dec 26 '15 22:12 TheRealPiotrP

So 2 things:

  • why is the ci passing?
  • can we revert the change that is causing it?

davidfowl avatar Dec 26 '15 22:12 davidfowl

CI is not on El Cap yet. Have you identified the offending PR?

TheRealPiotrP avatar Dec 26 '15 22:12 TheRealPiotrP

F# support PR is what makes it fail

/cc @KevinRansom @enricosada

davidfowl avatar Dec 27 '15 12:12 davidfowl

I have not added an E2E test for fsharp.

I cannot repro. No El cap locally in OS X

enricosada avatar Dec 28 '15 20:12 enricosada

We are seeing this our VSO builds for OS X.

Relevant Error:

2015-12-23T09:18:53.228Z: Publishing E2E for DNXCore,Version=v5.0/osx.10.10-x64
2015-12-23T09:18:54.069Z: Compiling Microsoft.Extensions.DependencyModel for DNXCore,Version=v5.0
2015-12-23T09:18:54.692Z: 
2015-12-23T09:18:54.692Z: Unhandled Exception: OutOfMemoryException.

This seems to have appeared with the Server GC change to CoreHost. PR dotnet/cli#638

@schellap

brthor avatar Dec 29 '15 00:12 brthor

Taking a look

schellap avatar Dec 29 '15 00:12 schellap

The PR dotnet/cli#658 undoes SERVER_GC change for CLI which causes this problem.

We need to resolve dotnet/sdk#4567 to enable SERVER_GC by default [OR] at least we should have a temporary solution of disabling SERVER_GC using an environment flag, so VSO can set this variable to switch off. Otherwise it is enabled. How does that sound?

https://github.com/dotnet/cli/pull/658/files

schellap avatar Dec 29 '15 02:12 schellap

@davidfowl, to unblock just flip the bit.

https://github.com/dotnet/cli/blob/504e109947865d98bb87b1dec4c7d8f5daf0f8fe/src/corehost/src/main.cpp#L130

Set to "0"

schellap avatar Dec 29 '15 02:12 schellap

@janvorli Can you please take a look to understand why enabling Server GC would trigger OOM on OSX Elcapitan?

gkhanna79 avatar Dec 29 '15 17:12 gkhanna79

I'll take a look at this

kouvel avatar Jan 14 '16 20:01 kouvel

Reopening... @piotrpMSFT @sergiy-k

schellap avatar Feb 12 '16 02:02 schellap

Finally!

davidfowl avatar Feb 12 '16 04:02 davidfowl

Noticed there is no milestone... Also just hit this, would love to compile a project on El Capitan :boat:

andyleejordan avatar Feb 12 '16 04:02 andyleejordan

This is affecting vso osxbuild

gkhanna79 avatar Feb 12 '16 04:02 gkhanna79

Clicked the wrong button on phone :(

gkhanna79 avatar Feb 12 '16 04:02 gkhanna79

Just to make it obvious (since I pieced it together from a couple linked threads):

export COREHOST_SERVER_GC=0

And then build happily :)

(With ulimit -S -n 4096 being the work-around to restore without crashing; unrelated but also needed on OS X.)

andyleejordan avatar Feb 12 '16 04:02 andyleejordan

@janvorli ptal

gkhanna79 avatar Feb 12 '16 11:02 gkhanna79

FYI I turned it off by default for now

davidfowl avatar Feb 15 '16 01:02 davidfowl

@davidfowl Which PR?

gkhanna79 avatar Feb 16 '16 20:02 gkhanna79