Skip to content

Fix S3 UFS executor service thread leak#15748

Merged
alluxio-bot merged 1 commit intoAlluxio:master-2.xfrom
tcrain:s3ufs-thread-leak
Jun 16, 2023
Merged

Fix S3 UFS executor service thread leak#15748
alluxio-bot merged 1 commit intoAlluxio:master-2.xfrom
tcrain:s3ufs-thread-leak

Conversation

@tcrain
Copy link
Copy Markdown
Contributor

@tcrain tcrain commented Jun 17, 2022

What changes are proposed in this pull request?

Calls shutdown on the executor service in the S3 UFS class.

Why are the changes needed?

If shutdown is not called the threads will not be garbage collected.

Does this PR introduce any user facing changes?

No


@Override
public void close() {
mExecutor.shutdown();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

just want to make sure this mExecutor is not passed in or shared right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It is used by the multipart upload. This is a safe shutdown so it will wait for any live tasks that have not finished, but any upload objects that have been created but not yet started will fail.

Actually it looks like the UFS class isn't actually be closed in all places where it is created either, so there might be other things to fix as well.

@jiacheliu3
Copy link
Copy Markdown
Contributor

Is this one still being worked on?

@github-actions
Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in two weeks if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale The PR/Issue does not have recent activities and will be closed automatically label Jan 31, 2023
@github-actions github-actions bot removed the stale The PR/Issue does not have recent activities and will be closed automatically label May 16, 2023
@github-actions
Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in two weeks if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale The PR/Issue does not have recent activities and will be closed automatically label Jun 16, 2023
@jiacheliu3
Copy link
Copy Markdown
Contributor

@Jackson-Wang-7 @lucyge2022 mind taking this over? Thanks!

@lucyge2022
Copy link
Copy Markdown
Contributor

LGTM. I'm assuming this is one of the resource leak in ufs @tcrain mentioned in the comment. @jja725

It is used by the multipart upload. This is a safe shutdown so it will wait for any live tasks that have not finished, but any upload objects that have been created but not yet started will fail.

Actually it looks like the UFS class isn't actually be closed in all places where it is created either, so there might be other things to fix as well.

@jja725 jja725 self-requested a review June 16, 2023 21:48
Copy link
Copy Markdown
Contributor

@jja725 jja725 left a comment

Choose a reason for hiding this comment

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

LGTM

@jja725
Copy link
Copy Markdown
Contributor

jja725 commented Jun 16, 2023

alluxio-bot, merge this please

@alluxio-bot
Copy link
Copy Markdown
Contributor

merge failed:
Merge refused because pull request does not have label start with type-

@jja725 jja725 added type-feature This issue is a feature request type-bug This issue is about a bug and removed type-feature This issue is a feature request stale The PR/Issue does not have recent activities and will be closed automatically labels Jun 16, 2023
@jja725
Copy link
Copy Markdown
Contributor

jja725 commented Jun 16, 2023

alluxio-bot, merge this please

@alluxio-bot alluxio-bot merged commit 545ecd4 into Alluxio:master-2.x Jun 16, 2023
@jja725
Copy link
Copy Markdown
Contributor

jja725 commented Jun 16, 2023

alluxio-bot, cherry-pick this to main please

@alluxio-bot
Copy link
Copy Markdown
Contributor

Auto cherry-pick unsuccessful Failed to setup local git for auto cherry-pick

jiacheliu3 pushed a commit to jiacheliu3/alluxio that referenced this pull request Jun 30, 2023
### What changes are proposed in this pull request? Calls shutdown on the executor service in the S3 UFS class. ### Why are the changes needed? If shutdown is not called the threads will not be garbage collected. ### Does this PR introduce any user facing changes? No	pr-link: Alluxio#15748	change-id: cid-86d16e80118882044bf529a619b7915c8451eb03
jiacheliu3 pushed a commit to jiacheliu3/alluxio that referenced this pull request Jul 11, 2023
### What changes are proposed in this pull request? Calls shutdown on the executor service in the S3 UFS class. ### Why are the changes needed? If shutdown is not called the threads will not be garbage collected. ### Does this PR introduce any user facing changes? No	pr-link: Alluxio#15748	change-id: cid-86d16e80118882044bf529a619b7915c8451eb03
maobaolong pushed a commit to maobaolong/alluxio that referenced this pull request Jan 3, 2024
### What changes are proposed in this pull request? Calls shutdown on the executor service in the S3 UFS class. ### Why are the changes needed? If shutdown is not called the threads will not be garbage collected. ### Does this PR introduce any user facing changes? No	pr-link: Alluxio#15748	change-id: cid-86d16e80118882044bf529a619b7915c8451eb03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug This issue is about a bug

7 participants