segmentation fault without logs #490

Closed
opened 2025-12-29 02:19:02 +01:00 by adam · 3 comments
Owner

Originally created by @celevra on GitHub (Apr 29, 2023).

Bug description
started a fresh docker container with headscale and ocid with keycloak
added one exit node via preshared key and one client via ocid, while the client authenticates, the server stops without a log entry (Loglevel debug) and is unusable even if i stop the tailscale service on the client.

Context info

tailscale --version
1.40.0
  tailscale commit: 105be684dd04727a58ed213ec9499d071a377ece
  other commit: 4c70014a47f1816e1573a8cef58cdaf96f78a264
  go version: go1.20.3-tsddff070
headscale version
0.22.1
# uname -a
Linux vpn 5.15.0-71-generic #78-Ubuntu SMP Tue Apr 18 09:00:08 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux

last log entries:

2023-04-29T18:32:24Z DBG Registering machine machine=DESKTOP-R6C8AH7 machine_key=8afeed3d2fafb293979a3020c9d925a8613343ebc9b2556d0bf294f04a9c843e node_key=02f2744c04e52df26091cd89735cda13167d16b0de43dd14b65ab258c5c4654b user=
2023-04-29T18:32:25Z DBG go/src/headscale/protocol_common.go:665 > Client is registered and we have the current NodeKey. All clear to /map machine=DESKTOP-R6C8AH7 noise=true
2023-04-29T18:32:25Z INF go/src/headscale/protocol_common.go:703 > Machine successfully authorized machine=DESKTOP-R6C8AH7 noise=true
2023-04-29T18:32:25Z DBG A machine is entering polling via the Noise protocol handler=NoisePollNetMap machine=DESKTOP-R6C8AH7
2023-04-29T18:32:25Z DBG Expanding alias=group:team
2023-04-29T18:32:25Z DBG Expanding alias=exit
2023-04-29T18:32:25Z DBG Expanding alias=group:team
2023-04-29T18:32:25Z DBG Expanding alias=bauer
2023-04-29T18:32:25Z DBG Expanding alias=192.168.1.0/24
2023-04-29T18:32:25Z DBG Expanding alias=group:team
2023-04-29T18:32:25Z DBG Expanding alias=internet
2023-04-29T18:32:25Z DBG Expanding alias=0.0.0.0/0
2023/04/29 18:32:29 http: response.WriteHeader on hijacked connection from github.com/juanfont/headscale.(*Headscale).NoiseUpgradeHandler (noise.go:50)
2023/04/29 18:32:29 http: response.Write on hijacked connection from fmt.Fprintln (print.go:305)
2023-04-29T18:32:29Z ERR noise upgrade failed error="noise handshake failed: decrypting machine key: chacha20poly1305: message authentication failed"
2023-04-29T18:32:31Z DBG Sending update request func=scheduledPollWorker machine=vpn noise=true
vpn headscale #

after this headscale is in a "reboot loop"

