Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Travis OSX tests #3379

Merged
merged 1 commit into from
May 11, 2017
Merged

Fix Travis OSX tests #3379

merged 1 commit into from
May 11, 2017

Conversation

pichouk
Copy link
Contributor

@pichouk pichouk commented May 11, 2017

Summary
Travis tests on OSX seems to failed A LOT
because of this :

<--- Last few GCs --->

 1207511 ms: Mark-sweep 1362.1 (1435.5) -> 1362.1 (1435.5) MB, 2697.2 / 0.0 ms [allocation failure] [GC in old space requested].
 1210266 ms: Mark-sweep 1362.1 (1435.5) -> 1362.1 (1435.5) MB, 2754.3 / 0.1 ms [allocation failure] [GC in old space requested].
 1213441 ms: Mark-sweep 1362.1 (1435.5) -> 1385.1 (1411.5) MB, 3175.0 / 0.1 ms [last resort gc].
 1217347 ms: Mark-sweep 1385.1 (1411.5) -> 1408.1 (1411.5) MB, 3905.5 / 0.1 ms [last resort gc].

<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x5f7e3bcfb39 <JS Object>
    2: _tickCallback [internal/process/next_tick.js:~93] [pc=0x109f829ab8e3] (this=0x1c51837a7319 <a process with map 0x2c6ee9c11a91>)

==== Details ================================================
[2]: _tickCallback [internal/process/next_tick.js:~93] [pc=0x109f829ab8e3] (this=0x1c51837a7319 <a process with map 0x2c6ee9c11a91>) {

// optimized frame
--------- s o u r c e   c o d e ---------
fun...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [/Users/travis/.nvm/versions/node/v6.10.3/bin/node]
 2: node::FatalException(v8::Isolate*, v8::Local<v8::Value>, v8::Local<v8::Message>) [/Users/travis/.nvm/versions/node/v6.10.3/bin/node]
 3: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/Users/travis/.nvm/versions/node/v6.10.3/bin/node]
 4: v8::internal::Factory::NewStruct(v8::internal::InstanceType) [/Users/travis/.nvm/versions/node/v6.10.3/bin/node]
 5: v8::internal::Factory::NewTypeFeedbackInfo() [/Users/travis/.nvm/versions/node/v6.10.3/bin/node]
 6: v8::internal::FullCodeGenerator::MakeCode(v8::internal::CompilationInfo*) [/Users/travis/.nvm/versions/node/v6.10.3/bin/node]
 7: v8::internal::(anonymous namespace)::GenerateBaselineCode(v8::internal::CompilationInfo*) [/Users/travis/.nvm/versions/node/v6.10.3/bin/node]
 8: v8::internal::(anonymous namespace)::GetUnoptimizedCodeCommon(v8::internal::CompilationInfo*) [/Users/travis/.nvm/versions/node/v6.10.3/bin/node]
 9: v8::internal::Compiler::Compile(v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Compiler::ClearExceptionFlag) [/Users/travis/.nvm/versions/node/v6.10.3/bin/node]
10: v8::internal::Runtime_CompileLazy(int, v8::internal::Object**, v8::internal::Isolate*) [/Users/travis/.nvm/versions/node/v6.10.3/bin/node]
11: 0x109f7ce092a7
12: 0x109f7ce34338
13: 0x109f829ab8e3
sh: line 1:  6601 Abort trap: 6           npm run test-only -- --maxWorkers 1
error Command failed with exit code 134.

I'm not sure of this, but it seems that the test runs out of memory. It seems to work if we use 3 workers.

@pichouk
Copy link
Contributor Author

pichouk commented May 11, 2017

Ok, I know what you're thinking : "This is useless because it still failed" 😄
But know it failed for another reason ^^

Summary of all failing tests
 FAIL  __tests__/commands/add.js (415.695s)
  ● add with new dependency should be deterministic 3

    Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.   
      at ontimeout (timers.js:386:14)
      at tryOnTimeout (timers.js:250:5)
      at Timer.listOnTimeout (timers.js:214:5)

Test Suites: 1 failed, 57 passed, 58 total
Tests:       1 failed, 6 skipped, 505 passed, 512 total
Snapshots:   53 passed, 53 total
Time:        476.803s
Ran all test suites.
error Command failed with exit code 1.
error Command failed with exit code 1.

It seems that there is some timeout errors, but I really don't know why this is happening...

@bestander
Copy link
Member

Lol, thanks for looking at this, @pichouk.
I feel that the latest version of Node on Mac causes this memory leak.
It is weird that this gets fixed by increasing concurrency, maybe workers leak just a little bit.

Could you try specifying Node 6.9 for Travis OSX and see if it stops crashing with concurrency 1?
I decreased concurrency to 1 some time ago because I think it was failing because of timeouts a bit less often

@pichouk
Copy link
Contributor Author

pichouk commented May 11, 2017

Doesn't seems to fix it. I tried locally (see https://github.com/pichouk/yarn/pull/6 ) and I still have memory issues if concurrency set to 1 with 6.9

@bestander
Copy link
Member

Ok, let's merge this fix, still better than crash

@bestander bestander merged commit d2ef6a5 into yarnpkg:master May 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants