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

Systematic panic: runtime error: index out of range [-1] while building container #5147

Closed
snakethatlovesstaticlibs opened this issue Jul 10, 2024 · 0 comments · Fixed by #5150
Milestone

Comments

@snakethatlovesstaticlibs
Copy link

snakethatlovesstaticlibs commented Jul 10, 2024

Hi team, I'm seeing this stack trace in ~/Library/Containers/com.docker.docker/Data/log/vm/dockerd.log while trying to build a dockerfile. I'm not sure what's causing it, and unfortunately I'm not able to share the dockerfile.

Platform:

  • Apple M1 Pro, Sonoma 14.5
  • Docker desktop version 4.31.0 (153195) - but I also saw it on 4.32.0
panic: runtime error: index out of range [-1]

goroutine 112437 [running]:
github.com/moby/buildkit/frontend/dockerfile/dockerfile2llb.(*dispatchStates).lastTarget(...)
	/root/build-deb/engine/vendor/github.com/moby/buildkit/frontend/dockerfile/dockerfile2llb/convert.go:904
github.com/moby/buildkit/frontend/dockerfile/dockerfile2llb.toDispatchState({_, _}, {_, _, _}, {{0x4002a23b90, {0x0, 0x0}, {0x0, 0x0}, ...}, ...})
	/root/build-deb/engine/vendor/github.com/moby/buildkit/frontend/dockerfile/dockerfile2llb/convert.go:323 +0x3278
github.com/moby/buildkit/frontend/dockerfile/dockerfile2llb.Dockerfile2LLB({_, _}, {_, _, _}, {{0x4002a23b90, {0x0, 0x0}, {0x0, 0x0}, ...}, ...})
	/root/build-deb/engine/vendor/github.com/moby/buildkit/frontend/dockerfile/dockerfile2llb/convert.go:76 +0x54
github.com/moby/buildkit/frontend/dockerfile/builder.Build.func5({0xaaaae234e118, 0x4003053540}, 0x4002066cc0, 0x400147dc98?)
	/root/build-deb/engine/vendor/github.com/moby/buildkit/frontend/dockerfile/builder/build.go:125 +0xc8
github.com/moby/buildkit/frontend/dockerui.(*Client).Build.func1()
	/root/build-deb/engine/vendor/github.com/moby/buildkit/frontend/dockerui/build.go:39 +0x64
golang.org/x/sync/errgroup.(*Group).Go.func1()
	/root/build-deb/engine/vendor/golang.org/x/sync/errgroup/errgroup.go:75 +0x58
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 112386
	/root/build-deb/engine/vendor/golang.org/x/sync/errgroup/errgroup.go:72 +0x98
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants