{"record":{"id":"7156f6b56bbb7cfd","repo":"slackhq/nebula","slug":"error-createrequestqueue-w","errorCode":null,"errorMessage":"error CreateRequestQueue: %w","messagePattern":"error CreateRequestQueue: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"udp/udp_rio_windows.go","lineNumber":132,"sourceCode":"\tif err != nil {\n\t\t// This is a best-effort to prevent errors from being returned by the udp recv operation.\n\t\t// Quietly log a failure and continue.\n\t\tl.Debug(\"failed to set UDP_NETRESET ioctl\", \"error\", err)\n\t}\n\n\terr = u.rx.Open()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error rx.Open(): %w\", err)\n\t}\n\n\terr = u.tx.Open()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error tx.Open(): %w\", err)\n\t}\n\n\tu.rq, err = winrio.CreateRequestQueue(u.sock, packetsPerRing, 1, packetsPerRing, 1, u.rx.cq, u.tx.cq, 0)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error CreateRequestQueue: %w\", err)\n\t}\n\n\terr = windows.Bind(u.sock, sa)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error windows.Bind(): %w\", err)\n\t}\n\n\treturn nil\n}\n\nfunc (u *RIOConn) ListenOut(r EncReader, flush func()) error {\n\tbuffer := make([]byte, MTU)\n\n\tvar lastRecvErr time.Time\n\n\tfor {\n\t\t// Just read one packet at a time\n\t\tn, rua, err := u.receive(buffer)","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/slackhq/nebula/blob/dd8f660c0ac37903ec4080ca4d3c861ba9342ceb/udp/udp_rio_windows.go#L114-L150","documentation":"This error wraps winrio.CreateRequestQueue failing while setting up the RIO request queue that pairs the rx and tx completion queues with the socket. The request queue is the core RIO object; without it the socket cannot perform registered I/O, so bind() aborts. The underlying winsock error is attached via %w.","triggerScenarios":"NewRIOListener -> bind() after rx/tx opened successfully: winrio.CreateRequestQueue(sock, packetsPerRing, 1, packetsPerRing, 1, rx.cq, tx.cq, 0) returns an error, usually WSAEINVAL (bad queue sizes / overflow counts) or WSAENOBUFS.","commonSituations":"Ring sizes too large or not within RIO limits, system-wide RIO resource exhaustion, running inside containers or restricted environments where RIO queue creation is blocked.","solutions":["Check the wrapped winsock error; WSAEINVAL usually means invalid queue/overflow size parameters.","Reduce packetsPerRing and ensure overflow counts (1) are valid for the chosen sizes.","Free system RIO resources (other sockets) and retry.","Confirm the platform supports RIO request queues of the requested size (Windows 8/Server 2012+)."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// sanity-check RIO queue parameters before binding\nif packetsPerRing == 0 || packetsPerRing > maxRIOQueueSize {\n\treturn fmt.Errorf(\"invalid packetsPerRing: %d\", packetsPerRing)\n}","typeGuard":"func isCreateRequestQueueErr(err error) bool { return err != nil && strings.Contains(err.Error(), \"CreateRequestQueue\") }","tryCatchPattern":"conn, err := udp.NewListener(logger, settings)\nif err != nil && strings.Contains(err.Error(), \"CreateRequestQueue\") {\n\t// WSAEINVAL: halve packetsPerRing and retry; WSAENOBUFS: free resources and retry\n}","preventionTips":["Use ring sizes within documented RIO limits and keep overflow counts small.","Cap concurrent RIO sockets per process.","Retry with progressively smaller queue sizes on WSAENOBUFS/EINVAL.","Test on the exact Windows target version/container image before deploy."],"tags":["windows","udp","rio","network"],"backgroundTag":"udp-bind-failed","analyzedSha":"dd8f660c0ac37903ec4080ca4d3c861ba9342ceb","analyzedAt":"2026-09-03T11:13:55.444Z","contentChangedAt":"2026-09-03T11:13:55.444Z","schemaVersion":2},"datasetVersion":"2026-09-10T17:17:09.494Z"}