microsoft / microsoft/hcsshim

failed to close job container stdout error

Open
#1,690 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
694
Forks
304
Avg merge
1d 19h
Merged PRs (30d)
28

Description

I've started to see the following in the containerd logs with

I0310 23:33:36.079002 4956 kuberuntime_manager.go:240] "Container runtime initialized" containerRuntime="containerd" version="v1.6.15"

{"ID":3,"EventName":"LogrusEntry","TraceEventProcessID":3400,"TraceEventProcessName":"","Message":"Cmd IO relay complete","Time":"2023-03-10T23:48:58.6121149+00:00","bytes":82,"eid":"e90354b911d2167a298c26bf7f9f47144e004a85efe2e64047bdc7f85c52f132","file":"stderr","pid":1404,"spanID":"0d238c510f703e97","tid":"17758b21e8e9ee7e7f22a9447d55f47c3d4258c2bcf30bc8009679716ba53f10","traceID":"cea6a1b58cd99d6db1a3d6c85bd8d9b1","error":"read |0: file already closed"}}

{"ID":4,"EventName":"LogrusEntry","TraceEventProcessID":3400,"TraceEventProcessName":"","Message":"failed to close Cmd stdout","Time":"2023-03-10T23:45:58.5958979+00:00","eid":"70dec87cbc63adbbc2c03a33cc4622a9ca77c1ce7ef02a09f926cb9972228f3e","pid":376,"spanID":"5127a9a44a063348","tid":"17758b21e8e9ee7e7f22a9447d55f47c3d4258c2bcf30bc8009679716ba53f10","traceID":"3138dc3e05b0a21de13cd39bf82104b8","error":"failed to close job container stdout: close |0: file already closed"}}

example: https://storage.googleapis.com/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cluster-api-provider-azure/3273/pull-cluster-api-provider-azure-e2e/1634332087173517312/artifacts/clusters/capz-e2e-ankuc9-ha/kube-system/containerd-logger-l667r/containerd-logger.log

It doesn't seem to be causing an issue but makes the logs noisy.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the reported "failed to close Cmd stdout" and "Cmd IO relay complete" messages, using kuberuntime_manager.go:240 and the linked containerd-logger.log as entry points. Determine why an already-closed stdout is reported and define completion as eliminating benign log noise without hiding genuine close failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.