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

Can't close tar writer: io: read/write on closed pipe #249

Open
tomgiggs opened this issue Nov 25, 2021 · 1 comment
Open

Can't close tar writer: io: read/write on closed pipe #249

tomgiggs opened this issue Nov 25, 2021 · 1 comment
Labels

Comments

@tomgiggs
Copy link

tomgiggs commented Nov 25, 2021

Expected Behavior

socker-slim build success
sudo docker-slim build --http-probe=false registry.cn-hangzhou.aliyuncs.com/tanghaom/jetson_deploy_base:report0.3 --tag jetsonInfer:optimized --pull


Actual Behavior

time="2021-11-25T16:51:46+08:00" level=error msg="Can't add file /tmp/docker-slim-state/.docker-slim-state/images/117913d874ab60b50e9085ab2dab1310e0780b05584247bd47b1e1a009324698/artifacts/files.tar to tar: io: read/write on closed pipe"

time="2021-11-25T16:51:46+08:00" level=error msg="Can't close tar writer: io: read/write on closed pipe"
cmd=build log='optimized.image.build' event=LOG.END tag='jetsonInfer:optimized' ====================
cmd=build info=build.error status='optimized.image.build.error' error='write unix @->/var/run/docker.sock: write: broken pipe'
cmd=build state=exited code=33554435 version=linux|Transformer|latest|latest|latest location=/usr/bin


Steps to Reproduce the Problem

docker-slim: message='join the Gitter channel to ask questions or to share your feedback' info='https://gitter.im/docker-slim/community'
docker-slim: message='join the Discord server to ask questions or to share your feedback' info='https://discord.gg/9tDyxYS'
docker-slim: message='Github discussions' info='https://github.com/docker-slim/docker-slim/discussions'
cmd=build info=exec message='changing continue-after from probe to nothing because http-probe is disabled'
cmd=build info=exec message='changing continue-after to enter'
cmd=build state=started
cmd=build info=params rt.as.user='true' keep.perms='true' tags='jetsonInfer:optimized' target.type='image' target='registry.cn-hangzhou.aliyuncs.com/tanghaom/jetson_deploy_base:report0.3' continue.mode='enter'
cmd=build state=image.inspection.start
cmd=build info=image size.bytes='6163912656' size.human='6.2 GB' id='sha256:117913d874ab60b50e9085ab2dab1310e0780b05584247bd47b1e1a009324698'
cmd=build info=image.stack index='0' name='registry.cn-hangzhou.aliyuncs.com/tanghaom/jetson_deploy_base:latest' id='sha256:b32c86136a272ebb4526bea0be0384a7aef7c3908efbc3aa301ff886364851b4'
cmd=build info=image.stack index='1' name='registry.cn-hangzhou.aliyuncs.com/tanghaom/jetson_deploy_base:report0.3' id='sha256:117913d874ab60b50e9085ab2dab1310e0780b05584247bd47b1e1a009324698'
cmd=build info=image.exposed_ports list='8080'
cmd=build state=image.inspection.done
cmd=build state=container.inspection.start
cmd=build info=container status='created' name='dockerslimk_9359_20211125085119' id='b8f10ba87fe3c9ae0fd929c5599f5814a159502331ede0f0a0e6025acaae4794'
cmd=build info=cmd.startmonitor status='sent'
cmd=build info=event.startmonitor.done status='received'
cmd=build info=container name='dockerslimk_9359_20211125085119' id='b8f10ba87fe3c9ae0fd929c5599f5814a159502331ede0f0a0e6025acaae4794' target.port.list='49206' target.port.info='8080/tcp => 0.0.0.0:49206' message='YOU CAN USE THESE PORTS TO INTERACT WITH THE CONTAINER'
cmd=build info=continue.after mode='enter' message='provide the expected input to allow the container inspector to continue its execution'
cmd=build prompt='USER INPUT REQUIRED, PRESS WHEN YOU ARE DONE USING THE CONTAINER'

cmd=build state=container.inspection.finishing
cmd=build state=container.inspection.artifact.processing
cmd=build state=container.inspection.done
cmd=build state=building message=building optimized image
cmd=build log='optimized.image.build' event=LOG.START tag='jetsonInfer:optimized' ====================
time="2021-11-25T16:51:46+08:00" level=error msg="Can't add file /tmp/docker-slim-state/.docker-slim-state/images/117913d874ab60b50e9085ab2dab1310e0780b05584247bd47b1e1a009324698/artifacts/files.tar to tar: io: read/write on closed pipe"

