Fix launch timeout being applied 1000x longer than configured#562
Open
sombraSoft wants to merge 1 commit into
Open
Fix launch timeout being applied 1000x longer than configured#562sombraSoft wants to merge 1 commit into
sombraSoft wants to merge 1 commit into
Conversation
InstanceConfiguration.provision() passed getLaunchTimeoutMillis() into ComputeEngineInstance.launchTimeout, which is documented and consumed as seconds; ComputeEngineInstance.getLaunchTimeoutMillis() then multiplied by 1000 again. A configured 300-second launch timeout therefore became ~3.5 days, leaving launch threads polling expired GCE operations for days and keeping dead nodes (and their VMs) alive indefinitely.
das7pad
approved these changes
Jul 9, 2026
das7pad
left a comment
There was a problem hiding this comment.
LGTM
(We also discovered this at work today and would love to see this merged.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A configured launch timeout of 300 seconds actually waits ~3.5 days.
InstanceConfiguration.provision()passesgetLaunchTimeoutMillis()(seconds × 1000) into the node builder, butComputeEngineInstance.launchTimeoutis documented and consumed as seconds — its owngetLaunchTimeoutMillis()multiplies by 1000 again. Every wait that usesnode.getLaunchTimeoutMillis()(insert-operation wait, startup-script wait, SSH wait) runs with a timeout 1000× larger than configured.In production we found 16
Computer.threadPoolForRemotingthreads wedged for a week insideComputeClient.waitForOperationCompletion, polling long-expired GCE operations (404 on every poll), with their nodes stuck offline in "connecting" state and the backing VMs kept alive indefinitely byCleanLostNodesWorklabel refreshes:The fix passes
launchTimeoutSecondsto the builder, matching the field's documented unit.Resolves #560
Testing done
InstanceConfigurationTest#testProvisionedNodeLaunchTimeoutIsInSecondsprovisions a node from a configuration with a 100-second launch timeout and asserts the node reports 100 s / 100 000 ms. It fails before the fix (expected:<100> but was:<100000>) and passes after.InstanceConfigurationTestclass passes (28/28).terminateNode()cleans up, instead of wedging threads for days.Submitter checklist