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

Invalid TLS config may crash service during service start #2448

Closed
yux0 opened this issue Feb 1, 2022 · 1 comment · Fixed by #2501
Closed

Invalid TLS config may crash service during service start #2448

yux0 opened this issue Feb 1, 2022 · 1 comment · Fixed by #2501
Assignees

Comments

@yux0
Copy link
Contributor

yux0 commented Feb 1, 2022

Expected Behavior

The service start should return an error to indicate the invalid tls config.

Actual Behavior

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

goroutine 1 [running]:
go.temporal.io/server/common/rpc/encryption.newServerTLSConfig({0x303fa18, 0xc00042e2a0}, {0x300f7a0, 0xc000ccc040}, 0x0, {0x303f7d8, 0xc000489750})
/Users/yx/release/temporal/common/rpc/encryption/localStoreTlsProvider.go:255 +0x144
go.temporal.io/server/common/rpc/encryption.(*localStoreTlsProvider).GetFrontendServerConfig.func1()
/Users/yx/release/temporal/common/rpc/encryption/localStoreTlsProvider.go:162 +0x4c
go.temporal.io/server/common/rpc/encryption.(*localStoreTlsProvider).getOrCreateConfig(0xc0004f2480, 0xc0004f24f8, 0xc000ebba58, 0x19)
/Users/yx/release/temporal/common/rpc/encryption/localStoreTlsProvider.go:232 +0x102
go.temporal.io/server/common/rpc/encryption.(*localStoreTlsProvider).GetFrontendServerConfig(0xc0004d9e30)
/Users/yx/release/temporal/common/rpc/encryption/localStoreTlsProvider.go:159 +0x77
go.temporal.io/server/common/rpc.(*RPCFactory).GetFrontendGRPCServerOptions(0x0)
/Users/yx/release/temporal/common/rpc/rpc.go:74 +0x36
`

Steps to Reproduce the Problem

  1. Add invalid tls config:
    global: tls: frontend: client: forceTLS: true
  2. start frontend service

Specifications

  • Version: test locally with v.1.14
  • Platform: mac os
@yux0
Copy link
Contributor Author

yux0 commented Feb 1, 2022

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

Successfully merging a pull request may close this issue.

2 participants