time="2021-11-25T16:51:46+08:00" level=error msg="Can't close tar writer: io: read/write on closed pipe"
cmd=build log='optimized.image.build' event=LOG.END tag='jetsonInfer:optimized' ====================
cmd=build info=build.error status='optimized.image.build.error' error='write unix @->/var/run/docker.sock: write: broken pipe'
cmd=build state=exited code=33554435 version=linux|Transformer|latest|latest|latest location=/usr/bin
cmd=build state=container.target.shutdown.start
time="2021-11-25T16:51:46+08:00" level=fatal msg="docker-slim: failure" error="docker event stop chanel is nil" stack="goroutine 1 [running]:\nruntime/debug.Stack()\n\t/apps/go/src/runtime/debug/stack.go:24 +0x88\ngithub.com/docker-slim/docker-slim/pkg/util/errutil.FailOn({0x9db260, 0x40000c6a50})\n\t/home/jetson-nano-2g/cyl/docker-slim/pkg/util/errutil/errutil.go:28 +0x30\ngithub.com/docker-slim/docker-slim/pkg/app/master/inspectors/container.(*Inspector).FinishMonitoring(0x4000300d80)\n\t/home/jetson-nano-2g/cyl/docker-slim/pkg/app/master/inspectors/container/container_inspector.go:1089 +0x5c\ngithub.com/docker-slim/docker-slim/pkg/app/master/commands/build.OnCommand.func2()\n\t/home/jetson-nano-2g/cyl/docker-slim/pkg/app/master/commands/build/handler.go:897 +0x64\ngithub.com/docker-slim/docker-slim/pkg/app.(*ExecutionContext).doCleanup(0x400044a6c0)\n\t/home/jetson-nano-2g/cyl/docker-slim/pkg/app/execontext.go:33 +0x58\ngithub.com/docker-slim/docker-slim/pkg/app.(*ExecutionContext).Exit(0x400044a6c0, 0x2000003)\n\t/home/jetson-nano-2g/cyl/docker-slim/pkg/app/execontext.go:20 +0x28\ngithub.com/docker-slim/docker-slim/pkg/app/master/commands/build.OnCommand(0x400044a6c0, 0x400024b860, {0x7ffc44e7bd, 0x47}, 0x1, {0x0, 0x0}, {0x0, 0x0}, {0x0, ...}, ...)\n\t/home/jetson-nano-2g/cyl/docker-slim/pkg/app/master/commands/build/handler.go:1182 +0x67b8\ngithub.com/docker-slim/docker-slim/pkg/app/master/commands/build.glob..func1(0x400001adc0)\n\t/home/jetson-nano-2g/cyl/docker-slim/pkg/app/master/commands/build/cli.go:629 +0x41f8\ngithub.com/urfave/cli.HandleAction({0x781f00, 0x8dab20}, 0x400001adc0)\n\t/home/jetson-nano-2g/go/pkg/mod/github.com/urfave/cli@v1.22.4/app.go:526 +0xfc\ngithub.com/urfave/cli.Command.Run({{0x893bdc, 0x5}, {0x0, 0x0}, {0xf8edd0, 0x1, 0x1}, {0x8ce895, 0x6c}, {0x0, ...}, ...}, ...)\n\t/home/jetson-nano-2g/go/pkg/mod/github.com/urfave/cli@v1.22.4/command.go:174 +0x5fc\ngithub.com/urfave/cli.(*App).Run(0x4000379500, {0x4000032070, 0x7, 0x7})\n\t/home/jetson-nano-2g/go/pkg/mod/github.com/urfave/cli@v1.22.4/app.go:279 +0x6f4\ngithub.com/docker-slim/docker-slim/pkg/app/master.Run()\n\t/home/jetson-nano-2g/cyl/docker-slim/pkg/app/master/app.go:15 +0x58\nmain.main()\n\t/home/jetson-nano-2g/cyl/docker-slim/cmd/docker-slim/main.go:8 +0x20\n" version="linux|Transformer|latest|latest|latest"


Specifications

  • Version: master-75fd0f3
  • Platform: linux/arm64,2G,4C
  • run on an nvidia jetson device
@kcq
Copy link
Member

kcq commented Dec 8, 2021

Thanks a lot for opening the issue @tomgiggs !

Just to double check...

is this how you invoke DockerSlim: sudo docker-slim build --http-probe=false registry.cn-hangzhou.aliyuncs.com/tanghaom/jetson_deploy_base:report0.3 --tag jetsonInfer:optimized --pull?

is this image available locally already: registry.cn-hangzhou.aliyuncs.com/tanghaom/jetson_deploy_base:report0.3?

Can you also add the global debug flag, so we get more information about what's going on?

it's also better to specify the target image as the last command line value or you should use the --target flag, so it'll look like this: sudo docker-slim --debug build --http-probe=false --target registry.cn-hangzhou.aliyuncs.com/tanghaom/jetson_deploy_base:report0.3 --tag jetsonInfer:optimized --pull

@kcq kcq added the triage label Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants