Open avneradania1 opened 9 months ago
There are no sig labels on this issue. Please add an appropriate label by using one of the following commands:
/sig <group-name>
/wg <group-name>
/committee <group-name>
Please see the group list for a listing of the SIGs, working groups, and committees available.
This issue is currently awaiting triage.
If a SIG or subproject determines 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.
/sig kubectl
@tamilselvan1102: The label(s) sig/kubectl
cannot be applied, because the repository doesn't have them.
/transfer kubectl
@tamilselvan1102: You must be an org member to transfer this issue.
/transfer kubectl
When logs are tailed kubectl uses the watcher utility, which relies on go channels, in this case a buffered go channel. We can see in the below link that the default size for the buffer is 100, and this is not currently configurable. Now, normally this would be fine because the logs coming in would be sent out, but because you are generating so much data, the logs are unable to exit the channel buffer at a faster rate than the logs are flowing in to the channel buffer, resulting in negative pressure and the channel to hang.
How the log function spawns multiple watchers
The default buffer size of the channel used by the watchers
If you run the command causing the issue with -v=9
flag that may give us a clearer indication that this is what is happening. Could you do that and post the resulting logs for that message (not the logs that are being output but the ones being returned as a result of the verbosity flag)?
/sig cli
@mpuckett159, Thanks for detailed response. I'm guessing you're asking for the beginning of v=9 output. if so, file attached with details.
would like to help here.
Do we want to provide an option to increase the buffer size?
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
not stale
/remove-lifecycle stale
@mpuckett159 does the logs shared above confirm your theory?
I can see that DefaultConsumeRequest uses the stream function of go-client.
I don't see watch package used in this code path. What am I missing? 🤔
I am surprised that more people aren't complaining about this 😄 This blocks me daily and I would love to help solve whatever limitation we are running into here.
Agree, it looks like people does not look into stdout anymore, but on main Log servers such as Loki, Elk etc.
I spent some time on this today and it was hard to reproduce. I think, checking the kubelet and api server logs if that happens can enlighten the issue. I'm not sure this issue is definitely happening on kubectl and we need to eliminate the other components first.
Also another question would be; does this happen without tailing -f
?
I doubt kubelet too. From whatever I could see, it wasn't happening on kubectl. Will dig some more on my next attempt.
What happened?
A lot of running jobs generates a massive amount of log to stdout. Steps:
What did you expect to happen?
Expected result is to see all pod stdout on screen. This is not happening.
How can we reproduce it (as minimally and precisely as possible)?
kubectl logs -f -n
Anything else we need to know?
No response
Kubernetes version
Cloud provider
OS version
Install tools
Container runtime (CRI) and version (if applicable)
Related plugins (CNI, CSI, ...) and versions (if applicable)