2023-04-29T18:37:59Z DBG Loading ACL policy from path func=LoadACLPolicy path=/etc/headscale/acl.hujson
2023-04-29T18:37:59Z DBG Expanding alias=group:team
2023-04-29T18:37:59Z DBG Expanding alias=exit
2023-04-29T18:37:59Z DBG Expanding alias=group:team
2023-04-29T18:37:59Z DBG Expanding alias=bauer
2023-04-29T18:37:59Z DBG Expanding alias=192.168.1.0/24
2023-04-29T18:37:59Z DBG Expanding alias=group:team
2023-04-29T18:37:59Z DBG Expanding alias=internet
2023-04-29T18:37:59Z DBG Expanding alias=0.0.0.0/0
2023-04-29T18:38:10Z DBG Loading ACL policy from path func=LoadACLPolicy path=/etc/headscale/acl.hujson
2023-04-29T18:38:10Z DBG Expanding alias=group:team
2023-04-29T18:38:10Z DBG Expanding alias=exit
2023-04-29T18:38:10Z DBG Expanding alias=group:team
2023-04-29T18:38:10Z DBG Expanding alias=bauer
2023-04-29T18:38:10Z DBG Expanding alias=192.168.1.0/24
2023-04-29T18:38:10Z DBG Expanding alias=group:team
2023-04-29T18:38:10Z DBG Expanding alias=internet
2023-04-29T18:38:10Z DBG Expanding alias=0.0.0.0/0
2023-04-29T18:38:23Z DBG Loading ACL policy from path func=LoadACLPolicy path=/etc/headscale/acl.hujson
2023-04-29T18:38:23Z DBG Expanding alias=group:team
2023-04-29T18:38:23Z DBG Expanding alias=exit
2023-04-29T18:38:23Z DBG Expanding alias=group:team
2023-04-29T18:38:23Z DBG Expanding alias=bauer
2023-04-29T18:38:23Z DBG Expanding alias=192.168.1.0/24
2023-04-29T18:38:23Z DBG Expanding alias=group:team
2023-04-29T18:38:23Z DBG Expanding alias=internet
2023-04-29T18:38:23Z DBG Expanding alias=0.0.0.0/

what can i provide to digg deeper?

