-
Notifications
You must be signed in to change notification settings - Fork 405
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
race: funcLogger write race #1328
Comments
rdallman
added a commit
that referenced
this issue
Apr 19, 2019
we have WithLogger already, we just need to use it. this moves the config of the logger itself up to be a call option which makes it less brittle in GetCall to hit the path where it might get accidentally turned on. removes the old buffer and io.Reader on stderr so that we could upload logs, we only need the logrus logger for now and it was a bit of a tangled mess. TODO need to add config bit to set the default level to 'info' so that we get logs out of these guys in the agent config (pure runner is left alone to off), with ability to change to debug or turn off altogether. NOTE: this fixes #1328 by putting a write guard after close and not using the line writer for different writers
rdallman
added a commit
that referenced
this issue
May 3, 2019
we have WithLogger already, we just need to use it. this moves the config of the logger itself up to be a call option which makes it less brittle in GetCall to hit the path where it might get accidentally turned on. removes the old buffer and io.Reader on stderr so that we could upload logs, we only need the logrus logger for now and it was a bit of a tangled mess. TODO need to add config bit to set the default level to 'info' so that we get logs out of these guys in the agent config (pure runner is left alone to off), with ability to change to debug or turn off altogether. NOTE: this fixes #1328 by putting a write guard after close and not using the line writer for different writers
rdallman
added a commit
that referenced
this issue
May 10, 2019
we have WithLogger already, we just need to use it. this moves the config of the logger itself up to be a call option which makes it less brittle in GetCall to hit the path where it might get accidentally turned on. removes the old buffer and io.Reader on stderr so that we could upload logs, we only need the logrus logger for now and it was a bit of a tangled mess. TODO need to add config bit to set the default level to 'info' so that we get logs out of these guys in the agent config (pure runner is left alone to off), with ability to change to debug or turn off altogether. NOTE: this fixes #1328 by putting a write guard after close and not using the line writer for different writers
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this could be a write-write race when using a func logger as both stdout and stderr, a write-write race when closing a func logger when it may still be writing lines or a write-read race from the same close method with a different configuration.
the symptom is a panic at this line https://github.com/fnproject/fn/blob/master/api/agent/func_logger.go#L154 when calling Next() to advance the inner buffer, the slice bounds is out of range. we need to fix this, logging has been disabled for the oracle functions service so it's good there, but this is still hanging out if configured, mostly because of the log api, which we also need to remove really.
The text was updated successfully, but these errors were encountered: