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

fix: add a mock router to avoid panic in the coordinator client process #25

Merged
merged 1 commit into from
May 17, 2022

Conversation

agneum
Copy link
Collaborator

@agneum agneum commented May 17, 2022

Fixed panic:

panic: runtime error: invalid memory address or nil pointer dereference
spqr-coordinator-1  | [signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x8cd99e]
spqr-coordinator-1  | 
spqr-coordinator-1  | goroutine 67 [running]:
spqr-coordinator-1  | github.com/pg-sharding/spqr/router/pkg/route.(*Route).Params(0x0)
spqr-coordinator-1  | 	/home/go/src/github.com/pg-sharding/spqr/router/pkg/route/route.go:59 +0x5e
spqr-coordinator-1  | github.com/pg-sharding/spqr/router/pkg/client.(*PsqlClient).Auth(0xc0005b8db8, 0xda0f26?)
spqr-coordinator-1  | 	/home/go/src/github.com/pg-sharding/spqr/router/pkg/client/client.go:511 +0x30a
spqr-coordinator-1  | github.com/pg-sharding/spqr/coordinator/provider.(*qdbCoordinator).ProcClient(0xc00007e140?, {0xeb1430, 0xc000038040}, {0xeb3d70, 0xc0003a0000})
spqr-coordinator-1  | 	/home/go/src/github.com/pg-sharding/spqr/coordinator/provider/coordinator.go:351 +0x306
spqr-coordinator-1  | github.com/pg-sharding/spqr/coordinator/app.(*App).ServePsql(0xc000592020, 0x0?)
spqr-coordinator-1  | 	/home/go/src/github.com/pg-sharding/spqr/coordinator/app/app.go:63 +0x1ea
spqr-coordinator-1  | github.com/pg-sharding/spqr/coordinator/app.(*App).Run.func2(0x0?)
spqr-coordinator-1  | 	/home/go/src/github.com/pg-sharding/spqr/coordinator/app/app.go:40 +0x35
spqr-coordinator-1  | created by github.com/pg-sharding/spqr/coordinator/app.(*App).Run
spqr-coordinator-1  | 	/home/go/src/github.com/pg-sharding/spqr/coordinator/app/app.go:39 +0x18d

@agneum agneum requested a review from reshke May 17, 2022 10:05
@agneum agneum merged commit 388f969 into pg-sharding:master May 17, 2022
@agneum agneum deleted the coordinator-client branch May 17, 2022 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants