Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix interruption crash #584

Merged
merged 2 commits into from
Feb 13, 2025
Merged

Fix interruption crash #584

merged 2 commits into from
Feb 13, 2025

Conversation

Y--
Copy link
Collaborator

@Y-- Y-- commented Feb 12, 2025

When the "Query cancelled" exception is thrown (following a SIGINT signal), various destructors are called, among which PostgresTableReader's which cleanup the PG state. If an exception is thrown during the stack unwinding and call to PG function, it results in an undefined behavior which materialize as a process crash.

So to avoid that, we eagerly consume the pending tasks before throwing the exception.

@Y-- Y-- requested a review from JelteF February 12, 2025 14:22
@Y-- Y-- enabled auto-merge (squash) February 12, 2025 16:18
@Y-- Y-- merged commit 81db625 into main Feb 13, 2025
5 checks passed
@Y-- Y-- deleted the yl/fix-interruption-crash branch February 13, 2025 12:09
JelteF added a commit that referenced this pull request Feb 13, 2025
)

This fixes some really confusing segfaults that were still occurring
even after #584. Reverting #584 (while keeping this change)
re-introduces other segfaults. So both fixes are necessary.
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.

2 participants