Skip to content
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.

nil pointer deref in listen #594

Open
hellt opened this issue May 6, 2022 · 1 comment
Open

nil pointer deref in listen #594

hellt opened this issue May 6, 2022 · 1 comment

Comments

@hellt
Copy link
Collaborator

hellt commented May 6, 2022

reported by @Aturnal
running 0.24.4

gnmic listen -a 0.0.0.0:57500 --insecure --debug
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x22fd501]



goroutine 1 [running]:
os.(*File).Name(...)
/opt/hostedtoolcache/go/1.17.2/x64/src/os/file.go:57
github.com/karimra/gnmic/outputs/file.(*File).Close(0xc0005e3f40)
/home/runner/work/gnmic/gnmic/outputs/file/file_output.go:256 +0x21
github.com/karimra/gnmic/cmd.newListenCmd.func2.1()
/home/runner/work/gnmic/gnmic/cmd/listen.go:106 +0x5d
github.com/karimra/gnmic/cmd.newListenCmd.func2(0xc00063f900, {0xc00087ef40, 0x4, 0x4})
/home/runner/work/gnmic/gnmic/cmd/listen.go:111 +0x1289
github.com/spf13/cobra.(*Command).execute(0xc00063f900, {0xc00087ef00, 0x4, 0x4})
/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:856 +0x60e
github.com/spf13/cobra.(*Command).ExecuteC(0xc00063ea00)
/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:974 +0x3bc
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:902
github.com/karimra/gnmic/cmd.Execute()
/home/runner/work/gnmic/gnmic/cmd/root.go:87 +0x2f
main.main()
/home/runner/work/gnmic/gnmic/main.go:22 +0x17

happened on a VM, was not reproducible on a server.

@karimra
Copy link
Owner

karimra commented May 9, 2022

Does this happen when the command is stopped with Ctrl+C ? any config file in PWD or HOME ? anymore log output ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants