Skip to content

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

Open
@accelariosoftware

Description

@accelariosoftware

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

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.crt-clientp2This is a standard priority issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions