slimtoolkit / slimtoolkit/slim
Can't close tar writer: io: read/write on closed pipe
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.4k
- Forks
- 840
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported docker-slim build on Linux arm64 with the supplied image and options, then trace the failure through pkg/app/master/inspectors/container/container_inspector.go:1089 and pkg/app/master/commands/build/handler.go:897. Check the cleanup path in pkg/app/execontext.go and confirm that the build no longer reports closed-pipe or broken-socket errors and does not fail on a nil Docker event channel.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- cli, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100