slimtoolkit / slimtoolkit/slim
SIGSEGV: segmentation violation when building image
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.4k
- Forks
- 840
- PR merge metrics
- No merged PRs in 30d
Description
On : linux ubuntu 19.10
docker-slim version linux|Transformer|1.28.0|c9c3681a3a8b6e8ec8caec7311a1c8329f26cdb9|2020-03-07_07:52:46AM
Docker version 19.03.7, build 7141c199a2
dist_linux/docker-slim build --include-path /etc/ssl --include-path /usr/share/ca-certificates indexer-php
docker-slim[build]: info=http.probe message='using default probe'
docker-slim[build]: state=started
docker-slim[build]: info=params target=indexer-php continue.mode=probe rt.as.user=true keep.perms=true
docker-slim[build]: state=image.inspection.start
docker-slim[build]: info=image id=sha256:761c343436ab68ea31830c2a17ccc04bf754f20998c1b75b3f861317d8b0e924 size.bytes=473038913 size.human=473 MB
docker-slim[build]: info=image.stack index=0 name='php:7.4-fpm-alpine' id='sha256:014a46b60a9dfb720893f1d7edbb5619ea82036431f0f3be1fb60fbf4a07c5c7'
docker-slim[build]: info=image.stack index=1 name='indexer-php:latest' id='sha256:761c343436ab68ea31830c2a17ccc04bf754f20998c1b75b3f861317d8b0e924'
docker-slim[build]: info=image.exposed_ports list='9000'
docker-slim[build]: state=image.inspection.done
docker-slim[build]: state=container.inspection.start
docker-slim[build]: info=container status=created name=dockerslimk_11767_20200310081948 id=23ec8f6473fe793f65a6dd87b12144da4cfba33b09320f4c1c4def3cc6ab7a59
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x8507c1]goroutine 1 [running]:
github.com/docker-slim/docker-slim/pkg/ipc/channel.(*Client).Read(0xc00080c1c0, 0x3, 0x3, 0x4b, 0x0)
github.com/docker-slim/docker-slim/pkg/ipc/channel/channel.go:388 +0x401
github.com/docker-slim/docker-slim/pkg/ipc/channel.verifyCommandChannel(0xc00080c1c0, 0x3, 0x3c, 0xf)
github.com/docker-slim/docker-slim/pkg/ipc/channel/channel.go:487 +0x169
github.com/docker-slim/docker-slim/pkg/ipc/channel.NewCommandClient(0xc0004c8260, 0xf, 0x3c, 0xf, 0x1e, 0x1e, 0xf, 0xc0002b6001, 0x14)
github.com/docker-slim/docker-slim/pkg/ipc/channel/channel.go:453 +0x173
github.com/docker-slim/docker-slim/internal/app/master/inspectors/container/ipc.(*Client).initChannels(0xc00045e000, 0xc00045e000, 0xa83298)
github.com/docker-slim/docker-slim/internal/app/master/inspectors/container/ipc/ipc.go:57 +0x134
github.com/docker-slim/docker-slim/internal/app/master/inspectors/container/ipc.NewClient(0xa78ddf, 0x9, 0xc0004c81c0, 0x5, 0xc0004c81d7, 0x5, 0x3c, 0x0, 0x20, 0x9c4fa0)
github.com/docker-slim/docker-slim/internal/app/master/inspectors/container/ipc/ipc.go:47 +0x262
github.com/docker-slim/docker-slim/internal/app/master/inspectors/container.(*Inspector).initContainerChannels(0xc000370000, 0x1, 0x1)
github.com/docker-slim/docker-slim/internal/app/master/inspectors/container/container_inspector.go:691 +0x8f
github.com/docker-slim/docker-slim/internal/app/master/inspectors/container.(*Inspector).RunContainer(0xc000370000, 0x4, 0xc0001e7f98)
github.com/docker-slim/docker-slim/internal/app/master/inspectors/container/container_inspector.go:460 +0x20d0
github.com/docker-slim/docker-slim/internal/app/master/commands.OnBuild(0xc0002ac050, 0x7fff6fc72222, 0xb, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa77701, ...)
github.com/docker-slim/docker-slim/internal/app/master/commands/build.go:263 +0x1617
github.com/docker-slim/docker-slim/internal/app/master.init.0.func8(0xc0002aa160, 0x0, 0xc0002b02f0)
github.com/docker-slim/docker-slim/internal/app/master/cli.go:931 +0x16e3
github.com/urfave/cli.HandleAction(0x9a60c0, 0xaa40d0, 0xc0002aa160, 0xc0002aa160, 0x0)
github.com/urfave/cli@v1.22.1/app.go:523 +0x11a
github.com/urfave/cli.Command.Run(0xa753fb, 0x5, 0x0, 0x0, 0xc0001f05d0, 0x1, 0x1, 0xa97fed, 0x3e, 0x0, ...)
github.com/urfave/cli@v1.22.1/command.go:174 +0x56e
github.com/urfave/cli.(*App).Run(0xc0001d6000, 0xc00001e070, 0x7, 0x7, 0x0, 0x0)
github.com/urfave/cli@v1.22.1/app.go:276 +0x7ae
github.com/docker-slim/docker-slim/internal/app/master.runCli()
github.com/docker-slim/docker-slim/internal/app/master/cli.go:1321 +0x55
github.com/docker-slim/docker-slim/internal/app/master.Run()
github.com/docker-slim/docker-slim/internal/app/master/app.go:6 +0x25
main.main()
github.com/docker-slim/docker-slim/cmd/docker-slim/main.go:8 +0x20
make: *** [Makefile:22: images] Error 2
The image is a php-fpm with composer and symfony 5.
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
Reproduce the reported docker-slim build with the PHP-FPM image and inspect pkg/ipc/channel/channel.go at Read (line 388), verifyCommandChannel (line 487), and NewCommandClient (line 453). Trace the callers in internal/app/master/inspectors/container/ipc/ipc.go and container_inspector.go; done means the build no longer panics with a nil-pointer SIGSEGV.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100