slimtoolkit / slimtoolkit/slim
Broken build in CircleCI
Open
Nobody has claimed this yet.
triage
validating fix
- Dominant language
- Go
- Stars
- 23.4k
- Forks
- 840
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to slim a container after a git push in CircleCI. This error message is appearing though.
echo | ./dist_linux/docker-slim build --http-probe nodecraft/ubuntu
docker-slim: [build] image=nodecraft/ubuntu http-probe=true remove-file-artifacts=false
INFO[0000] docker-slim: inspecting 'fat' image metadata...
INFO[0000] docker-slim: [91adf44c9b55e69b4fb5d0caacd1c966466e2c373bff5caab38bda7c4ee18833] 'fat' image size => 173817308 (174 MB)
INFO[0000] docker-slim: processing 'fat' image info...
INFO[0000] docker-slim: starting instrumented 'fat' container...
INFO[0000] docker-slim: created container => e8eabe1244abcbdaba66590b90b90b51d75d22ba7c14be4b552a3643338759b7
panic: runtime error: index out of range
goroutine 1 [running]:
github.com/cloudimmunity/docker-slim/master/inspectors/container.(*Inspector).initContainerChannels(0xc820070b80, 0x0, 0x0)
/Users/me/Desktop/CI_GITHUB/docker-slim/_vendor/src/github.com/cloudimmunity/docker-slim/master/inspectors/container/container_inspector.go:152 +0x206
github.com/cloudimmunity/docker-slim/master/inspectors/container.(*Inspector).RunContainer(0xc820070b80, 0x0, 0x0)
/Users/me/Desktop/CI_GITHUB/docker-slim/_vendor/src/github.com/cloudimmunity/docker-slim/master/inspectors/container/container_inspector.go:102 +0xd89
github.com/cloudimmunity/docker-slim/master/commands.OnBuild(0x7ffff2ce1376, 0x10, 0x1)
/Users/me/Desktop/CI_GITHUB/docker-slim/_vendor/src/github.com/cloudimmunity/docker-slim/master/commands/build.go:48 +0xe11
main.init.1.func4(0xc82007a8c0)
/Users/me/Desktop/CI_GITHUB/docker-slim/apps/docker-slim/cli.go:111 +0x283
github.com/codegangsta/cli.Command.Run(0x8a8e80, 0x5, 0x0, 0x0, 0xc8200b80e0, 0x1, 0x1, 0x93e240, 0x3e, 0x0, ...)
/Users/me/Desktop/CI_GITHUB/docker-slim/_vendor/src/github.com/codegangsta/cli/command.go:174 +0x1397
github.com/codegangsta/cli.(*App).Run(0xc82007a640, 0xc82000a240, 0x4, 0x4, 0x0, 0x0)
/Users/me/Desktop/CI_GITHUB/docker-slim/_vendor/src/github.com/codegangsta/cli/app.go:187 +0x1135
main.runCli()
/Users/me/Desktop/CI_GITHUB/docker-slim/apps/docker-slim/cli.go:136 +0x4b
main.main()
/Users/me/Desktop/CI_GITHUB/docker-slim/apps/docker-slim/main.go:4 +0x14
goroutine 6 [IO wait]:
net.runtime_pollWait(0x7fad2d8eda10, 0x72, 0xc8200141e0)
/usr/local/go/src/runtime/netpoll.go:157 +0x60
net.(*pollDesc).Wait(0xc8200bc530, 0x72, 0x0, 0x0)
/usr/local/go/src/net/fd_poll_runtime.go:73 +0x3a
net.(*pollDesc).WaitRead(0xc8200bc530, 0x0, 0x0)
/usr/local/go/src/net/fd_poll_runtime.go:78 +0x36
net.(*netFD).Read(0xc8200bc4d0, 0xc8200c2000, 0x1000, 0x1000, 0x0, 0x7fad2d8e8050, 0xc8200141e0)
/usr/local/go/src/net/fd_unix.go:232 +0x23a
net.(*conn).Read(0xc82002a060, 0xc8200c2000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/go/src/net/net.go:172 +0xe4
net/http.noteEOFReader.Read(0x7fad2d8edad0, 0xc82002a060, 0xc8200101b8, 0xc8200c2000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/go/src/net/http/transport.go:1370 +0x67
net/http.(*noteEOFReader).Read(0xc82000ff80, 0xc8200c2000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
<autogenerated>:126 +0xd0
bufio.(*Reader).fill(0xc820018b40)
/usr/local/go/src/bufio/bufio.go:97 +0x1e9
bufio.(*Reader).Peek(0xc820018b40, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/bufio/bufio.go:132 +0xcc
net/http.(*persistConn).readLoop(0xc820010160)
/usr/local/go/src/net/http/transport.go:876 +0xf7
created by net/http.(*Transport).dialConn
/usr/local/go/src/net/http/transport.go:685 +0xc78
goroutine 7 [select]:
net/http.(*persistConn).writeLoop(0xc820010160)
/usr/local/go/src/net/http/transport.go:1009 +0x40c
created by net/http.(*Transport).dialConn
echo | ./dist_linux/docker-slim build --http-probe nodecraft/ubuntu returned exit code 2
/usr/local/go/src/net/http/transport.go:686 +0xc9d Action failed: echo | ./dist_linux/docker-slim build --http-probe nodecraft/ubuntu
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 CircleCI command ./dist_linux/docker-slim build --http-probe nodecraft/ubuntu and inspect inspectors/container/container_inspector.go:152, where the panic occurs. Trace the call from RunContainer through commands/build.go:48 and use the reported container ID to understand the failing initialization. Done means the command no longer exits with an index-out-of-range panic and relevant coverage verifies the failure case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- build-system, ci-cd
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100