Originally created by @celevra on GitHub (Apr 29, 2023). <!-- Headscale is a multinational community across the globe. Our common language is English. Please consider raising the bug report in this language. --> **Bug description** started a fresh docker container with headscale and ocid with keycloak added one exit node via preshared key and one client via ocid, while the client authenticates, the server stops without a log entry (Loglevel debug) and is unusable even if i stop the tailscale service on the client. **Context info** <!-- Please add relevant information about your system. For example: - Version of headscale used - Version of tailscale client - OS (e.g. Linux, Mac, Cygwin, WSL, etc.) and version - Kernel version - The relevant config parameters you used - Log output --> ``` tailscale --version 1.40.0 tailscale commit: 105be684dd04727a58ed213ec9499d071a377ece other commit: 4c70014a47f1816e1573a8cef58cdaf96f78a264 go version: go1.20.3-tsddff070 ``` ``` headscale version 0.22.1 ``` ``` # uname -a Linux vpn 5.15.0-71-generic #78-Ubuntu SMP Tue Apr 18 09:00:08 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux ``` last log entries: ``` 2023-04-29T18:32:24Z DBG Registering machine machine=DESKTOP-R6C8AH7 machine_key=8afeed3d2fafb293979a3020c9d925a8613343ebc9b2556d0bf294f04a9c843e node_key=02f2744c04e52df26091cd89735cda13167d16b0de43dd14b65ab258c5c4654b user= 2023-04-29T18:32:25Z DBG go/src/headscale/protocol_common.go:665 > Client is registered and we have the current NodeKey. All clear to /map machine=DESKTOP-R6C8AH7 noise=true 2023-04-29T18:32:25Z INF go/src/headscale/protocol_common.go:703 > Machine successfully authorized machine=DESKTOP-R6C8AH7 noise=true 2023-04-29T18:32:25Z DBG A machine is entering polling via the Noise protocol handler=NoisePollNetMap machine=DESKTOP-R6C8AH7 2023-04-29T18:32:25Z DBG Expanding alias=group:team 2023-04-29T18:32:25Z DBG Expanding alias=exit 2023-04-29T18:32:25Z DBG Expanding alias=group:team 2023-04-29T18:32:25Z DBG Expanding alias=bauer 2023-04-29T18:32:25Z DBG Expanding alias=192.168.1.0/24 2023-04-29T18:32:25Z DBG Expanding alias=group:team 2023-04-29T18:32:25Z DBG Expanding alias=internet 2023-04-29T18:32:25Z DBG Expanding alias=0.0.0.0/0 2023/04/29 18:32:29 http: response.WriteHeader on hijacked connection from github.com/juanfont/headscale.(*Headscale).NoiseUpgradeHandler (noise.go:50) 2023/04/29 18:32:29 http: response.Write on hijacked connection from fmt.Fprintln (print.go:305) 2023-04-29T18:32:29Z ERR noise upgrade failed error="noise handshake failed: decrypting machine key: chacha20poly1305: message authentication failed" 2023-04-29T18:32:31Z DBG Sending update request func=scheduledPollWorker machine=vpn noise=true vpn headscale # ``` after this headscale is in a "reboot loop" ``` 2023-04-29T18:37:59Z DBG Loading ACL policy from path func=LoadACLPolicy path=/etc/headscale/acl.hujson 2023-04-29T18:37:59Z DBG Expanding alias=group:team 2023-04-29T18:37:59Z DBG Expanding alias=exit 2023-04-29T18:37:59Z DBG Expanding alias=group:team 2023-04-29T18:37:59Z DBG Expanding alias=bauer 2023-04-29T18:37:59Z DBG Expanding alias=192.168.1.0/24 2023-04-29T18:37:59Z DBG Expanding alias=group:team 2023-04-29T18:37:59Z DBG Expanding alias=internet 2023-04-29T18:37:59Z DBG Expanding alias=0.0.0.0/0 2023-04-29T18:38:10Z DBG Loading ACL policy from path func=LoadACLPolicy path=/etc/headscale/acl.hujson 2023-04-29T18:38:10Z DBG Expanding alias=group:team 2023-04-29T18:38:10Z DBG Expanding alias=exit 2023-04-29T18:38:10Z DBG Expanding alias=group:team 2023-04-29T18:38:10Z DBG Expanding alias=bauer 2023-04-29T18:38:10Z DBG Expanding alias=192.168.1.0/24 2023-04-29T18:38:10Z DBG Expanding alias=group:team 2023-04-29T18:38:10Z DBG Expanding alias=internet 2023-04-29T18:38:10Z DBG Expanding alias=0.0.0.0/0 2023-04-29T18:38:23Z DBG Loading ACL policy from path func=LoadACLPolicy path=/etc/headscale/acl.hujson 2023-04-29T18:38:23Z DBG Expanding alias=group:team 2023-04-29T18:38:23Z DBG Expanding alias=exit 2023-04-29T18:38:23Z DBG Expanding alias=group:team 2023-04-29T18:38:23Z DBG Expanding alias=bauer 2023-04-29T18:38:23Z DBG Expanding alias=192.168.1.0/24 2023-04-29T18:38:23Z DBG Expanding alias=group:team 2023-04-29T18:38:23Z DBG Expanding alias=internet 2023-04-29T18:38:23Z DBG Expanding alias=0.0.0.0/ ``` what can i provide to digg deeper?
adam added the stalebug labels 2025-12-29 02:19:02 +01:00
adam closed this issue 2025-12-29 02:19:02 +01:00
Author
Owner

@pkrivanec commented on GitHub (May 8, 2023):

Hi,

have a look at #1372, do you have ACLs with large networks?

It looks to be the same problem:
2023-04-29T18:38:10Z DBG Expanding alias=0.0.0.0/0

@pkrivanec commented on GitHub (May 8, 2023): Hi, have a look at #1372, do you have ACLs with large networks? It looks to be the same problem: 2023-04-29T18:38:10Z DBG Expanding alias=0.0.0.0/0
Author
Owner

@github-actions[bot] commented on GitHub (Nov 5, 2023):

This issue is stale because it has been open for 180 days with no activity.

@github-actions[bot] commented on GitHub (Nov 5, 2023): This issue is stale because it has been open for 180 days with no activity.
Author
Owner

@github-actions[bot] commented on GitHub (Nov 19, 2023):

This issue was closed because it has been inactive for 14 days since being marked as stale.

@github-actions[bot] commented on GitHub (Nov 19, 2023): This issue was closed because it has been inactive for 14 days since being marked as stale.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#490