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

Fix panic on cached op with bind mounts #41

Merged
merged 1 commit into from
Jun 28, 2022
Merged

Fix panic on cached op with bind mounts #41

merged 1 commit into from
Jun 28, 2022

Conversation

ktock
Copy link
Owner

@ktock ktock commented Jun 28, 2022

This commit fixes the panic which occurs when execing into the cached op with bind mounts

DEBU[2022-06-28T02:23:02Z] finishing listening debug events             
panic: runtime error: index out of range [1] with length 1

goroutine 43 [running]:
main.(*handler).execContainer(0xc00028bb00, {0x12b1498, 0xc000122000}, {0xc000158f50, {0xc00023b160, 0x1, 0x1}, 0x1, {0x129ec28, 0xc00023b460}, ...})
	/go/src/github.com/ktock/buildg/exec.go:130 +0xd9f
main.execCommand.func1(0xc000c7e420)
	/go/src/github.com/ktock/buildg/exec.go:91 +0x52b
github.com/urfave/cli.HandleAction({0xf5ff00, 0xc0007464c0}, 0x4)
	/go/pkg/mod/github.com/urfave/cli@v1.22.9/app.go:524 +0xa8
github.com/urfave/cli.Command.Run({{0x111d2ab, 0x4}, {0x0, 0x0}, {0xc00023afb0, 0x1, 0x1}, {0x1137617, 0x1b}, {0x116692f, ...}, ...}, ...)
	/go/pkg/mod/github.com/urfave/cli@v1.22.9/command.go:173 +0x652
github.com/urfave/cli.(*App).Run(0xc000bf8540, {0xc000c689f0, 0x3, 0x3})
	/go/pkg/mod/github.com/urfave/cli@v1.22.9/app.go:277 +0x705
main.(*handler).dispatch(0xc00028bb00, {0x12b1498, 0xc000122000}, 0xc000158f50, {0xc000010658, 0x1, 0x1}, {0xc0007464a0, 0x2, 0x2})
	/go/src/github.com/ktock/buildg/handler.go:235 +0x499
main.(*handler).handle(0xc00028bb00, {0x12b1498, 0xc000122000}, 0x12, {0xc000010658, 0x1, 0x1})
	/go/src/github.com/ktock/buildg/handler.go:172 +0x505
main.(*debugController).handle(0xc000650600, {0x12b1498, 0xc000122000}, 0x9e4b00)
	/go/src/github.com/ktock/buildg/debug.go:65 +0x317
main.withDebug.func1.1()
	/go/src/github.com/ktock/buildg/handler.go:87 +0x90
created by main.withDebug.func1
	/go/src/github.com/ktock/buildg/handler.go:84 +0x385

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
@ktock ktock merged commit f69e30c into main Jun 28, 2022
@ktock ktock deleted the fixcachemountpanic branch June 28, 2022 05:24
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 this pull request may close these issues.

1 participant