Skip to content

Fix double KeyboardInterrupt on PL/Python cancel - #2185

Open
krylosov-aa wants to merge 1 commit into
apache:mainfrom
krylosov-aa:2181
Open

krylosov-aa wants to merge 1 commit into
apache:mainfrom
krylosov-aa:2181

Conversation

@krylosov-aa

Copy link
Copy Markdown
Contributor

Fixes #2181

What does this PR do?

Avoid duplicate cancel signals and ignore stale Python callbacks, preventing a second KeyboardInterrupt from interrupting cleanup or affecting the next PL/Python call.

Type of Change

  • Bug fix (non-breaking change)

Test Plan

Passed cancel_plpython with both planners on Linux ARM64 / Python 3.10.

Verified client cancellation, repeated cancellation, and statement/lock timeouts.

  • Integration tests added/updated

Checklist

Timeouts and client cancel requests could send duplicate signals,
interrupting Python cleanup or a later call. Signal the process group
once with a backend fallback, and ignore stale Python callbacks.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] PL/Python statement_timeout can leave a zombie subprocess despite finally: wait()

1 participant