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

Thraed Leak In aws sdk v2 for auto refresh token using StsAssumeRoleCredentialsProvider #5796

Closed
1 task
Swaprative opened this issue Jan 15, 2025 · 1 comment
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@Swaprative
Copy link

Describe the bug

My iam role session duration is 12hrs and I am doing a AWS resource discovery for my 12 accounts after every 15 minutes. It causes around 4500 sdk-ScheduleExecutor thread is in waiting state after 1 day of running the application.

dump-read.txt

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

Thread count should not increase after each iteration

Current Behavior

Thread count is increasing after each iteration

Reproduction Steps

StsAssumeRoleCredentialsProvider.Builder stsCredProvider = StsAssumeRoleCredentialsProvider.builder();

  Builder roleRequest = AssumeRoleRequest
      .builder();
  roleRequest.roleArn("role")    //My iam role arn
      .roleSessionName("My session")
      .durationSeconds("time"); //43200 Seconds

  stsCredProvider.stsClient(StsClient.region("ap-south-1").build())  //Providing my region
      .refreshRequest(roleRequest.build());
  return stsCredProvider.build();

Generating aws clients using StsAssumeRoleCredentialsProvider and storing it for reuse

Possible Solution

No response

Additional Information/Context

No response

AWS Java SDK version used

2.27.14

JDK version used

21

Operating System and version

Ubuntu 22.04

@Swaprative Swaprative added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 15, 2025
Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant