{"record":{"id":"c0e20b38eab3c6be","repo":"apache/beam","slug":"stage-v-no-parent-for-side-input-v-with-parent-id-v","errorCode":null,"errorMessage":"stage[%v] no parent for side input %v, with parent ID %v","messagePattern":"stage\\[(.+?)\\] no parent for side input (.+?), with parent ID (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"sdks/go/pkg/beam/runners/prism/internal/engine/elementmanager.go","lineNumber":2600,"sourceCode":"\t\t// stages that read one keep waiting.\n\tcase inputW == upstreamW && previousInputW == inputW:\n\t\t// Otherwise, use the progression of watermark to determine the bundle readiness.\n\t\tslog.Debug(\"bundleReady: unchanged upstream watermark\",\n\t\t\tslog.String(\"stage\", ss.ID),\n\t\t\tslog.Group(\"watermark\",\n\t\t\t\tslog.Any(\"upstream == input == previousInput\", inputW)))\n\t\treturn mtime.MinTimestamp, false, ptimeEventsReady, injectedReady\n\t}\n\n\tready := true\n\tfor _, side := range ss.sides {\n\t\tpID, ok := em.pcolParents[side.Global]\n\t\tif !ok {\n\t\t\tpanic(fmt.Sprintf(\"stage[%v] no parent ID for side input %v\", ss.ID, side))\n\t\t}\n\t\tparent, ok := em.stages[pID]\n\t\tif !ok {\n\t\t\tpanic(fmt.Sprintf(\"stage[%v] no parent for side input %v, with parent ID %v\", ss.ID, side, pID))\n\t\t}\n\t\tow := parent.OutputWatermark()\n\t\tif upstreamW > ow {\n\t\t\tready = false\n\t\t}\n\t}\n\treturn upstreamW, ready, ptimeEventsReady, injectedReady\n}\n\n// processingTimeNow gives the current processing time for the runner.\nfunc (em *ElementManager) processingTimeNow() (ret mtime.Time) {\n\tif em.testStreamHandler != nil && !em.testStreamHandler.completed {\n\t\treturn em.testStreamHandler.Now()\n\t}\n\n\t// \"Test\" mode -> advance to next processing time event if any, to allow execution.\n\tif !em.config.EnableRTC {\n\t\tif t, ok := em.processTimeEvents.Peek(); ok {","sourceCodeStart":2582,"sourceCodeEnd":2618,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/runners/prism/internal/engine/elementmanager.go#L2582-L2618","documentation":"After finding the side input's parent stage ID, Prism looks the stage up in em.stages. This panic fires when the parent ID is registered but no stage with that ID exists, meaning the stage table and the pcolParents map are out of sync during side-input readiness evaluation.","triggerScenarios":"em.pcolParents[side.Global] returns a valid pID, but em.stages[pID] is absent — stage lifecycle mismatch (parent stage removed/not yet created) when checking whether a side input is ready relative to upstream watermark.","commonSituations":"Runner-internal race or translation inconsistency; typically seen with cross-language pipelines or unusual graph shapes where parent stages are pruned but side-input references remain.","solutions":["Retry or rerun the pipeline — if intermittent, it may be a lifecycle race fixed in newer Beam versions","Inspect the pipeline graph to see which transform produces the side input and whether it forms a normal stage","Simplify side-input topology (avoid views over PCollections produced by fused/optimized stages)","Upgrade Apache Beam / prism runner to the latest release and retest","Report with a minimal repro if consistent — this is an internal runner invariant failure"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Rerun on intermittent lifecycle failures\nfor attempt := 0; attempt < 3; attempt++ {\n    if err := runPipeline(ctx); err == nil { break }\n    time.Sleep(time.Second * time.Duration(attempt+1))\n}","preventionTips":["Retry the pipeline once before investigating — may be a lifecycle race","Upgrade to the latest Beam where stage lifecycle handling is more robust","Reduce graph complexity around side inputs to narrow reproduction"],"tags":["go","beam","prism","side-input","panic"],"backgroundTag":"resource-not-found","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}