Headscale crash with unknown cause #688

Closed
opened 2025-12-29 02:22:05 +01:00 by adam · 1 comment
Owner

Originally created by @winterheart on GitHub (Apr 9, 2024).

Bug description

Periodically headscale crashes with dump in logs:

fatal error: concurrent map read and map write

goroutine 106672824 [running]:
github.com/juanfont/headscale/hscontrol.(*Headscale).handlePoll(0xc0002fc0e0, {0x2294590, _}, {_, _}, _, {0x57, {0xc007b4ba58, 0x4}, 0x1, ...})
        /home/runner/work/headscale/headscale/hscontrol/poll.go:455 +0x2169
github.com/juanfont/headscale/hscontrol.(*noiseServer).NoisePollNetMapHandler(0xc0018d1830, {0x2294590, 0xc00411c8b8}, 0xc0010626c0)
        /home/runner/work/headscale/headscale/hscontrol/poll_noise.go:95 +0x596
net/http.HandlerFunc.ServeHTTP(0xc0010625a0?, {0x2294590?, 0xc00411c8b8?}, 0xc0019a0000?)
        /nix/store/88y9r33p3j8f7bc8sqiy9jdlk7yqfrlg-go-1.22.0/share/go/src/net/http/server.go:2166 +0x29
github.com/gorilla/mux.(*Router).ServeHTTP(0xc0051800c0, {0x2294590, 0xc00411c8b8}, 0xc001991e60)
        /home/runner/go/pkg/mod/github.com/gorilla/mux@v1.8.1/mux.go:212 +0x1e2
golang.org/x/net/http2.(*serverConn).runHandler(0x4498fd?, 0x0?, 0x0?, 0xc0013a7400?)
        /home/runner/go/pkg/mod/golang.org/x/net@v0.21.0/http2/server.go:2368 +0xbb
created by golang.org/x/net/http2.(*serverConn).scheduleHandler in goroutine 106672803
        /home/runner/go/pkg/mod/golang.org/x/net@v0.21.0/http2/server.go:2303 +0x21d

Environment

  • OS: Gentoo Linux

  • Headscale version: v0.23.0-alpha5

  • Tailscale version: any

  • Headscale is behind a (reverse) proxy

  • Headscale runs in a container

Originally created by @winterheart on GitHub (Apr 9, 2024). <!-- Before posting a bug report, discuss the behaviour you are expecting with the Discord community to make sure that it is truly a bug. The issue tracker is not the place to ask for support or how to set up Headscale. Bug reports without the sufficient information will be closed. Headscale is a multinational community across the globe. Our language is English. All bug reports needs to be in English. --> ## Bug description Periodically headscale crashes with dump in logs: ``` fatal error: concurrent map read and map write goroutine 106672824 [running]: github.com/juanfont/headscale/hscontrol.(*Headscale).handlePoll(0xc0002fc0e0, {0x2294590, _}, {_, _}, _, {0x57, {0xc007b4ba58, 0x4}, 0x1, ...}) /home/runner/work/headscale/headscale/hscontrol/poll.go:455 +0x2169 github.com/juanfont/headscale/hscontrol.(*noiseServer).NoisePollNetMapHandler(0xc0018d1830, {0x2294590, 0xc00411c8b8}, 0xc0010626c0) /home/runner/work/headscale/headscale/hscontrol/poll_noise.go:95 +0x596 net/http.HandlerFunc.ServeHTTP(0xc0010625a0?, {0x2294590?, 0xc00411c8b8?}, 0xc0019a0000?) /nix/store/88y9r33p3j8f7bc8sqiy9jdlk7yqfrlg-go-1.22.0/share/go/src/net/http/server.go:2166 +0x29 github.com/gorilla/mux.(*Router).ServeHTTP(0xc0051800c0, {0x2294590, 0xc00411c8b8}, 0xc001991e60) /home/runner/go/pkg/mod/github.com/gorilla/mux@v1.8.1/mux.go:212 +0x1e2 golang.org/x/net/http2.(*serverConn).runHandler(0x4498fd?, 0x0?, 0x0?, 0xc0013a7400?) /home/runner/go/pkg/mod/golang.org/x/net@v0.21.0/http2/server.go:2368 +0xbb created by golang.org/x/net/http2.(*serverConn).scheduleHandler in goroutine 106672803 /home/runner/go/pkg/mod/golang.org/x/net@v0.21.0/http2/server.go:2303 +0x21d ``` ## Environment - OS: Gentoo Linux - Headscale version: v0.23.0-alpha5 - Tailscale version: any - [ ] Headscale is behind a (reverse) proxy - [x] Headscale runs in a container
adam added the bug label 2025-12-29 02:22:05 +01:00
adam closed this issue 2025-12-29 02:22:06 +01:00
Author
Owner

@kradalby commented on GitHub (Apr 17, 2024):

Could you please try the newest alpha (https://github.com/juanfont/headscale/releases/tag/v0.23.0-alpha6) and report back?

@kradalby commented on GitHub (Apr 17, 2024): Could you please try the newest alpha (https://github.com/juanfont/headscale/releases/tag/v0.23.0-alpha6) and report back?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#688