atom/ide-typescript

Symlink cycles in project cause server to use 100% CPU and keep running after quit

Closed this issue · 2 comments

When working on JavaScript projects that have cyclical symlink paths, my CPU gets maxed out by one or more javascript-typescript-langserver/lib/language-server-stdio processes. These processes use 100% CPU and keep running even after I reload an Atom window or quit Atom.

maxed-out-cpu

I have attached a tarball of a minimal directory structure that produces the problem:

issue-repro $ tree
.
├── test1
│   ├── index.js
│   ├── node_modules
│   │   ├── test2 -> ../../test2
│   │   └── test3 -> ../../test3
│   └── package.json
├── test2
│   ├── index.js
│   ├── node_modules
│   │   ├── test1 -> ../../test1
│   │   └── test3 -> ../../test3
│   └── package.json
└── test3
    ├── index.js
    ├── node_modules
    │   ├── test1 -> ../../test1
    │   └── test2 -> ../../test2
    └── package.json

issue-repro.tar.zip

This is probably initially caused by a bug in the language server itself, but it also seems like this package or atom-languageclient should not allow their child processes to continue running like this after shutdown.

/cc @damieng

erkie commented

This issue has been closed on the language server repo: sourcegraph/javascript-typescript-langserver#453 so I doubt it will be fixed. @maxbrunsfeld in the linked issue the maintainer assumed cyclical imports was bad and thus not a problem on their end. How did you end up in your situation? Maybe we can make a good case for this being something to actually look into.

Likely fixed with the new ide-typescript 0.8.0 update.