Repository navigation
Closed
Labels
bugThis issue is a bug.This issue is a bug.p1This is a high priority issueThis is a high priority issuepotential-regressionMarking this issue as a potential regression to be checked by team memberMarking this issue as a potential regression to be checked by team member
Description
Describe the bug
With an S3 client with .crossRegionAccessEnabled(true), the recent update has started showing broken pipes on write requests.
Re-enabling expectContinue does not fix the behavior.
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
Cross region access to continue working out-of-the-box or the functionality to be removed if it is no longer supported.
Current Behavior
Here is a subset of the stack trace:
Caused by: java.net.SocketException: Broken pipe
at java.base/sun.nio.ch.SocketDispatcher.write0(Native Method)
at java.base/sun.nio.ch.SocketDispatcher.write(Unknown Source)
at java.base/sun.nio.ch.NioSocketImpl.tryWrite(Unknown Source)
at java.base/sun.nio.ch.NioSocketImpl.implWrite(Unknown Source)
at java.base/sun.nio.ch.NioSocketImpl.write(Unknown Source)
at java.base/sun.nio.ch.NioSocketImpl$2.write(Unknown Source)
at java.base/java.net.Socket$SocketOutputStream.implWrite(Unknown Source)
at java.base/java.net.Socket$SocketOutputStream.write(Unknown Source)
at java.base/sun.security.ssl.SSLSocketOutputRecord.deliver(Unknown Source)
at java.base/sun.security.ssl.SSLSocketImpl$AppOutputStream.write(Unknown Source)
at org.apache.hc.core5.http.impl.io.DefaultBHttpClientConnection$1.write(DefaultBHttpClientConnection.java:259)
at org.apache.hc.core5.http.impl.io.SessionOutputBufferImpl.flushBuffer(SessionOutputBufferImpl.java:117)
at org.apache.hc.core5.http.impl.io.SessionOutputBufferImpl.write(SessionOutputBufferImpl.java:150)
at org.apache.hc.core5.http.impl.io.ContentLengthOutputStream.write(ContentLengthOutputStream.java:112)
at org.apache.hc.core5.http.io.entity.InputStreamEntity.writeTo(InputStreamEntity.java:156)
at org.apache.hc.core5.http.io.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:100)
at software.amazon.awssdk.http.apache5.internal.RepeatableInputStreamRequestEntity.writeTo(RepeatableInputStreamRequestEntity.java:178)
Reproduction Steps
Attempt writing to S3 with a cross-region client across regions.
Possible Solution
No response
Additional Information/Context
No response
AWS Java SDK version used
2.46
JDK version used
25
Operating System and version
Amazon Linux 2023 (Lambda)
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.p1This is a high priority issueThis is a high priority issuepotential-regressionMarking this issue as a potential regression to be checked by team memberMarking this issue as a potential regression to be checked by team member
Activity
dagnir commentedon Jun 17, 2026
hi @kschwarz1116 can you provide more details on your setup? I'm unable to repro with the following using
2.46.0edit: description said write, missed that! Writing also seems to work with 2.46.0 (locally, and in Lambda with JDK 25):
dagnir commentedon Jun 18, 2026
Okay, looks like a larger request body is needed to trigger this:
Will continue to investigate this. As a workaround, you can switch back to the 4.x client:
kschwarz1116 commentedon Jun 18, 2026
Thanks, yep we're writing large payloads! Currently getting around it by just instantiating separate clients per-region, but going back to 4.x works too.
dagnir commentedon Jun 18, 2026
Looks like this is due to a difference in how Apache 5.x treats 3xx responses to requests with
Expect: 100-continue, i.e. that they're not treated as final status codes. The client continues to send the entity even when a 3xx is received https://github.com/apache/httpcomponents-core/blob/d96a00fec9b2e19f8005e35681df5f6cd6e21a9e/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/HttpRequestExecutor.java#L186-L190There is an open issue on the Apache tracker for this, and I'm requesting for it to be fixed https://issues.apache.org/jira/browse/HTTPCORE-796
dagnir commentedon Jun 22, 2026
Update: this is fixed upstream in apache/httpcomponents-core#675 🎉 . Awaiting a Maven release to bump the SDK dependency.
github-actions commentedon Jun 25, 2026
This issue is now closed. 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.
kschwarz1116 commentedon Jun 25, 2026
Thank you very much for getting this addressed! I'll be on the lookout for 2.46.18!
dagnir commentedon Jun 25, 2026
@kschwarz1116 Next release should be Monday!
Update httpcore5 to 5.4.3 (aws#7078)
Merging master branch to release branch (#7187)