Skip to content

client_secret_path: cli.initConfig: SIGSEGV #1203

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

Closed
almereyda opened this issue Feb 4, 2023 · 5 comments
Closed

client_secret_path: cli.initConfig: SIGSEGV #1203

almereyda opened this issue Feb 4, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@almereyda
Copy link

almereyda commented Feb 4, 2023

Bug description

When starting a 0.20.0 container (on SQLite), it immediately throws:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb0 pc=0x102e75f]

goroutine 1 [running]:
github.com/juanfont/headscale/cmd/headscale/cli.initConfig()
	/go/src/headscale/cmd/headscale/cli/root.go:59 +0x21f
github.com/spf13/cobra.(*Command).preRun(...)
	/go/pkg/mod/github.com/spf13/[email protected]/command.go:946
github.com/spf13/cobra.(*Command).execute(0x1cc3040, {0x1d075c0, 0x0, 0x0})
	/go/pkg/mod/github.com/spf13/[email protected]/command.go:876 +0x563
github.com/spf13/cobra.(*Command).ExecuteC(0x1cc1f00)
	/go/pkg/mod/github.com/spf13/[email protected]/command.go:1044 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
	/go/pkg/mod/github.com/spf13/[email protected]/command.go:968
github.com/juanfont/headscale/cmd/headscale/cli.Execute()
	/go/src/headscale/cmd/headscale/cli/root.go:101 +0x25
main.main()
	/go/src/headscale/cmd/headscale/headscale.go:42 +0x235

This is the container running on GKE on Co-OS nodes.

To Reproduce

Run the 0.20.0 container on Kubernetes.

@almereyda almereyda added the bug Something isn't working label Feb 4, 2023
@almereyda
Copy link
Author

almereyda commented Feb 4, 2023

This also happens with 0.19.0, and then with pc=0x102e31f. The rest is the same.

With 0.18.0 it now also appears at 0x102cdbf.

I'm able to reproduce the exact same errors locally.

As this happens in cli.initConfig(), this is most likely a parsing error of the configuration file? Let's inspect it.

@almereyda
Copy link
Author

almereyda commented Feb 4, 2023

This has something to do with client_secret_path. The error does not occur when this directive is not used, but client_secret given instead.

@almereyda almereyda changed the title 0.20.0: panic: runtime error: invalid memory address or nil pointer dereference panic: runtime error: invalid memory address or nil pointer dereference Feb 4, 2023
@almereyda almereyda changed the title panic: runtime error: invalid memory address or nil pointer dereference client_secret_path: cli.initConfig(): panic: runtime error: invalid memory address or nil pointer dereference SIGSEGV Feb 4, 2023
@almereyda almereyda changed the title client_secret_path: cli.initConfig(): panic: runtime error: invalid memory address or nil pointer dereference SIGSEGV client_secret_path: cli.initConfig: SIGSEGV Feb 4, 2023
@almereyda
Copy link
Author

Related #1127

@traxys
Copy link

traxys commented Jul 29, 2023

Happened to me, it seems it was due to invalid permissions on the client_secret_path, changing the owner of that file fixed it.

@almereyda
Copy link
Author

Thank you!

I believe we can close here, then.

This is not a use case I need to support anymore.

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