apache/beam · error
%v
Error message
%v
What it means
This is a recover() wrapper that converts a panic from bundle descriptor building into a normal error. If the recovered value is already an error it is used as-is; any other panic value is wrapped via fmt.Errorf("%v", r).
Source
Thrown at sdks/go/pkg/beam/runners/prism/internal/stage.go:419
// buildDescriptor constructs a ProcessBundleDescriptor for bundles of this stage.
//
// Requirements:
// * The set of inputs to the stage only include one parallel input.
// * The side input pcollections are fully qualified with global pcollection ID, ingesting transform, and local inputID.
// * The outputs are fully qualified with global PCollectionID, producing transform, and local outputID.
//
// It assumes that the side inputs are not sourced from PCollections generated by any transform in this stage.
//
// Because we need the local ids for routing the sources/sinks information.
func buildDescriptor(stg *stage, comps *pipepb.Components, wk *worker.W, em *engine.ElementManager) (err error) {
// Catch construction time panics and produce them as errors out.
defer func() {
if r := recover(); r != nil {
switch rt := r.(type) {
case error:
err = rt
default:
err = fmt.Errorf("%v", r)
}
}
}()
// Assume stage has an indicated primary input
coders := map[string]*pipepb.Coder{}
transforms := map[string]*pipepb.PTransform{}
pcollections := map[string]*pipepb.PCollection{}
clonePColToBundle := func(pid string) *pipepb.PCollection {
col := proto.Clone(comps.GetPcollections()[pid]).(*pipepb.PCollection)
pcollections[pid] = col
return col
}
// Update coders for Stateful transforms.
for _, tid := range stg.transforms {
t := comps.GetTransforms()[tid]View on GitHub (pinned to 12126d8942)
Solutions
- Read the converted error's message to identify the panicking value
- Check the stage's coder definitions in the pipeline proto for nils or missing references
- Retry with a simpler pipeline to isolate the coder causing the panic
- File a Beam issue with logs if it's a prism bug
Defensive patterns
Strategy: try-catch
Try / catch
if err := buildDescriptor(...); err != nil {
slog.Error("descriptor build recovered panic", "err", err)
return err
} Prevention
- Audit coder references for nils/missing definitions in pipeline protos
- Test with cross-language coders before production
- Keep runner updated for coder handling fixes
When it happens
Trigger: Any panic during descriptor construction — typically coder lookups or map indexing on missing/nil coders while assembling the bundle's process-bundle descriptor.
Common situations: Runner bugs handling unusual coder combinations (e.g. cross-language or windowed coders) that trigger nil map access or index panics.
Related errors
- Nested FullValues must be nested as pointers.
- KV coder with more than 2 components: %s
- WindowedValue coder with more than 2 components: %s
- ShardedKey coder must have only 1 component: %s
- Runner forgot to LP this Row Coder. %v
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/7e67cd78f88a6cdb.
Report an issue: GitHub.