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

Unclosed pipe/a_inode file descriptors when using AWS SDK V2 #5304

Closed
dyutishb opened this issue Jun 17, 2024 · 2 comments
Closed

Unclosed pipe/a_inode file descriptors when using AWS SDK V2 #5304

dyutishb opened this issue Jun 17, 2024 · 2 comments
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@dyutishb
Copy link

Describe the bug

We are using the aws v2 sdk on of our processes which ran out of file descriptors which led us to investigate the open ones. We can see new FDs being added and not closed even if we do simple headBucket calls to s3.
Example of open FDs added:

java    6320 root  182u  a_inode               0,14         0      1057 [eventpoll:183]
java    6320 root  183r     FIFO               0,13       0t0    275505 pipe
java    6320 root  184w     FIFO               0,13       0t0    275505 pipe
java    6320 root  185u  a_inode               0,14         0      1057 [eventpoll:186]
java    6320 root  186r     FIFO               0,13       0t0    275506 pipe
java    6320 root  187w     FIFO               0,13       0t0    275506 pipe
java    6320 root  188u  a_inode               0,14         0      1057 [eventpoll:189]
java    6320 root  189r     FIFO               0,13       0t0    275507 pipe
java    6320 root  190w     FIFO               0,13       0t0    275507 pipe

Here's how we are building our client:

S3ClientBuilder s3ClientBuilder = S3Client.builder()
                    .credentialsProvider(credentialsProvider)
                    .httpClientBuilder(ApacheHttpClient.builder()
                                                       .connectionTimeout(Duration.ofMillis(CLOUD_ADAPTER_CONNECTION_SETUP_TIMEOUT_MILLIS))
                                                       .socketTimeout(Duration.ofMillis(CLOUD_ADAPTER_SOCKET_TIMEOUT_MILLIS)))
                    .forcePathStyle(pathStyleAccess)
                    .crossRegionAccessEnabled(true);

The same is not seen with the v1 SDK.

Expected Behavior

The file descriptors created by any operation should be closed when the operation completes.

Current Behavior

New FDs being added and not closed on every request.

Reproduction Steps

Create any process (imagine an api server which makes request to s3) which instantiates a s3 client and makes some basic requests like headBucket, keep the process up even after the reuqest is completed. Compare the open file descriptors before and after the request using sudo lsof -p <pid> or sudo ls -l /proc/<pid>/fd. There should be no new open FDs added due to a request.

Possible Solution

No response

Additional Information/Context

No response

AWS Java SDK version used

2.25.26

JDK version used

openjdk version "1.8.0_402"

Operating System and version

Rocky Linux release 9.4 (Blue Onyx)

@dyutishb dyutishb added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jun 17, 2024
@dyutishb dyutishb changed the title Unclosed pipe/anon_inode file descriptors when using AWS SDK V2 Unclosed pipe/a_inode file descriptors when using AWS SDK V2 Jun 17, 2024
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.

@dyutishb dyutishb closed this as not planned Won't fix, can't repro, duplicate, stale Jun 17, 2024
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