{"record":{"id":"66f0b9b8b6563e09","repo":"tailscale/tailscale","slug":"recvmsg-msg-errqueue-error-v","errorCode":null,"errorMessage":"recvmsg (MSG_ERRQUEUE) error: %v","messagePattern":"recvmsg \\(MSG_ERRQUEUE\\) error: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/stunstamp/stunstamp_linux.go","lineNumber":119,"sourceCode":"\t\treturn 0, err\n\t}\n\ttxAt := time.Now()\n\terr = sconn.Sendto(context.Background(), txBuf, 0, to)\n\tif err != nil {\n\t\treturn 0, fmt.Errorf(\"sendto error: %v\", err)\n\t}\n\n\tif source == timestampSourceKernel {\n\t\ttxCtx, txCancel := context.WithTimeout(context.Background(), txRxTimeout)\n\t\tdefer txCancel()\n\n\t\tbuf := make([]byte, 1024)\n\t\toob := make([]byte, 1024)\n\n\t\tfor {\n\t\t\tn, oobn, _, _, err := sconn.Recvmsg(txCtx, buf, oob, unix.MSG_ERRQUEUE)\n\t\t\tif err != nil {\n\t\t\t\treturn 0, fmt.Errorf(\"recvmsg (MSG_ERRQUEUE) error: %v\", err) // don't wrap\n\t\t\t}\n\n\t\t\tbuf = buf[:n]\n\t\t\t// Spin until we find the message we sent. We get the full packet\n\t\t\t// looped including eth header so match against the tail.\n\t\t\tif n < len(txBuf) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\ttxLoopedMsg, err := icmp.ParseMessage(txMsg.Type.Protocol(), buf[len(buf)-len(txBuf):])\n\t\t\tif err != nil {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\ttxLoopedBody, ok := txLoopedMsg.Body.(*icmp.Echo)\n\t\t\tif !ok || txLoopedBody.Seq != txBody.Seq || txLoopedMsg.Code != txMsg.Code ||\n\t\t\t\ttxLoopedMsg.Type != txLoopedMsg.Type || !bytes.Equal(txLoopedBody.Data, txBody.Data) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\ttxAt, err = parseTimestampFromCmsgs(oob[:oobn])","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/tailscale/tailscale/blob/cfe32b8be6a33f8e24fbc369cbfbf7c729d9e042/cmd/stunstamp/stunstamp_linux.go#L101-L137","documentation":"Error \"recvmsg (MSG_ERRQUEUE) error: %v\" thrown in tailscale/tailscale.","triggerScenarios":"Thrown at cmd/stunstamp/stunstamp_linux.go:119 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"cfe32b8be6a33f8e24fbc369cbfbf7c729d9e042","analyzedAt":"2026-08-15T19:58:31.583Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}