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

JVM crashes on Windows when using CRT client (AwsCrtAsyncHttpClient) for S3AsyncClient #5713

Open
1 task
accelariosoftware opened this issue Nov 15, 2024 · 0 comments
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@accelariosoftware
Copy link

Describe the bug

I am downloading files from S3 to local server using the AWS java SDK.
When using standard NettyNioAsyncHttpClient- everything works.
When using AwsCrtAsyncHttpClient- the JVM crashes

    SdkAsyncHttpClient httpClient = NettyNioAsyncHttpClient.builder()
      .maxConcurrency(parallel)
      .build();

    SdkAsyncHttpClient  crtHttpClient = AwsCrtAsyncHttpClient.builder()
      .maxConcurrency(parallel)
      .build();

    S3AsyncClient s3AsyncClient =
      S3AsyncClient.builder()
        .multipartEnabled(true)
        .credentialsProvider(() -> AwsBasicCredentials.create(awsAccessKey, awsSecretKey))
        .region(Region.of(region))
        .multipartConfiguration(MultipartConfiguration.builder()
          .minimumPartSizeInBytes(10 * MB)
          .apiCallBufferSizeInBytes(32 * MB)
          .build())
        .httpClient(crtHttpClient)    --- when using crtHttpClient then JVM craches, when using httpClient everything works
        .build();

    S3TransferManager transferManager =
      S3TransferManager.builder()
        .s3Client(s3AsyncClient)
        .build();

    DownloadFileRequest downloadFileRequest=  DownloadFileRequest.builder()
        .destination(Paths.get(destinationPath))
          .getObjectRequest(getObjectRequest -> getObjectRequest
            .bucket(bucket)
            .key(file))
        .build();

    transferManager.downloadFile(downloadFileRequest).completionFuture().join();


The error that is shown :

Fatal error condition occurred in C:\Program Files (x86)\Jenkins\workspace\aws-crt-java-build-dll-win64\aws-crt-java\crt\aws-c-io\source\windows\secure_channel_tls_handler.c:1105: !append_failed
Exiting Application
at 0x7FFA0DEA41BA: Java_software_amazon_awssdk_crt_auth_credentials_StsCredentialsProvider_stsCredentialsProviderNew
at 0x7FFA0DEA41BA: Java_software_amazon_awssdk_crt_auth_credentials_StsCredentialsProvider_stsCredentialsProviderNew
at 0x7FFA0DEA41BA: Java_software_amazon_awssdk_crt_auth_credentials_StsCredentialsProvider_stsCredentialsProviderNew
at 0x7FFA0DEA41BA: Java_software_amazon_awssdk_crt_auth_credentials_StsCredentialsProvider_stsCredentialsProviderNew
at 0x7FFA0DEA41BA: Java_software_amazon_awssdk_crt_auth_credentials_StsCredentialsProvider_stsCredentialsProviderNew
at 0x7FFA0DEA41BA: Java_software_amazon_awssdk_crt_auth_credentials_StsCredentialsProvider_stsCredentialsProviderNew
at 0x7FFA0DEA41BA: Java_software_amazon_awssdk_crt_auth_credentials_StsCredentialsProvider_stsCredentialsProviderNew
at 0x7FFA0DEA41BA: Java_software_amazon_awssdk_crt_auth_credentials_StsCredentialsProvider_stsCredentialsProviderNew
at 0x7FFA0DEA41BA: Java_software_amazon_awssdk_crt_auth_credentials_StsCredentialsProvider_stsCredentialsProviderNew
at 0x7FFA39F984C0: BaseThreadInitThunk
at 0x7FFA3A851770: RtlUserThreadStart

The trace for CRT is attached
crt_trace.log

Regression Issue

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

Expected Behavior

CRT client works and JVM does not crash

Current Behavior

JVM crashes

Reproduction Steps

Run the code specified above

Possible Solution

No response

Additional Information/Context

No response

AWS Java SDK version used

0.33.0

JDK version used

java version "1.8.0_421" Java(TM) SE Runtime Environment (build 1.8.0_421-b09) Java HotSpot(TM) 64-Bit Server VM (build 25.421-b09, mixed mode)

Operating System and version

Windows Server 2016

@accelariosoftware accelariosoftware added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 15, 2024
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