Skip to content

A null pointer occurs when putObject #3671

Closed
@T-TRz879

Description

@T-TRz879

Describe the bug

I found this problem when I tested with putObject{size:2.5MB}

Expected Behavior

putObject success

Current Behavior

WARN [2023-01-05 02:59:16.396][aws-java-sdk-NettyEventLoop-2-5][io.netty.util.concurrent.DefaultPromise][580]:An exception was thrown by software.amazon.awssdk.http.nio.netty.internal.NettyRequestExecutor$$Lambda$8978/0x00000008016e6040.operationComplete() java.lang.NullPointerException: null at software.amazon.awssdk.http.nio.netty.internal.utils.NettyUtils.isConnectionResetException(NettyUtils.java:78) at software.amazon.awssdk.http.nio.netty.internal.utils.NettyUtils.decorateException(NettyUtils.java:70) at software.amazon.awssdk.http.nio.netty.internal.NettyRequestExecutor.handleFailure(NettyRequestExecutor.java:309) at software.amazon.awssdk.http.nio.netty.internal.NettyRequestExecutor.lambda$writeRequest$13(NettyRequestExecutor.java:264) at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:577) at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:551) at io.netty.util.concurrent.DefaultPromise.access$200(DefaultPromise.java:35) at io.netty.util.concurrent.DefaultPromise$1.run(DefaultPromise.java:501) at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164) at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at java.base/java.lang.Thread.run(Thread.java:834)

Reproduction Steps

AsyncRequestBody asyncRequestBody = AsyncRequestBody.fromInputStream(inputStream,
        contentLength, executorService);
    PutObjectRequest putObjectRequest = PutObjectRequest.builder()
        .key(key)
        .bucket(bucket)
        .contentLength(contentLength)
        .contentType("application/octet-stream")
        .build();
    CompletableFuture<PutObjectResponse> putObjectResponseCompletableFuture = s3AsyncClient.putObject(putObjectRequest, asyncRequestBody);
    putObjectResponseCompletableFuture.thenAcceptAsync(putObjectResponse -> {
      future.complete(objectMetadataInfo);
});

Possible Solution

No response

Additional Information/Context

No response

AWS Java SDK version used

2.18.41

JDK version used

openjdk version "11.0.2" 2019-01-15

Operating System and version

CentOS Linux release 7.7.1908 (Core);Linux version 3.10.0-1062.el7.x86_64

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.closed-for-stalenessresponse-requestedWaiting on additional info and feedback. Will move to "closing-soon" in 10 days.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions