-
Notifications
You must be signed in to change notification settings - Fork 14
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 context bug which could hang forever #960
Conversation
@@ -898,7 +898,7 @@ func processLogLine(jm jsonmessage.JSONMessage, | |||
info += "failed to parse aux message: " + err.Error() | |||
} | |||
if err := (&resp).Unmarshal(infoBytes); err != nil { | |||
info += "failed to parse aux message: " + err.Error() | |||
info += "failed to parse info bytes: " + err.Error() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint fix.
Does the PR have any schema changes?Does the PR have any schema changes?Looking good! No breaking changes found. Maintainer note: consult the runbook for dealing with any breaking changes. |
// it if it's not.) | ||
err = syscall.Mkfifo(filepath.Join(dir, "pipe"), 0o666) | ||
require.NoError(t, err) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: consider adding an assert here that the file <dir>/pipe
is is not fileMode.IsRegular()
to make it more obvious that we have an irregular file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tricky!
We could hang forever if we have irregular file types present, like pipes which never close.
Here we fix the issue by only hashing regular files.
Fixes #614