#4715·floci

[BUG] S3: CompleteMultipartUpload fails for objects of 2 GiB or larger

Author: motoki317Created Sep 30, 2026Updated Sep 30, 2026
Labelsbugs3

Service

S3

AWS API Action

CompleteMultipartUpload

Expected behavior

The upload succeeds, as on AWS. We need to store an 11 GB file with FLOCI_STORAGE_MODE=persistent.

Actual behavior

Floci returns InternalError:

upload failed: ./big.bin to s3://demo/big.bin An error occurred (InternalError) when calling the CompleteMultipartUpload operation (reached max retries: 2): We encountered an internal error. Please try again.

The Floci log shows:

java.lang.ArithmeticException: integer overflow
	at [email protected]/java.lang.Math.toIntExact(Math.java:1375)
	at io.github.hectorvent.floci.services.s3.S3Service.concatenateParts(S3Service.java:3432)
	at io.github.hectorvent.floci.services.s3.S3Service.completeMultipartUpload(S3Service.java:3369)

The default memory storage mode fails the same way.

Reproduction

bash
docker run -d -p 4566:4566 -e FLOCI_STORAGE_MODE=persistent floci/floci:nightly
export AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test AWS_DEFAULT_REGION=us-east-1
truncate -s 2G big.bin
aws --endpoint-url http://localhost:4566 s3 mb s3://demo
aws --endpoint-url http://localhost:4566 s3 cp big.bin s3://demo/big.bin

Environment

  • Floci version / image tag: floci/floci:nightly (nightly-09282026, commit 0232d5d)

Related

  • The merged PR #4227 says: "The ~2 GiB ceiling on a single assembled object is unchanged".
  • The open PR #4691 streams GetObject from disk. It does not change CompleteMultipartUpload.
  • The Floci S3 docs (docs/services/s3.md) do not list this limit.