Skip to content

flake: TestDERPEndToEnd nil pointer in DERPMap #12277

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
spikecurtis opened this issue Feb 23, 2024 · 0 comments · Fixed by #12280
Closed

flake: TestDERPEndToEnd nil pointer in DERPMap #12277

spikecurtis opened this issue Feb 23, 2024 · 0 comments · Fixed by #12280
Assignees

Comments

@spikecurtis
Copy link
Contributor

Seen here: https://github.com/coder/coder/actions/runs/8004918533/job/21863235595

Somehow, in TestDERPEndToEnd the DERP map ends up with a null region

    t.go:99: 2024-02-22 13:05:06.248 [info]  inmem-provisionerd-test: provisioner daemon disconnected ...
        error= InmemoryListener is already closed: use of closed network connection
               	storj.io/drpc/drpcserver.(*Server).Serve:109
               	github.com/coder/coder/v2/coderd.(*API).CreateInMemoryProvisionerDaemon.func3:1311
    t.go:99: 2024-02-22 13:05:06.253 [debu]  pubsub: stopped listening to event channel  event=replica
    t.go:99: 2024-02-22 13:05:06.255 [info]  servertailnet: updating engine DERP map  derp_map="{\"Regions\":{\"10001\":null},\"omitDefaultRegions\":true}"
    t.go:99: 2024-02-22 13:05:06.255 [debu]  servertailnet.net.wgengine: magicsock: closing connection to derp-999 (derp-region-redefined), age 5s
    t.go:99: 2024-02-22 13:05:06.255 [debu]  servertailnet.net.wgengine: magicsock: 0 active derp conns
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x10c75ad]

goroutine 21311 [running]:
tailscale.com/net/netcheck.sortRegions(0xc05d1f2198, 0xc00085c2c0)
	/home/runner/go/pkg/mod/github.com/coder/tailscale@v1.1.1-0.20240214140224-3788ab894ba1/net/netcheck/netcheck.go:379 +0xed
tailscale.com/net/netcheck.makeProbePlan(0xc0585d3d80?, 0xc055b55680?, 0xc00085c2c0)
	/home/runner/go/pkg/mod/github.com/coder/tailscale@v1.1.1-0.20240214140224-3788ab894ba1/net/netcheck/netcheck.go:422 +0xea
tailscale.com/net/netcheck.(*Client).GetReport(0xc0011a8000, {0x3c4c1c8, 0xc05d1fc0e0}, 0xc05d1f2198)
	/home/runner/go/pkg/mod/github.com/coder/tailscale@v1.1.1-0.20240214140224-3788ab894ba1/net/netcheck/netcheck.go:981 +0xfde
tailscale.com/wgengine/magicsock.(*Conn).updateNetInfo(0xc000243c00, {0x3c4c158, 0xc000b6a3c0})
	/home/runner/go/pkg/mod/github.com/coder/tailscale@v1.1.1-0.20240214140224-3788ab894ba1/wgengine/magicsock/magicsock.go:659 +0x1e5
tailscale.com/wgengine/magicsock.(*Conn).determineEndpoints(0xc000243c00, {0x3c4c158, 0xc000b6a3c0})
	/home/runner/go/pkg/mod/github.com/coder/tailscale@v1.1.1-0.20240214140224-3788ab894ba1/wgengine/magicsock/magicsock.go:882 +0x85
tailscale.com/wgengine/magicsock.(*Conn).updateEndpoints(0xc000243c00, {0x2ce7ffe, 0xf})
	/home/runner/go/pkg/mod/github.com/coder/tailscale@v1.1.1-0.20240214140224-3788ab894ba1/wgengine/magicsock/magicsock.go:561 +0x249
created by tailscale.com/wgengine/magicsock.(*Conn).ReSTUN in goroutine 21310
	/home/runner/go/pkg/mod/github.com/coder/tailscale@v1.1.1-0.20240214140224-3788ab894ba1/wgengine/magicsock/magicsock.go:2260 +0x3ee

Spidey sense says the problem might be around here:

10001: derpMap.Regions[10001],

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 a pull request may close this issue.

2 participants