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 freezing on travis #1289

Merged
merged 93 commits into from Feb 22, 2018

Conversation

Projects
None yet
2 participants
@BinaryMuse
Member

BinaryMuse commented Jan 18, 2018

My hunch is that the test freezing we're seeing on Travis is related to Keytar. This PR disables Keytar as a valid strategy on Travis.

BinaryMuse added some commits Jan 18, 2018

@BinaryMuse

This comment has been minimized.

Member

BinaryMuse commented Jan 18, 2018

So much for that theory

BinaryMuse added some commits Jan 18, 2018

@BinaryMuse

This comment has been minimized.

Member

BinaryMuse commented Jan 18, 2018

Okay! I've tracked down the freeze — it seems that fs.realpath in this code in workdir-cache.js is never calling its callback:

  resolvePath(unresolvedPath) {
    return new Promise((resolve, reject) => {
      fs.realpath(unresolvedPath, (err, resolved) => {
        // WE NEVER GET HERE
        if (err) {
          reject(err);
        } else {
          resolve(resolved);
        }
      });
    });
  }

BinaryMuse added some commits Jan 18, 2018

@smashwilson

This comment has been minimized.

Member

smashwilson commented Feb 14, 2018

image

Let's see what I can do with this one 😅

smashwilson added some commits Feb 14, 2018

smashwilson added some commits Feb 20, 2018

@smashwilson

This comment has been minimized.

Member

smashwilson commented Feb 22, 2018

Got it. Long story short: it seems to be a problem with electron IPC on Linux, possibly exacerbated by the rapid creation and deletion of renderer processes. I've prevented it from happening by setting ATOM_GITHUB_INLINE_GIT_EXEC on the test suite on Travis and skipping the tests that directly exercise WorkerManager, which were also locking up periodically when the GithubPackage tests did not.

I'll admit that this feels just a little like "fixing" things by skipping the problem. In this case, I believe it's justified because:

  • It's a specific issue that seems to occur only on Linux and only on CI. I could never reproduce it on my actual Linux machine, and I've never seen it happen in practice.
  • We already have two alternatives in mind: using spawn-server if that becomes available in Atom core, or using web workers rather than a full renderer process.
  • Only the WorkerManager tests themselves are actually skipped. From the perspective of the rest of the package, nothing else should care about whether or not git operations are performed in-process or not.

@smashwilson smashwilson merged commit 19134f9 into master Feb 22, 2018

3 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@smashwilson smashwilson deleted the mkt-fix-freezing-on-travis branch Feb 22, 2018

@smashwilson smashwilson referenced this pull request Feb 22, 2018

Closed

Debug test timeout #1264

@smashwilson smashwilson added this to Complete ✅ in Short-Term Roadmap Feb 22, 2018

@smashwilson smashwilson removed this from Complete ✅ in Short-Term Roadmap Apr 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment