Skip to content
This repository was archived by the owner on Nov 21, 2026. It is now read-only.
This repository was archived by the owner on Nov 21, 2026. It is now read-only.

A server.start() that fails part-way leaves the Python process unable to exit #97

Closed

Description

@tae898

When a server plugin cannot bind its port (for example the Postgres plugin with its port taken), ArcadeDBServer.start() raises ArcadeDBError, and the Python process then never exits. The engine has already started non-daemon threads (IdempotencyCache-cleanup, Timer-2, Timer-3) and leaves their cleanup to the caller: only the Java stop() ends them. Our stop() returns at once because _started is still False after the failed start, and __del__ skips it for the same reason.

Seen in CI on 2026-10-02 (Test Python Bindings, darwin/arm64, Python 3.12): the wire-protocol fixture's Postgres port was taken, the test errored at setup, and the job ran 28 minutes past its 497 passing tests until the step timed out. Reproduced on Linux: a script that starts a server with its Postgres port taken prints the error and is still running 120 s later, with or without calling server.stop(). In Java, the same failed start followed by stop() exits normally (on main, 417314c, and 26.9.1), so the fix belongs in the wrapper.

The fixture flake has its own cause: it chose its four ports one socket at a time, closing each before the next, so the OS could hand the same port out twice.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions