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

reproducible cause panic #2537

Closed
Gnoale opened this issue May 29, 2023 · 3 comments · Fixed by #2546
Closed

reproducible cause panic #2537

Gnoale opened this issue May 29, 2023 · 3 comments · Fixed by #2546
Labels
area/behavior all bugs related to kaniko behavior like running in as root area/cli bugs related to kaniko CLI feature/reproducible-digest kind/bug Something isn't working priority/p0 Highest priority. Break user flow. We are actively looking at delivering it.
Milestone

Comments

@Gnoale
Copy link

Gnoale commented May 29, 2023

Trying to build an image with the --reproducible flag causes a panic in v 1.10

It seems to happen only after the latest step of the build

...
INFO[0022] Found cached layer, extracting to filesystem 
INFO[0048] COPY cmd cmd                                 
INFO[0048] Taking snapshot of files...                  
INFO[0049] COPY pkg pkg                                 
INFO[0049] Taking snapshot of files...                  
panic: runtime error: index out of range [23] with length 23

goroutine 1 [running]:
github.com/google/go-containerregistry/pkg/v1/mutate.Time({0x1d88d30, 0xc000496c00}, {0xc000496b80?, 0xc00063b800?, 0x0?})
        /src/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/mutate.go:405 +0x9db
github.com/google/go-containerregistry/pkg/v1/mutate.Canonical({0x1d88d30?, 0xc000496c00?})
        /src/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/mutate.go:509 +0x2d
github.com/GoogleContainerTools/kaniko/pkg/executor.DoBuild(0x29b1820)
        /src/pkg/executor/build.go:715 +0xee5
github.com/GoogleContainerTools/kaniko/cmd/executor/cmd.glob..func2(0x299c600?, {0x1960c3a?, 0xb?, 0xb?})
        /src/cmd/executor/cmd/root.go:163 +0x1c7
github.com/spf13/cobra.(*Command).execute(0x299c600, {0xc000000190, 0xb, 0xb})
        /src/vendor/github.com/spf13/cobra/command.go:944 +0x847
github.com/spf13/cobra.(*Command).ExecuteC(0x299c600)
        /src/vendor/github.com/spf13/cobra/command.go:1068 +0x3bd
github.com/spf13/cobra.(*Command).Execute(0x196d7bd?)
        /src/vendor/github.com/spf13/cobra/command.go:992 +0x19
main.main()
        /src/cmd/executor/main.go:31 +0x6c
Gnoale pushed a commit to Gnoale/kaniko that referenced this issue May 29, 2023
@sumkincpp
Copy link
Contributor

The problem is relevant to https://github.com/google/go-containerregistry, you can try proposing bugfix there

@aaron-prindle aaron-prindle added the priority/p0 Highest priority. Break user flow. We are actively looking at delivering it. label May 29, 2023
@aaron-prindle
Copy link
Collaborator

aaron-prindle commented May 29, 2023

As @sumkincpp mentioned, this appears to be a bug in go-containerregistry, there is an issue tracking this panic on their Github repo here:

google/go-containerregistry#1646

@aaron-prindle aaron-prindle added kind/bug Something isn't working feature/reproducible-digest area/behavior all bugs related to kaniko behavior like running in as root area/cli bugs related to kaniko CLI labels May 29, 2023
@aaron-prindle aaron-prindle added this to the v1.11.0 milestone May 30, 2023
@aaron-prindle
Copy link
Collaborator

Fix PR merged upstream - google/go-containerregistry#1715

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/behavior all bugs related to kaniko behavior like running in as root area/cli bugs related to kaniko CLI feature/reproducible-digest kind/bug Something isn't working priority/p0 Highest priority. Break user flow. We are actively looking at delivering it.
Projects
None yet
3 participants