Skip to content

Conversation

lgbo-ustc
Copy link
Contributor

What changes are proposed in this pull request?

Reject all JNI calls after native destroy is invoked, to prevent access to invalid resources.

How was this patch tested?

test manually

Copy link

#10797

Copy link

Run Gluten Clickhouse CI on x86

Copy link

Run Gluten Clickhouse CI on x86

Copy link
Contributor

@zzcclp zzcclp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhztheplayer zhztheplayer changed the title [GLUTEN-10797][CH] Reject all JNI calls after native destroy is invoked. [GLUTEN-10797][CH] Reject all JNI calls after native destroy is invoked Oct 1, 2025
Copy link

github-actions bot commented Oct 9, 2025

Run Gluten Clickhouse CI on x86

for (auto it = active_executors_.begin(); it != active_executors_.end(); ++it)
{
auto * executor = *it;
executor->cancel();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we check the result status? maybe fail or something else.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the result type of cancel is void

auto * executor = *it;
executor->cancel();
std::cerr << "Not closed LocalExecutor:\n" << executor->dumpPipeline() << std::endl;
delete executor;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useless, since active_executors_.clear(); will call dtor.

Copy link
Contributor Author

@lgbo-ustc lgbo-ustc Oct 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are raw pointers, not shared_ptr

Copy link

github-actions bot commented Oct 9, 2025

Run Gluten Clickhouse CI on x86

Copy link

github-actions bot commented Oct 9, 2025

Run Gluten Clickhouse CI on x86

@lgbo-ustc lgbo-ustc requested a review from zhanglistar October 9, 2025 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants