Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

test: create unit test to match nil deref behavior#17501

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Emyrk merged 4 commits intomainfromstevenmasley/oidc_panic
Apr 23, 2025

Conversation

Emyrk
Copy link
Member

Hit this panic in a deployment:

panic: runtime error: invalid memory address or nil pointer dereference[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x322d541]goroutine 50263 [running]:github.com/coder/coder/v2/coderd.(*OIDCConfig).TokenSource(0x103e2078?, {0x13dd2590?, 0xc013de1e60?}, 0x28748d58?)<autogenerated>:1 +0x21github.com/coder/coder/v2/coderd/provisionerdserver.obtainOIDCAccessToken({0x13dd2590, 0xc013de1e60}, {0x13e8e1f8, 0xc000f31950}, {0x13dc7fc0, 0x0}, {0x24, 0xec, 0x29, 0x28, ...})/home/steven/go/src/github.com/coder/coder/coderd/provisionerdserver/provisionerdserver.go:2355 +0x322github.com/coder/coder/v2/coderd/provisionerdserver.(*server).acquireProtoJob(_, {_, _}, {{0x43, 0xa3, 0xff, 0x87, 0x50, 0x60, 0x4c, ...}, ...})/home/steven/go/src/github.com/coder/coder/coderd/provisionerdserver/provisionerdserver.go:519 +0x2191github.com/coder/coder/v2/coderd/provisionerdserver.(*server).AcquireJobWithCancel(0xc000d3a1a0, {0x13de5e10, 0xc0036f40f0})/home/steven/go/src/github.com/coder/coder/coderd/provisionerdserver/provisionerdserver.go:398 +0xb7agithub.com/coder/coder/v2/provisionerd/proto.DRPCProvisionerDaemonDescription.Method.func2({0x4286da0?, 0xc000d3a1a0}, {0xc000c60380?, 0x16599c60?}, {0x430bc40?, 0xc001601b08}, {0x531a94?, 0x13dd2408?})/home/steven/go/src/github.com/coder/coder/provisionerd/proto/provisionerd_drpc.pb.go:197 +0x134storj.io/drpc/drpcmux.(*Mux).HandleRPC(0xc000600008?, {0x13dde280, 0xc001601b08}, {0xc000c60380, 0x34})/home/steven/go/pkg/mod/storj.io/drpc@v0.0.33/drpcmux/handle_rpc.go:33 +0x207github.com/coder/coder/v2/coderd/tracing.(*DRPCHandler).HandleRPC(0xc013bbf1c0, {0x13dde280, 0xc001601b08}, {0xc000c60380, 0x34})/home/steven/go/src/github.com/coder/coder/coderd/tracing/drpc.go:23 +0x1bbstorj.io/drpc/drpcserver.(*Server).handleRPC(0xc001b421c0?, 0xc001601b08, {0xc000c60380?, 0x16599c60?})/home/steven/go/pkg/mod/storj.io/drpc@v0.0.33/drpcserver/server.go:124 +0x36storj.io/drpc/drpcserver.(*Server).ServeOne(0xc00072f500, {0x13dd6f58, 0xc013b62690}, {0x7465634314a8?, 0xc002065860?})/home/steven/go/pkg/mod/storj.io/drpc@v0.0.33/drpcserver/server.go:66 +0x1b3storj.io/drpc/drpcserver.(*Server).Serve.func2({0x13dd6f58?, 0xc013b62690?})/home/steven/go/pkg/mod/storj.io/drpc@v0.0.33/drpcserver/server.go:114 +0x57storj.io/drpc/drpcctx.(*Tracker).track(0xc013b62690, 0xc013bb76c0?)/home/steven/go/pkg/mod/storj.io/drpc@v0.0.33/drpcctx/tracker.go:35 +0x25created by storj.io/drpc/drpcctx.(*Tracker).Run in goroutine 549/home/steven/go/pkg/mod/storj.io/drpc@v0.0.33/drpcctx/tracker.go:30 +0x76

Copy link
Member

@johnstcnjohnstcn left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This is the correct solution if you only know the interface type and not the underlying concrete type.

ref:https://groups.google.com/g/golang-nuts/c/wnH302gBa4I

Emyrk reacted with heart emoji
@EmyrkEmyrk merged commit71dbd0c intomainApr 23, 2025
29 checks passed
@EmyrkEmyrk deleted the stevenmasley/oidc_panic branchApril 23, 2025 13:45
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsApr 23, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@johnstcnjohnstcnjohnstcn approved these changes

Assignees

@EmyrkEmyrk

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@Emyrk@johnstcn

[8]ページ先頭

©2009-2025 Movatter.jp