Skip to content
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

klog 1.130.0: race condition during periodic flushing and rotating files #407

Closed
pohly opened this issue Jun 17, 2024 · 1 comment · Fixed by #408
Closed

klog 1.130.0: race condition during periodic flushing and rotating files #407

pohly opened this issue Jun 17, 2024 · 1 comment · Fixed by #408
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@pohly
Copy link

pohly commented Jun 17, 2024

/kind bug

What steps did you take and what happened:

#403 moved the Sync method call out of the protection of the l.mu mutex. However, that means that the access to sb.file is no longer protected inside that method.

What did you expect to happen:

Let's remove the flushSyncWriter interface. We can instead use io.Writer and when it comes to flushing, check directly for the syncBuffer type to flush and sync.

Also, avoid allocating a slice each time flushing is done.

Anything else you would like to add:

Found during review of kubernetes/kubernetes#125531.

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 17, 2024
@k8s-ci-robot
Copy link

This issue is currently awaiting triage.

If klog contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants