Skip to content

[Failing Test]: _run_reset_state_concurrent_teardown is flaky #39456

Description

@tvalentyn

What happened?

From: https://github.com/apache/beam/actions/runs/29945023422/job/89008359565?pr=39440

2026-07-22T18:40:20.1397630Z =================================== FAILURES ===================================
2026-07-22T18:40:20.1398995Z _______________ AsyncTest_1.test_reset_state_concurrent_teardown _______________
2026-07-22T18:40:20.1400731Z [gw0] linux -- Python 3.14.6 /runner/_work/beam/beam/sdks/python/test-suites/tox/py314/build/srcs/sdks/python/target/.tox-py314-cloud/py314-cloud/bin/python
2026-07-22T18:40:20.1402070Z 
2026-07-22T18:40:20.1402870Z self = <apache_beam.transforms.async_dofn_test.AsyncTest_1 testMethod=test_reset_state_concurrent_teardown>
2026-07-22T18:40:20.1404060Z 
2026-07-22T18:40:20.1404507Z     def test_reset_state_concurrent_teardown(self):
2026-07-22T18:40:20.1406149Z       # Verify concurrent teardown safety in a separate process to prevent any potential
2026-07-22T18:40:20.1409464Z       # regressions from freezing the main pytest process at exit.
2026-07-22T18:40:20.1411929Z       p = multiprocessing.Process(
2026-07-22T18:40:20.1412903Z           target=AsyncTest._run_reset_state_concurrent_teardown,
2026-07-22T18:40:20.1414016Z           args=(self.use_asyncio, ))
2026-07-22T18:40:20.1415953Z       p.start()
2026-07-22T18:40:20.1416615Z       p.join(timeout=10.0)
2026-07-22T18:40:20.1417532Z     
2026-07-22T18:40:20.1418018Z       if p.is_alive():
2026-07-22T18:40:20.1418587Z         p.terminate()
2026-07-22T18:40:20.1419124Z         p.join()
2026-07-22T18:40:20.1419624Z >       self.fail(
2026-07-22T18:40:20.1420417Z             "reset_state() deadlocked/hung waiting for active threads/tasks to finish"
2026-07-22T18:40:20.1421485Z         )
2026-07-22T18:40:20.1422411Z E       AssertionError: reset_state() deadlocked/hung waiting for active threads/tasks to finish
2026-07-22T18:40:20.1423178Z 
2026-07-22T18:40:20.1423602Z apache_beam/transforms/async_dofn_test.py:519: AssertionError

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

  • Component: Python SDK
  • Component: Java SDK
  • Component: Go SDK
  • Component: Typescript SDK
  • Component: IO connector
  • Component: Beam YAML
  • Component: Beam examples
  • Component: Beam playground
  • Component: Beam katas
  • Component: Website
  • Component: Infrastructure
  • Component: Spark Runner
  • Component: Flink Runner
  • Component: Prism Runner
  • Component: Twister2 Runner
  • Component: Hazelcast Jet Runner
  • Component: Google Cloud Dataflow Runner

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions