hashicorp / hashicorp/serf

serf panics on MacOS when waking up from sleep during a network switch

Open
#688 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
6.1k
Forks
609
Avg merge
15h 1m
Merged PRs (30d)
3

Description

To reproduce:
1. close macbook
2. walk to a different WiFi access point
3. open MacBook lid
4. serf panics

I think it might _specifically_ be because I switched to a network out without Ipv6.

```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x102f50328]

goroutine 701 [running]:
net.(*UDPConn).SyscallConn(0x140000a47c0?)
net/udpsock.go:129 +0x18
golang.org/x/net/internal/socket.NewConn({0x1032dad18?, 0x0})
golang.org/x/net@v0.0.0-20210410081132-afb366fc7cd1/internal/socket/rawconn.go:57 +0x170
golang.org/x/net/ipv6.NewPacketConn({0x1032d8c60?, 0x0})
golang.org/x/net@v0.0.0-20210410081132-afb366fc7cd1/ipv6/endpoint.go:121 +0x40
github.com/hashicorp/mdns.(*client).setInterface(0x14000390c60, 0x1400008dda0?)
github.com/hashicorp/mdns@v1.0.4/client.go:191 +0xac
github.com/hashicorp/mdns.Query(0x1400016df68)
github.com/hashicorp/mdns@v1.0.4/client.go:72 +0x6c
github.com/hashicorp/serf/cmd/serf/command/agent.(*AgentMDNS).poll(0x14000186480, 0x14000300000)
github.com/hashicorp/serf/cmd/serf/command/agent/mdns.go:127 +0x9c
created by github.com/hashicorp/serf/cmd/serf/command/agent.(*AgentMDNS).run
github.com/hashicorp/serf/cmd/serf/command/agent/mdns.go:115 +0x320

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.