This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
race condition in S3MetaRequestResponseHandlerNativeAdapter throws NullPointerException #3919
Labels
guidance
Question that needs advice or information.
Describe the bug
We are experiencing occasional
NullPointerException
thrown when using the S3TransferManager. While we cannot consistently reproduce this bug, the stacktrace is consistent:Expected Behavior
software does not throw nullPointerExceptions, download continues as intended.
Current Behavior
we are using kotlin, and only sporadically reproducing the issue with this
downloadFileFromS3
function. However for context, this is getting an object that definitely exists, and has just been uploaded to s3 about 0-60 seconds ago.Reproduction Steps
use the S3TransferManager to request objects, and occasionally the requests will fail with the reported stacktrace.
Possible Solution
smells like a race condition
Additional Information/Context
We believe this is a race condition, in part because it's not consistently reproducible, but also the nature of how we are using the TransferManager:
We are uploading bulk files to s3 and then multiple (2-7) clients are quickly downloading those files within the span of a minute. We encounter the stacktrace in the clients downloading these bulk files.
AWS Java SDK version used
2.20.46
JDK version used
openjdk 17 2021-09-14 OpenJDK Runtime Environment (build 17+35-2724) OpenJDK 64-Bit Server VM (build 17+35-2724, mixed mode, sharing)
Operating System and version
arm64 macos Ventura 13.3.1 / x86 ubuntu Amazon Linux 5.4
The text was updated successfully, but these errors were encountered: