Skip to content

A failure of closing the interpreter is lost when the waiting close() is interrupted #69

Open

Description

@morisil

When the thread waiting in Python.close() is interrupted, close() throws InterruptedException while the interpreter is still closed later on the Python thread.
If closing the interpreter then fails (e.g. a JepException from interpreter.close()), the failure stays in a future nobody reads, and a second close() returns at once — the failure is never reported.

Reproduction: make the close task block, interrupt the thread waiting in close(), then let interpreter.close() throw.

Possible fix: log the failure of a close task nobody waits for, or keep it and report it from the next close().

Pre-existing on main; documented (not fixed) by the fix for #29, found during its review.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions