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

[SPARK-26713][CORE][2.4] Interrupt pipe IO threads in PipedRDD when task is finished #25825

Closed
wants to merge 1 commit into from

Conversation

advancedxy
Copy link
Contributor

@advancedxy advancedxy commented Sep 18, 2019

What changes were proposed in this pull request?

Manually release stdin writer and stderr reader thread when task is finished. This is the backport of #23638 including #25049.

Why are the changes needed?

This is a bug fix. PipedRDD's IO threads may hang even the corresponding task is already finished. Without this fix, it would leak resource(memory specially).

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Add new test

…s finished

Manually release stdin writer and stderr reader thread when task is finished.

Added new test
@advancedxy
Copy link
Contributor Author

advancedxy commented Sep 18, 2019

ping @cloud-fan and @dongjoon-hyun.

This is my first try to back-porting, if there's any specific to backpoort, please correct me or guide me.

@cloud-fan cloud-fan changed the title [SPARK-26713][CORE] Interrupt pipe IO threads in PipedRDD when task is finished [SPARK-26713][CORE][2.4] Interrupt pipe IO threads in PipedRDD when task is finished Sep 18, 2019
@cloud-fan
Copy link
Contributor

ok to test

@cloud-fan
Copy link
Contributor

Let's also mention the original PR in the description.

@SparkQA
Copy link

SparkQA commented Sep 18, 2019

Test build #110896 has finished for PR 25825 at commit 6ee8d0d.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@advancedxy
Copy link
Contributor Author

Let's also mention the original PR in the description.

Edited the description. And the tests passed, let's merge this then @cloud-fan ?

Copy link
Member

@srowen srowen left a comment

Choose a reason for hiding this comment

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

Seems like a clean backport of both to me. OK pending tests.

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM. Thank you, @advancedxy and @cloud-fan and @srowen .
Merged to branch-2.4.

dongjoon-hyun pushed a commit that referenced this pull request Sep 18, 2019
…ask is finished

### What changes were proposed in this pull request?
Manually release stdin writer and stderr reader thread when task is finished. This is the backport of #23638 including #25049.

### Why are the changes needed?
This is a bug fix. PipedRDD's IO threads may hang even the corresponding task is already finished. Without this fix,  it would leak resource(memory specially).

### Does this PR introduce any user-facing change?
No.

### How was this patch tested?
Add new test

Closes #25825 from advancedxy/SPARK-26713_for_2.4.

Authored-by: Xianjin YE <advancedxy@gmail.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
rshkv pushed a commit to palantir/spark that referenced this pull request Mar 12, 2021
…ask is finished

### What changes were proposed in this pull request?
Manually release stdin writer and stderr reader thread when task is finished. This is the backport of apache#23638 including apache#25049.

### Why are the changes needed?
This is a bug fix. PipedRDD's IO threads may hang even the corresponding task is already finished. Without this fix,  it would leak resource(memory specially).

### Does this PR introduce any user-facing change?
No.

### How was this patch tested?
Add new test

Closes apache#25825 from advancedxy/SPARK-26713_for_2.4.

Authored-by: Xianjin YE <advancedxy@gmail.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
rshkv pushed a commit to palantir/spark that referenced this pull request Mar 15, 2021
…ask is finished

### What changes were proposed in this pull request?
Manually release stdin writer and stderr reader thread when task is finished. This is the backport of apache#23638 including apache#25049.

### Why are the changes needed?
This is a bug fix. PipedRDD's IO threads may hang even the corresponding task is already finished. Without this fix,  it would leak resource(memory specially).

### Does this PR introduce any user-facing change?
No.

### How was this patch tested?
Add new test

Closes apache#25825 from advancedxy/SPARK-26713_for_2.4.

Authored-by: Xianjin YE <advancedxy@gmail.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants