tailscale/tailscale · error

recvmsg (MSG_ERRQUEUE) error: %v

Error message

recvmsg (MSG_ERRQUEUE) error: %v

What it means

Error "recvmsg (MSG_ERRQUEUE) error: %v" thrown in tailscale/tailscale.

Source

Thrown at cmd/stunstamp/stunstamp_linux.go:119

		return 0, err
	}
	txAt := time.Now()
	err = sconn.Sendto(context.Background(), txBuf, 0, to)
	if err != nil {
		return 0, fmt.Errorf("sendto error: %v", err)
	}

	if source == timestampSourceKernel {
		txCtx, txCancel := context.WithTimeout(context.Background(), txRxTimeout)
		defer txCancel()

		buf := make([]byte, 1024)
		oob := make([]byte, 1024)

		for {
			n, oobn, _, _, err := sconn.Recvmsg(txCtx, buf, oob, unix.MSG_ERRQUEUE)
			if err != nil {
				return 0, fmt.Errorf("recvmsg (MSG_ERRQUEUE) error: %v", err) // don't wrap
			}

			buf = buf[:n]
			// Spin until we find the message we sent. We get the full packet
			// looped including eth header so match against the tail.
			if n < len(txBuf) {
				continue
			}
			txLoopedMsg, err := icmp.ParseMessage(txMsg.Type.Protocol(), buf[len(buf)-len(txBuf):])
			if err != nil {
				continue
			}
			txLoopedBody, ok := txLoopedMsg.Body.(*icmp.Echo)
			if !ok || txLoopedBody.Seq != txBody.Seq || txLoopedMsg.Code != txMsg.Code ||
				txLoopedMsg.Type != txLoopedMsg.Type || !bytes.Equal(txLoopedBody.Data, txBody.Data) {
				continue
			}
			txAt, err = parseTimestampFromCmsgs(oob[:oobn])

View on GitHub (pinned to cfe32b8be6)

When it happens

Trigger: Thrown at cmd/stunstamp/stunstamp_linux.go:119 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tailscale/tailscale@cfe32b8be6 (2026-08-15). Data as JSON: /api/errors/66f0b9b8b6563e09. Report an issue: GitHub.