{"record":{"id":"aceebaf5360abd0b","repo":"apache/beam","slug":"nothing-in-progress-and-no-refreshes-with-non-zero-pending","errorCode":null,"errorMessage":"nothing in progress and no refreshes with non zero pending elements: %v\n%v","messagePattern":"nothing in progress and no refreshes with non zero pending elements: (.+?)\n(.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"sdks/go/pkg/beam/runners/prism/internal/engine/elementmanager.go","lineNumber":634,"sourceCode":"\t\t\t// It's impossible to fully control processing time SDK side handling for processing time\n\t\t\t// Runner side, so we specialize refresh handling here to avoid spuriously getting stuck.\n\t\t\tem.changedStages.insert(em.testStreamHandler.ID)\n\t\t\treturn nil\n\t\t}\n\t\t// If there are no changed stages due to a test stream event\n\t\t// then there's no mechanism to make progress, so it's time to fast fail.\n\t}\n\n\tv := em.livePending.Load()\n\tif v == 0 {\n\t\t// Since there are no further pending elements, the job will be terminating successfully.\n\t\treturn nil\n\t}\n\t// The job is officially stuck. Fail fast and produce debugging information.\n\t// Jobs must never get stuck so this indicates a bug in prism to be investigated.\n\n\tslog.Debug(\"Bundles: nothing in progress and no refreshes\", slog.Int64(\"pendingElementCount\", v))\n\treturn errors.Errorf(\"nothing in progress and no refreshes with non zero pending elements: %v\\n%v\", v, em.DumpStages())\n}\n\n// InputForBundle returns pre-allocated data for the given bundle, encoding the elements using\n// the PCollection's coders.\nfunc (em *ElementManager) InputForBundle(rb RunBundle, info PColInfo) [][]byte {\n\tss := em.stages[rb.StageID]\n\tss.mu.Lock()\n\tdefer ss.mu.Unlock()\n\tes := ss.inprogress[rb.BundleID]\n\treturn es.ToData(info)\n}\n\n// DataAndTimerInputForBundle returns pre-allocated data for the given bundle and the estimated number of data elements.\n// Elements are encoded with the PCollection's coders.\nfunc (em *ElementManager) DataAndTimerInputForBundle(rb RunBundle, info PColInfo) ([]*Block, int) {\n\tss := em.stages[rb.StageID]\n\tss.mu.Lock()\n\tdefer ss.mu.Unlock()","sourceCodeStart":616,"sourceCodeEnd":652,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/runners/prism/internal/engine/elementmanager.go#L616-L652","documentation":"Prism's element manager detects quiescence of a running pipeline. If there are no bundles in progress, no refreshes, yet elements remain pending, the runner is in an impossible state — the job would hang forever. Prism fails fast with this error and dumps all stages to help debug, because this indicates a bug in prism's scheduling.","triggerScenarios":"checkForQuiescence runs (invoked from an anonymous caller in the engine loop) and finds pending element count > 0 while no bundles are executing and no refreshes are scheduled.","commonSituations":"Hitting a prism runner bug while executing a pipeline; often related to specific transform/data patterns that starve a stage of schedulable bundles. Always a runner-internal bug, not user config.","solutions":["File a bug with the Beam project including the DumpStages output embedded in the error message.","Work around by running the same pipeline with the direct or Flink runner to unblock the job.","Check whether a recent Beam version fixed the issue and upgrade sdk/runner.","Reduce the pipeline to a minimal reproducer to attach to the bug report."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := beam.Run(ctx, prismRunner, p); err != nil && strings.Contains(err.Error(), \"nothing in progress and no refreshes\") {\n    // rerun with a different runner and file a Beam bug with the DumpStages output\n}","preventionTips":["Keep the Beam SDK and prism runner versions matched and current.","Capture the DumpStages output from the error message for bug reports.","Validate suspicious pipelines with the direct runner first.","Minimize transforms that combine exotic windowing/triggering until the bug is fixed."],"tags":["go","beam","prism","runner-bug"],"backgroundTag":"internal-invariant-violation","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"}