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

--debug flag causes panic #43

Open
jacobtomlinson opened this issue Jun 20, 2023 · 1 comment
Open

--debug flag causes panic #43

jacobtomlinson opened this issue Jun 20, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@jacobtomlinson
Copy link
Member

$ canary version                                              
Container Canary
 Version:         v0.2.1
 Go Version:      go1.17.8
 Commit:          d97ec23
 OS/Arch:         linux/amd64
 Built:           2022-04-14T10:03:44Z

$ canary validate --file examples/awesome.yaml ubuntu --debug     
Validating ubuntu against awesome
Running container with command 'docker run -d --name canary-runner-f716bacd ubuntu sleep 30'
 📦 Required packages are installed                  [passed]
 🤖 Expected services are running                    [passed]
 🎉 Your container is awesome                        [passed]
validation passed
Caught panic:

runtime error: invalid memory address or nil pointer dereference

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
        /opt/hostedtoolcache/go/1.17.8/x64/src/runtime/debug/stack.go:24 +0x65
runtime/debug.PrintStack()
        /opt/hostedtoolcache/go/1.17.8/x64/src/runtime/debug/stack.go:16 +0x19
github.com/charmbracelet/bubbletea.(*Program).StartReturningModel.func3()
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.20.0/tea.go:359 +0x95
panic({0xb3e660, 0x11f1150})
        /opt/hostedtoolcache/go/1.17.8/x64/src/runtime/panic.go:1047 +0x266
github.com/nvidia/container-canary/internal/validator.model.View({0xc000048360, {0xd116d8, 0xc00035a000}, 0x1, {0xc0001dc8c0, 0x3, 0x4}, 0x1, {{{0x11f6e60, 0x4, ...}, ...}, ...}, ...})
        /home/runner/work/container-canary/container-canary/internal/validator/validator.go:184 +0x185
github.com/charmbracelet/bubbletea.(*Program).StartReturningModel(0xc0001b0200)
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.20.0/tea.go:549 +0x1438
github.com/nvidia/container-canary/internal/validator.Validate({0x7fff7bb98156, 0x6}, {0x7fff7bb98140, 0x15}, 0xc0000dbdd0, 0x1)
        /home/runner/work/container-canary/container-canary/internal/validator/validator.go:239 +0x545
github.com/nvidia/container-canary/cmd.glob..func1(0x11f91c0, {0xc00009ac40, 0x1, 0x4})
        /home/runner/work/container-canary/container-canary/cmd/validate.go:50 +0xd1
github.com/spf13/cobra.(*Command).execute(0x11f91c0, {0xc00009ac00, 0x4, 0x4})
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:856 +0x60e
github.com/spf13/cobra.(*Command).ExecuteC(0x11f8f40)
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:974 +0x3bc
github.com/spf13/cobra.(*Command).Execute(...)
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:902
github.com/nvidia/container-canary/cmd.Execute()
        /home/runner/work/container-canary/container-canary/cmd/root.go:44 +0x25
main.main()
        /home/runner/work/container-canary/container-canary/main.go:23 +0x17
Error: program returned unknown model
@jacobtomlinson jacobtomlinson added the bug Something isn't working label Jun 20, 2023
@danielballan
Copy link

Drive-by comment to say:

  • I saw @jacobtomlinson's SciPy Lightning on this project and finally got around to using it. It's great!
  • As you can imagine, I found this GH issue because I reproduced this bug.

Thanks for sharing this useful work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants