{"record":{"id":"2d51601e84a0f0a5","repo":"netbirdio/netbird","slug":"ipcget-failed-w","errorCode":null,"errorMessage":"IpcGet failed: %w","messagePattern":"IpcGet failed: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"client/iface/configurer/usp.go","lineNumber":305,"sourceCode":"\t\t\t\treturn err\n\t\t\t}\n\t\t\tpeer.AllowedIPs = append(peer.AllowedIPs, *ipNet)\n\t\t}\n\t}\n\n\tif !removedAllowedIP {\n\t\treturn ErrAllowedIPNotFound\n\t}\n\tconfig := wgtypes.Config{\n\t\tPeers: []wgtypes.PeerConfig{peer},\n\t}\n\treturn c.device.IpcSet(toWgUserspaceString(config))\n}\n\nfunc (c *WGUSPConfigurer) FullStats() (*Stats, error) {\n\tipcStr, err := c.device.IpcGet()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"IpcGet failed: %w\", err)\n\t}\n\n\treturn parseStatus(c.deviceName, ipcStr)\n}\n\nfunc (c *WGUSPConfigurer) LastActivities() map[string]monotime.Time {\n\treturn c.activityRecorder.GetLastActivities()\n}\n\n// startUAPI starts the UAPI listener for managing the WireGuard interface via external tool\nfunc (t *WGUSPConfigurer) startUAPI() {\n\tvar err error\n\tt.uapiListener, err = openUAPI(t.deviceName)\n\tif err != nil {\n\t\tlog.Errorf(\"failed to open uapi listener: %v\", err)\n\t\treturn\n\t}\n","sourceCodeStart":287,"sourceCodeEnd":323,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/client/iface/configurer/usp.go#L287-L323","documentation":"WGUSPConfigurer.FullStats could not dump the userspace device state with device.IpcGet(). The same underlying conditions as the other IpcGet errors apply: the wireguard-go device is closed or being torn down while statistics are requested. FullStats powers detailed status output, so this degrades diagnostics rather than connectivity.","triggerScenarios":"Status dump requested after device.Close(); FullStats racing a reconnect that rebuilds the device; device left half-initialized after a failed start.","commonSituations":"Status command running while the agent reconnects; UI polling stats during shutdown; embedded client queried after teardown.","solutions":["Check the device lifecycle before requesting stats and report 'unavailable' when closed","Retry once after reconnect completes","Cache the last successful FullStats result for read-only display","Order teardown so stat endpoints stop before the device closes"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"stats, err := uspCfg.FullStats()\nif err != nil {\n\t// diagnostics path: degrade instead of failing the caller\n\tlog.Warnf(\"full stats unavailable (device closed?): %v\", err)\n\tstats = &configurer.Stats{DeviceName: ifaceName}\n}","preventionTips":["Stop FullStats polling before closing the device","Replace the configurer when the device is rebuilt so stats target the live device","Cache the last successful dump for display during reconnect windows","Retry once after reconnect completes"],"tags":["wireguard-go","stats","uapi","lifecycle","diagnostics"],"backgroundTag":null,"analyzedSha":"93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c","analyzedAt":"2026-08-16T03:09:19.136Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}