Skip to content

Fix panic on cached op with bind mounts#41

Merged
ktock merged 1 commit intomainfrom
fixcachemountpanic
Jun 28, 2022
Merged

Fix panic on cached op with bind mounts#41
ktock merged 1 commit intomainfrom
fixcachemountpanic

Conversation

@ktock
Copy link
Copy Markdown
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/[email protected]/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/[email protected]/command.go:173 +0x652
github.com/urfave/cli.(*App).Run(0xc000bf8540, {0xc000c689f0, 0x3, 0x3})
	/go/pkg/mod/github.com/urfave/[email protected]/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

@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