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

[#1472][FOLLOWUP] fix(client): Fix IllegalReferenceCountException issues when exceptions happened in clientReadHandler.readShuffleData() #1536

Merged
merged 1 commit into from
Feb 24, 2024

Conversation

rickyma
Copy link
Contributor

@rickyma rickyma commented Feb 22, 2024

What changes were proposed in this pull request?

Fix IllegalReferenceCountException issues when exceptions happened in clientReadHandler.readShuffleData().

Why are the changes needed?

A follow-up PR for: #1522

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Existing UTs.

…on issues when exceptions happened in clientReadHandler.readShuffleData()
Copy link

Test Results

2 432 files   - 5  2 432 suites   - 5   4h 39m 36s ⏱️ - 2m 44s
  823 tests ±0    821 ✅ ±0   1 💤 ±0  1 ❌ +1 
9 737 runs   - 5  9 722 ✅  - 5  14 💤 ±0  1 ❌ +1 

For more details on these failures, see this check.

Results for commit fc84871. ± Comparison against base commit 59aa30d.

@@ -269,6 +269,10 @@ private int read() {
// because PlatformDependent.freeDirectBuffer can only release the ByteBuffer with cleaner.
if (sdr != null) {
sdr.release();
// We set sdr to null here to prevent IllegalReferenceCountException that could occur
// if sdr.release() is called multiple times in the close() method,
// when an exception is thrown by clientReadHandler.readShuffleData().
Copy link
Contributor

Choose a reason for hiding this comment

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

I can't get why this will trigger the issue. sdr will be reassign in the Line 277.

Copy link
Contributor Author

@rickyma rickyma Feb 23, 2024

Choose a reason for hiding this comment

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

when an exception is thrown by clientReadHandler.readShuffleData().

An exception is thrown from line 277. So sdr will not be reassigned successfully.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK. I know.

@rickyma rickyma requested a review from jerqi February 23, 2024 02:57
@rickyma
Copy link
Contributor Author

rickyma commented Feb 23, 2024

CI is unstable, I don't think the failure is related to this PR.

Copy link
Contributor

@jerqi jerqi left a comment

Choose a reason for hiding this comment

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

LGTM.

@zuston zuston merged commit a549028 into apache:master Feb 24, 2024
38 of 40 checks passed
@rickyma rickyma deleted the issue-1355-followup branch May 5, 2024 08:34
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.

3 participants