Thanks to visit codestin.com
Credit goes to github.com

Skip to content

flake: panic in agent.createTailnet() #221

Closed
coder/coder
#15615
@johnstcn

Description

@johnstcn
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x18a8e4d]

goroutine 5788 [running]:
github.com/coder/coder/v2/agent.(*agent).createTailnet.func5()
	/home/runner/work/coder/coder/agent/agent.go:1195 +0x2ed
github.com/coder/coder/v2/agent.(*agent).trackGoroutine.func1()
	/home/runner/work/coder/coder/agent/agent.go:1127 +0x59
created by github.com/coder/coder/v2/agent.(*agent).trackGoroutine in goroutine 5678
	/home/runner/work/coder/coder/agent/agent.go:1125 +0x12b

seen here: https://github.com/coder/coder/actions/runs/11934059467/job/33262408288?pr=15603

Unsure if this might be an actual bug.

Relevant code in agent/agent.go:

1194                         clog := logger.With(
1195                                 slog.F("remote", conn.RemoteAddr().String()),                                                                                                                                                           
1196                                 slog.F("local", conn.LocalAddr().String()))
1197                         clog.Info(ctx, "accepted conn")

It loosk like conn.RemoteAddr() can sometimes be nil?

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions