{"record":{"id":"72c2a6d1234db261","repo":"stablyai/orca","slug":"timed-out-polling-renderer-diagnostics-after-pol","errorCode":null,"errorMessage":"Timed out polling renderer diagnostics after ${pollTimeoutMs}ms.","messagePattern":"Timed out polling renderer diagnostics after (.+?)ms\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"config/scripts/linux-wayland-renderer-diagnostics.mjs","lineNumber":17,"sourceCode":"const pollTimeoutMs = 2_500\n\nfunction delay(ms) {\n  return new Promise((resolve) => setTimeout(resolve, ms))\n}\n\nasync function pollRendererDiagnostics(read) {\n  const readPromise = Promise.resolve().then(read)\n  readPromise.catch(() => undefined)\n  // Why: the Wayland GPU stall can freeze renderer protocol calls, so\n  // diagnostics need a short deadline too.\n  const result = await Promise.race([\n    readPromise.then((value) => ({ timedOut: false, value })),\n    delay(pollTimeoutMs).then(() => ({ timedOut: true, value: null }))\n  ])\n  if (result.timedOut) {\n    throw new Error(`Timed out polling renderer diagnostics after ${pollTimeoutMs}ms.`)\n  }\n  return result.value\n}\n\nexport async function collectRendererDiagnostics(page) {\n  if (!page) {\n    return null\n  }\n  try {\n    return await pollRendererDiagnostics(() =>\n      page.evaluate(async () => {\n        const timed = (label, promise) =>\n          Promise.race([\n            Promise.resolve(promise).then(\n              (value) => ({ value }),\n              (error) => ({\n                error: error instanceof Error ? error.message : String(error)\n              })","sourceCodeStart":1,"sourceCodeEnd":35,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/config/scripts/linux-wayland-renderer-diagnostics.mjs#L1-L35","documentation":"pollRendererDiagnostics races a page.evaluate that collects renderer diagnostics against a 2500ms deadline. It throws when the read does not settle in time, which is the expected signature of the Wayland GPU stall freezing renderer protocol calls. Note collectRendererDiagnostics wraps this call in try/catch and returns { error: message } rather than propagating, so the throw surfaces as a diagnostic field, not a crash.","triggerScenarios":"page.evaluate hangs past 2500ms because the renderer/GPU process is wedged; the diagnostics collection itself blocked.","commonSituations":"Wayland GPU process stall in CI; renderer frozen on a heavy synchronous operation; the diagnostics page.evaluate hit its own internal 1s sub-timeouts and still overshot.","solutions":["Treat this as a symptom of the GPU wedge — collectRendererDiagnostics already degrades gracefully and returns the error field.","Investigate the GPU/renderer stall root cause (this error is the detector, not the bug).","If diagnostics legitimately need more time, raise pollTimeoutMs, but prefer fixing the stall."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  return await pollRendererDiagnostics(read)\n} catch (error) {\n  return { error: error instanceof Error ? error.message : String(error) }\n}","preventionTips":["Treat the diagnostics timeout as a GPU-stall signal, not a diagnostics bug — collectRendererDiagnostics already degrades to an error field.","Investigate the underlying Wayland GPU wedge rather than suppressing this error."],"tags":["wayland","gpu","timeout","diagnostics"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}