This repository has been archived by the owner on Nov 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 199
Actively tail worker stdio from supervisor agent #588
Merged
Merged
Conversation
This file contains 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
This is probably the root cause for #542. |
bmc-msft
reviewed
Feb 23, 2021
ranweiler
changed the title
Don't pipe worker stdio to supervisor agent
Actively tail worker stdio from supervisor agent
Feb 23, 2021
bmc-msft
reviewed
Feb 23, 2021
ranweiler
commented
Feb 26, 2021
bmc-msft
reviewed
Feb 26, 2021
bmc-msft
approved these changes
Feb 26, 2021
Hello @bmc-msft! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
This pull request was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
In the supervisor agent, incrementally read from the running worker agent's redirected stderr and stdout, instead of waiting until it exits.
The worker agent's stderr and stdout are piped to the supervisor when tasks are run. The supervisor's
WorkerRunner
does not usewait_with_output()
, which handles this (at the cost of blocking). Instead, it makes repeated calls to totry_wait()
on timer-based state transitions, and does not try to read the pipes until the worker exits. But when one of the child's pipes is full, the child can block forever waiting on awrite(2)
, such as in alog
facade implementation.This bug has not been caught because we control the child worker agent, and until recently, it mostly only wrote to these streams using
env_logger
at its default log level. But recent work: (1) set more-verboseINFO
level default logging, (2) logged stderr/stdout lines of child processes of the worker, and (3) some user targets logged very verbosely for debugging. This surfaced the underlying issue.