firecracker-containerd icon indicating copy to clipboard operation
firecracker-containerd copied to clipboard

Cleanup logs around io streams shutting down

Open sipsma opened this issue 5 years ago • 4 comments

Right now when a container exits you get some confusing error logs like this:

time="2019-12-11T20:03:38.436612731Z" level=error msg="error copying io" ExecID= TaskID=container-80-3 error="read unix @->firecracker.vsock: use of closed network connection" runtime=aws.firecracker stream=stdout vmID=80

or this:

time="2019-12-11T20:03:38.443037999Z" level=debug msg="[   81.326403] agent[848]: time=\"2019-12-11T20:03:38Z\" level=error msg=\"error copying io\" ExecID= TaskID=container-80-3 error=\"read /proc/self/fd/76: file already closed\" stream=stderr" jailer=noop runtime=aws.firecracker vmID=80 vmm_stream=stdout

I don't think these in particular should be logged at ERROR level and they should probably be clarified as they just indicate the stream got closed. Something more like std<in,out,err> closed at INFO level seems more appropriate. We can include the full actual error message at DEBUG still. We'll also want to make sure that if other unexpected errors occur, we continue to log those at ERROR.

sipsma avatar Dec 11 '19 20:12 sipsma

I can take this thingy;)

Zyqsempai avatar Dec 12 '19 15:12 Zyqsempai

Sounds good, thanks @Zyqsempai !

sipsma avatar Dec 12 '19 19:12 sipsma

@kzys, can we close this given https://github.com/firecracker-microvm/firecracker-containerd/pull/369 ?

acpana avatar Mar 04 '21 19:03 acpana

I want to have some tests to prevent regressions.

kzys avatar Mar 04 '21 22:03 kzys