Skip to content

Flaky: test_client_can_shutdown_server fails on Python 3.13 with FlightUnavailableError (Broken pipe) #4650

@Yicong-Huang

Description

@Yicong-Huang

What happened?

Post-merge CI run on main after PR #4416 merged failed on the Python 3.13 matrix entry only:

https://github.com/apache/texera/actions/runs/25245208942/job/74028209132

Single failing test:

core/proxy/test_proxy_client.py::TestProxyClient::test_client_can_shutdown_server FAILED
================== 1 failed, 235 passed, 6 warnings in 41.11s ==================

Stack trace excerpt:

pyarrow._flight.FlightUnavailableError: Flight returned unavailable error, with message: Broken pipe

The test is a one-liner:

def test_client_can_shutdown_server(self, server, client):
    assert client.call_action("shutdown") == b"Bye bye!"

The shutdown handler appears to tear the gRPC connection down before the response is delivered to the client, so pyarrow.flight returns UNAVAILABLE with Broken pipe. PR #4416's diff is unrelated to the proxy/flight code, which strongly suggests this is a 3.13-specific timing flake in core.proxy.proxy_server.ProxyServer.do_action("shutdown", ...) — likely a change in how Python 3.13 schedules shutdown vs. the response write. Other Python versions (3.10–3.12) in the same matrix passed cleanly.

How to reproduce?

  1. Check out current main (or any commit; the change in fix(backend): add missing backend handler for dataset rename #4416 doesn't touch this code path).
  2. From amber/src/main/python run pytest -sv core/proxy/test_proxy_client.py::TestProxyClient::test_client_can_shutdown_server under Python 3.13.
  3. Repeat — failure rate appears < 100% (sibling tests like test_client_can_call_registered_lambdas which also call shutdown passed in the same run).

Version

1.1.0-incubating (Pre-release/Master)

Commit Hash (Optional)

c2af3b8

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions