[AURON #2022] [BUG] Native engine panic on closed channel causes JVM crash.#2023
Open
slfan1989 wants to merge 1 commit intoapache:masterfrom
Open
[AURON #2022] [BUG] Native engine panic on closed channel causes JVM crash.#2023slfan1989 wants to merge 1 commit intoapache:masterfrom
slfan1989 wants to merge 1 commit intoapache:masterfrom
Conversation
…s JVM crash. Signed-off-by: slfan1989 <slfan1989@apache.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #2022
Rationale for this change
When running TPC-DS queries (q60-q69) with Spark 4.0 / JDK 21, the native engine panics when
WrappedSender::sendattempts to send data into a closed channel. This panic escalates into a JVM crash with exit code 134.The root cause is a race condition where the producer task continues sending data while the receiver has already been closed/canceled due to task completion or cancellation. The current implementation panics on send failure instead of handling it gracefully.
Link: https://github.com/apache/auron/actions/runs/22128240337/job/63964149831?pr=2018
What changes are included in this PR?
Modified
WrappedSender::sendinexecution_context.rsto gracefully handle channel closure:send().await.is_err()instead of panickingAre there any user-facing changes?
No user-facing changes.
This is an internal fix that prevents JVM crashes when tasks are canceled or completed early.
How was this patch tested?
Exist Junit Test.