Skip to content

JS: Remove timeout for node --version check #3531

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

Merged

Conversation

asgerf
Copy link
Contributor

@asgerf asgerf commented May 20, 2020

Attempts to fix https://github.com/github/codeql-javascript-team/issues/120 by disabling the timeout for the call to
node --version.

I was able to verify that the timeout can be triggered if the parent process (Java) is suspended during the interval where node is booting up. In a cloud computing environment, my guess is that this suspension happens when the entire VM is paused for some reason, and that the initial node call can be slow enough for the pause to occur during that time (e.g. some lazy initialization might happen).

The believe the robust solution would be to wrap node --version in a retry loop, but I instead decided to just remove the timeout. The timeout seems unnecessary since we afterwards start a node process without a timeout anyway.

@asgerf asgerf added the JS label May 20, 2020
@asgerf asgerf requested a review from a team as a code owner May 20, 2020 16:25
@esbena
Copy link
Contributor

esbena commented May 20, 2020

We probably cant fix the following scenario, but what if node --version hangs because it isn't Node.js?
I remember seeing some rants about python opening up the Windows store if python wasn't installed...

esbena
esbena previously approved these changes May 20, 2020
@asgerf
Copy link
Contributor Author

asgerf commented May 20, 2020

but what if node --version hangs because it isn't Node.js?

Well the retry loop would fix that, I think. I have the retry solution on a branch, so we can switch to that if you think it's better.

@esbena
Copy link
Contributor

esbena commented May 20, 2020

Well the retry loop would fix that,

Right. Lets try with the retry loop and timeout then.

I think support will be happy to not have to debug my scenario one day.

@semmle-qlci semmle-qlci merged commit fd05314 into github:master May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants