What happened?
https://github.com/apache/beam/actions/runs/18208074497/job/51842943177
WARNING: DATA RACE
Write at 0x00c00081c928 by goroutine 161:
github.com/apache/beam/sdks/v2/go/pkg/beam/runners/prism/internal/engine.(*mtimeHeap).Push()
..beam-dev-go-prism/sdks/go/pkg/beam/runners/prism/internal/engine/holds.go:38 +0xcc
container/heap.Push()
/Users/shunping/sdk/go1.24.4/src/container/heap/heap.go:52 +0x48
github.com/apache/beam/sdks/v2/go/pkg/beam/runners/prism/internal/engine.(*stageRefreshQueue).Schedule()
..beam-dev-go-prism/sdks/go/pkg/beam/runners/prism/internal/engine/processingtime.go:71 +0x190
github.com/apache/beam/sdks/v2/go/pkg/beam/runners/prism/internal/engine.(*stageState).injectTriggeredBundlesIfReady()
..beam-dev-go-prism/sdks/go/pkg/beam/runners/prism/internal/engine/elementmanager.go:1369 +0x960
github.com/apache/beam/sdks/v2/go/pkg/beam/runners/prism/internal/engine.(*aggregateStageKind).addPending()
..beam-dev-go-prism/sdks/go/pkg/beam/runners/prism/internal/engine/elementmanager.go:1425 +0x500
github.com/apache/beam/sdks/v2/go/pkg/beam/runners/prism/internal/engine.(*stageState).AddPending()
..beam-dev-go-prism/sdks/go/pkg/beam/runners/prism/internal/engine/elementmanager.go:1307 +0xc0
github.com/apache/beam/sdks/v2/go/pkg/beam/runners/prism/internal/engine.(*ElementManager).PersistBundle()
..beam-dev-go-prism/sdks/go/pkg/beam/runners/prism/internal/engine/elementmanager.go:877 +0xa04
github.com/apache/beam/sdks/v2/go/pkg/beam/runners/prism/internal.(*stage).Execute()
..beam-dev-go-prism/sdks/go/pkg/beam/runners/prism/internal/stage.go:350 +0x2924
github.com/apache/beam/sdks/v2/go/pkg/beam/runners/prism/internal.executePipeline.func4()
..beam-dev-go-prism/sdks/go/pkg/beam/runners/prism/internal/execute.go:389 +0x114
golang.org/x/sync/errgroup.(*Group).Go.func1()
../go/pkg/mod/golang.org/x/sync@v0.17.0/errgroup/errgroup.go:93 +0x7c
Previous read at 0x00c00081c928 by goroutine 88:
github.com/apache/beam/sdks/v2/go/pkg/beam/runners/prism/internal/engine.(*stageRefreshQueue).AdvanceTo()
..beam-dev-go-prism/sdks/go/pkg/beam/runners/prism/internal/engine/processingtime.go:88 +0x68
github.com/apache/beam/sdks/v2/go/pkg/beam/runners/prism/internal/engine.(*ElementManager).Bundles.func2()
..beam-dev-go-prism/sdks/go/pkg/beam/runners/prism/internal/engine/elementmanager.go:396 +0x15c
Notice that stageRefreshQueue is not goroutine safe.
|
// stageRefreshQueue is not goroutine safe and relies on external synchronization. |
The race condition is due to the fact that em.processingTimeEvents can be accessed in the watermark evaluation goroutine and the goroutine that executes a stage (where the PersistBundle and addPending are called).
Issue Failure
Failure: Test is flaky
Issue Priority
Priority: 1 (unhealthy code / failing or flaky postcommit so we cannot be sure the product is healthy)
Issue Components
What happened?
https://github.com/apache/beam/actions/runs/18208074497/job/51842943177
Notice that stageRefreshQueue is not goroutine safe.
beam/sdks/go/pkg/beam/runners/prism/internal/engine/processingtime.go
Line 46 in 3534960
The race condition is due to the fact that
em.processingTimeEventscan be accessed in the watermark evaluation goroutine and the goroutine that executes a stage (where thePersistBundleandaddPendingare called).Issue Failure
Failure: Test is flaky
Issue Priority
Priority: 1 (unhealthy code / failing or flaky postcommit so we cannot be sure the product is healthy)
Issue Components