Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Tests on macOS timeout on 10.12+ #1428

Closed
arbourd opened this issue Dec 3, 2017 · 5 comments · Fixed by #1433
Closed

Tests on macOS timeout on 10.12+ #1428

arbourd opened this issue Dec 3, 2017 · 5 comments · Fixed by #1433

Comments

@arbourd
Copy link
Contributor

arbourd commented Dec 3, 2017

TravisCI recently updated their default image for macOS, which causes the build to hang and time out.

The source of the timeout is coming from gps and it is most likely related to handling external VCS. My initial tests suggest either gps/source_manager_test.go or gps/vcs_source_test.go are responsible when unable to call a VCS. Could be that we're not using requireBins() everywhere we might need it.

I was able to recreate a similar timeout by removing hg from my Mac running 10.13.1 (although this can't be the direct cause in Travis, as the image has both hg and bzr).

@arbourd arbourd changed the title macOS build fails on 10.12 or greater on TravisCI TravisCI tests on macOS hang on 10.12+ Dec 3, 2017
@arbourd arbourd changed the title TravisCI tests on macOS hang on 10.12+ Tests on macOS timeout on 10.12+ Dec 3, 2017
@arbourd
Copy link
Contributor Author

arbourd commented Dec 4, 2017

So, after digging into today I have some insight (but not much).

Here are some of my attempts to understand this problem with Travis:

  1. Added a call to requireBins() in gps/source_manager_test.go to try and fix my local, no hg timeout.
    Still locks.

  2. Decided to turn off parallelism locally and run the test with and without the new calls to requireBins().
    It worked. Figured it was parallelism.

  3. Disabled parallelism in Travis for all tests.
    Problem still occurs.

  4. Discovered the test causing the problem in Travis (with and without parallelism):
    github.com/golang/dep/gps/manager_test.go:939

  5. Disabled the test TestUnreachableSource
    Passes for all Xcodes

  6. I ran the test TestUnreachableSource by itself to see if it was the cause:
    Locks for Xcode 8.3 and 9.1

So, in Travis, the issue is TestUnreachableSource locking. But locally, I have a completely separate (but similar) locking issue when hg isn't installed. Instead of TestUnreachableSource, the problem comes from TestSourceManager_InferConstraint even with my changes to add explicit bin checking.

I've uploaded the stack traces for both the local and Travis panic here: https://gist.github.com/arbourd/e0d585d997c2a42358cb5a61f73feb14

Both panics have a similar call stack:

  • gps/source_manager.go:501
  • gps/source.go:205
  • gps/source.go:539
  • gps/source.go:571
  • gps/maybe_source.go:45
  • gps/maybe_source.go:95
  • gps/source_manager.go:657
  • gps/maybe_source.go:97
  • gps/vcs_source.go:266
  • gps/cmd_unix.go:80

So, looks like the Cmd waits forever in gps/cmd_unix.go:80. Hmm...

@arbourd
Copy link
Contributor Author

arbourd commented Dec 4, 2017

Okay, I think I understand why the commands are hanging.

My local issue appears to be attempting to call:

git ls-remote ssh://git@bitbucket.org/golang-dep/dep-test in TestSourceManager_InferConstraint/hg-semver. This would hang forever because of:

$ git ls-remote ssh://git@bitbucket.org/golang-dep/dep-test
The authenticity of host 'bitbucket.org (104.192.143.3)' can't be established.
RSA key fingerprint is SHA256:zzXQOXSRBEiUtuE8AikJYKwbHaxvSc0ojez9YXaGp1A.
Are you sure you want to continue connecting (yes/no)?

On Travis its similar: git ls-remote ssh://git@github.com/golang/notexist is being called, and I assume, hanging on SSH protocol stuff.

@carolynvs
Copy link
Collaborator

Looks like we missed a spot on our latest passthrough to turn off interactive prompts: #1357.

@carolynvs
Copy link
Collaborator

p.s. Nice sleuthing! 👍

@arbourd
Copy link
Contributor Author

arbourd commented Dec 5, 2017

The ssh authenticity warning cannot be suppressed, but git@github.com should be added to known_hosts in Travis already. There might be an issue with their newer Mac VMs where they accidentally removed it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants