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

NullpointerException in NettyUtils.closedChannelMessage #3435

Closed
steven-sheehy opened this issue Sep 21, 2022 · 2 comments
Closed

NullpointerException in NettyUtils.closedChannelMessage #3435

steven-sheehy opened this issue Sep 21, 2022 · 2 comments
Assignees
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@steven-sheehy
Copy link

steven-sheehy commented Sep 21, 2022

Describe the bug

Received a NPE when attempting to download/get a file from S3 using the SDK. When this occurs my future.get() never completes as though the completion or error signal is not bubbled up to the application.

2022-09-21T11:37:19.889-0600 WARN aws-java-sdk-NettyEventLoop-0-5 i.n.u.c.DefaultPromise An exception was thrown by software.amazon.awssdk.http.nio.netty.internal.NettyRequestExecutor$$Lambda$2847/0x0000000801ae7098.operationComplete() java.lang.NullPointerException: Cannot invoke "io.netty.channel.Channel.attr(io.netty.util.AttributeKey)" because "channel" is null
at software.amazon.awssdk.http.nio.netty.internal.utils.NettyUtils.closedChannelMessage(NettyUtils.java:135)
at software.amazon.awssdk.http.nio.netty.internal.utils.NettyUtils.decorateException(NettyUtils.java:71)
at software.amazon.awssdk.http.nio.netty.internal.NettyRequestExecutor.handleFailure(NettyRequestExecutor.java:310)
at software.amazon.awssdk.http.nio.netty.internal.NettyRequestExecutor.makeRequestListener(NettyRequestExecutor.java:189)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:578)
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:552)
at io.netty.util.concurrent.DefaultPromise.access$200(DefaultPromise.java:35)
at io.netty.util.concurrent.DefaultPromise$1.run(DefaultPromise.java:502)
at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at java.base/java.lang.Thread.run(Unknown Source)

Expected Behavior

No exception

Current Behavior

NPE

Reproduction Steps

I'm not sure the exact scenario for which it occurs as it occurs sporadically.

        var request = GetObjectRequest.builder()
                .bucket(properties.getBucketName())
                .key(s3Key)
                .requestPayer(RequestPayer.REQUESTER)
                .build();
        var future = s3AsyncClient.getObject(request, AsyncResponseTransformer.toBytes());
        var response = future.get();

Possible Solution

No response

Additional Information/Context

No response

AWS Java SDK version used

2.17.261

JDK version used

eclipse-temurin:17.0.3_7-jre

Operating System and version

Linux AMD64 Docker

@zoewangg
Copy link
Contributor

The fix has been merged in #3574
Could you try with the latest version?

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

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.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

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

3 participants