Describe the bug
After upgrading AWS CPP SDK to 1.11.178, file upload using transfer manager failing with error 'InvalidChunkSizeError Message: Only the last chunk is allowed to have a size less than 8192 bytes'.
We tried uploading files with various size but getting same error.
Expected Behavior
File upload using transfer manager should work.
Current Behavior
Failed to upload file of any size using aws transfer manager cpp APIs after upgrading aws cpp sdk 1.11.178 version.
Reproduction Steps
Take file of any size and try to upload it using aws cpp transfer manager APIs with AWS CPP SDK version 1.11.178.
Possible Solution
No response
Additional Information/Context
1116 15:38:25.830 [8956] (StorageArchive) <9232> EV:H {AwsSdk::TransferManager} [Trace] Seeking input stream to determine content-length to upload file to bucket: janitacnonworm with key: 22C863DFB567C94D9D818E5FE00F7685/2023/10-17/a/54f/a54f205d-becf-4d34-91ef-d4688f2812e9
1117 15:38:25.830 [8956] (StorageArchive) <9232> EV:H {AwsSdk::TransferManager} [Trace] Setting content-length to 60126 bytes. To upload file to bucket: janitacnonworm with key: 22C863DFB567C94D9D818E5FE00F7685/2023/10-17/a/54f/a54f205d-becf-4d34-91ef-d4688f2812e9
1118 15:38:25.830 [8956] (StorageArchive) <9232> EV:H {AwsSdk::TransferManager} [Debug] Transfer handle [07F66FE0-4F4F-40F2-B2AB-CE67DECB8B49] Scheduling a single-part upload.
1119 15:38:25.830 [8956] (StorageArchive) <7520> EV:H {AwsSdk::TransferManager} [Info] Transfer handle ID [07F66FE0-4F4F-40F2-B2AB-CE67DECB8B49] Updated handle status from [NOT_STARTED] to [IN_PROGRESS].
1120 15:38:25.830 [8956] (StorageArchive) <5316> EV:H {AwsSdk::Aws::Endpoint::DefaultEndpointProvider} [Trace] Endpoint str eval parameter: Region = ap-south-1
1121 15:38:25.830 [8956] (StorageArchive) <5316> EV:H {AwsSdk::Aws::Endpoint::DefaultEndpointProvider} [Trace] Endpoint bool eval parameter: UseFIPS = 0
1122 15:38:25.830 [8956] (StorageArchive) <5316> EV:H {AwsSdk::Aws::Endpoint::DefaultEndpointProvider} [Trace] Endpoint bool eval parameter: UseDualStack = 0
1123 15:38:25.830 [8956] (StorageArchive) <5316> EV:H {AwsSdk::Aws::Endpoint::DefaultEndpointProvider} [Trace] Endpoint bool eval parameter: UseArnRegion = 0
1124 15:38:25.830 [8956] (StorageArchive) <5316> EV:H {AwsSdk::Aws::Endpoint::DefaultEndpointProvider} [Trace] Endpoint bool eval parameter: DisableMultiRegionAccessPoints = 0
1125 15:38:25.830 [8956] (StorageArchive) <5316> EV:H {AwsSdk::Aws::Endpoint::DefaultEndpointProvider} [Trace] Endpoint str eval parameter: Bucket = janitacnonworm
1126 15:38:25.830 [8956] (StorageArchive) <5316> EV:H {AwsSdk::Aws::Endpoint::DefaultEndpointProvider} [Debug] Endpoint rules engine evaluated the endpoint: https://janitacnonworm.s3.ap-south-1.amazonaws.com
1127 15:38:25.830 [8956] (StorageArchive) <5316> EV:H {AwsSdk::Aws::Endpoint::DefaultEndpointProvider} [Trace] Endpoint rules evaluated props: {"authSchemes":[{"disableDoubleEncoding":true,"name":"sigv4","signingName":"s3","signingRegion":"ap-south-1"}]}
1145 15:38:25.845 [8956] (StorageArchive) <5316> EV:H {AwsSdk::AWSAuthV4Signer} [Debug] Note: Http payloads are not being signed. signPayloads=0 http scheme=https
1146 15:38:25.845 [8956] (StorageArchive) <5316> EV:H {AwsSdk::AWSAuthV4Signer} [Debug] Canonical Header String: amz-sdk-invocation-id:B56073AC-DD2A-44FA-8D33-42953E37C476|amz-sdk-request:attempt=1|content-encoding:aws-chunked|content-type:application/octet-stream|host:janitacnonworm.s3.ap-south-1.amazonaws.com|transfer-encoding:chunked|x-amz-content-sha256:STREAMING-UNSIGNED-PAYLOAD-TRAILER|x-amz-date:20231017T100825Z|x-amz-decoded-content-length:60126|x-amz-meta-evmetadata:<EnterpriseVaultFile Version="1" FileIdentifier="610DC4D48ED73E1ABB1F5D05C8050CC1~28~66377FE9~00~1" FileType="DVSSP" ArchivedDateUTC="45216.4215277778" PartitionEntryId="122C863DFB567C94D9D818E5FE00F76851q10000EV-EVProduct-Server1"/>|x-amz-sdk-checksum-algorithm:CRC32|x-amz-storage-class:STANDARD|x-amz-trailer:x-amz-checksum-crc32|
1147 15:38:25.845 [8956] (StorageArchive) <5316> EV:H {AwsSdk::AWSAuthV4Signer} [Debug] Signed Headers value:amz-sdk-invocation-id;amz-sdk-request;content-encoding;content-type;host;transfer-encoding;x-amz-content-sha256;x-amz-date;x-amz-decoded-content-length;x-amz-meta-evmetadata;x-amz-sdk-checksum-algorithm;x-amz-storage-class;x-amz-trailer
1148 15:38:25.845 [8956] (StorageArchive) <5316> EV:H {AwsSdk::AWSAuthV4Signer} [Debug] Canonical Request String: PUT|/22C863DFB567C94D9D818E5FE00F7685/2023/10-17/a/54f/a54f205d-becf-4d34-91ef-d4688f2812e9|amz-sdk-invocation-id:B56073AC-DD2A-44FA-8D33-42953E37C476|amz-sdk-request:attempt=1|content-encoding:aws-chunked|content-type:application/octet-stream|host:janitacnonworm.s3.ap-south-1.amazonaws.com|transfer-encoding:chunked|x-amz-content-sha256:STREAMING-UNSIGNED-PAYLOAD-TRAILER|x-amz-date:20231017T100825Z|x-amz-decoded-content-length:60126|x-amz-meta-evmetadata:<EnterpriseVaultFile Version="1" FileIdentifier="610DC4D48ED73E1ABB1F5D05C8050CC1~28~66377FE9~00~1" FileType="DVSSP" ArchivedDateUTC="45216.4215277778" PartitionEntryId="122C863DFB567C94D9D818E5FE00F76851q10000EV-EVProduct-Server1"/>|x-amz-sdk-checksum-algorithm:CRC32|x-amz-storage-class:STANDARD|x-amz-trailer:x-amz-checksum-crc32|amz-sdk-invocation-id;amz-sdk-request;content-encoding;content-type;host;transfer-encoding;x-amz-content-sha256;x-amz-date;x-amz-decoded-content-length;x-amz-meta-evmetadata;x-amz-sdk-checksum-algorithm;x-amz-storage-class;x-amz-trailer|STREAMING-UNSIGNED-PAYLOAD-TRAILER
1149 15:38:25.845 [8956] (StorageArchive) <5316> EV:H {AwsSdk::AWSAuthV4Signer} [Debug] Final String to sign: AWS4-HMAC-SHA256|20231017T100825Z|20231017/ap-south-1/s3/aws4_request|e7da88fddc3d3a32ff1b63e461b621cb45fd1dee8a37032f09be65c21904bccf
1150 15:38:25.845 [8956] (StorageArchive) <5316> EV:H {AwsSdk::AWSAuthV4Signer} [Debug] Final computed signing hash: e3bf44ceca50a065352725f9682438f916a79f43d14a2d3349de9c0b3c9c41e2
1151 15:38:25.845 [8956] (StorageArchive) <5316> EV:H {AwsSdk::AWSAuthV4Signer} [Debug] Signing request with: AWS4-HMAC-SHA256 Credential=AKIA4TI2VRXXASSLYIYD/20231017/ap-south-1/s3/aws4_request, SignedHeaders=amz-sdk-invocation-id;amz-sdk-request;content-encoding;content-type;host;transfer-encoding;x-amz-content-sha256;x-amz-date;x-amz-decoded-content-length;x-amz-meta-evmetadata;x-amz-sdk-checksum-algorithm;x-amz-storage-class;x-amz-trailer, Signature=e3bf44ceca50a065352725f9682438f916a79f43d14a2d3349de9c0b3c9c41e2
1152 15:38:25.845 [8956] (StorageArchive) <5316> EV:H {AwsSdk::AWSClient} [Debug] Request Successfully signed
1153 15:38:25.845 [8956] (StorageArchive) <5316> EV:H {AwsSdk::WinHttpSyncHttpClient} [Trace] Making PUT request to uri https://janitacnonworm.s3.ap-south-1.amazonaws.com/22C863DFB567C94D9D818E5FE00F7685/2023/10-17/a/54f/a54f205d-becf-4d34-91ef-d4688f2812e9
1154 15:38:25.845 [8956] (StorageArchive) <5316> EV:H {AwsSdk::WinHttpConnectionPoolMgr} [Info] Attempting to acquire connection for janitacnonworm.s3.ap-south-1.amazonaws.com:443
1155 15:38:25.845 [8956] (StorageArchive) <5316> EV:H {AwsSdk::WinHttpConnectionPoolMgr} [Debug] Pool doesn't exist for endpoint, creating...
1156 15:38:25.845 [8956] (StorageArchive) <5316> EV:H {AwsSdk::WinHttpConnectionPoolMgr} [Debug] Pool has no available existing connections for endpoint, attempting to grow pool.
1157 15:38:25.845 [8956] (StorageArchive) <5316> EV:H {AwsSdk::WinConnectionContainer} [Info] Pool grown by 2
1158 15:38:25.845 [8956] (StorageArchive) <5316> EV:H {AwsSdk::WinHttpConnectionPoolMgr} [Info] Connection now available, continuing.
1159 15:38:25.845 [8956] (StorageArchive) <5316> EV:H {AwsSdk::WinHttpConnectionPoolMgr} [Debug] Returning connection handle 05071580
1160 15:38:25.845 [8956] (StorageArchive) <5316> EV:H {AwsSdk::WinHttpSyncHttpClient} [Debug] Acquired connection 05071580
1161 15:38:25.845 [8956] (StorageArchive) <5316> EV:H {AwsSdk::WinHttpSyncHttpClient} [Warn] Failed setting TCP keep-alive interval with error code: 12018
1162 15:38:25.845 [8956] (StorageArchive) <5316> EV:H {AwsSdk::WinHttpHttp2} [Debug] HTTP/2 enabled on WinHttp handle: 06404E40.
1163 15:38:25.845 [8956] (StorageArchive) <5316> EV:H {AwsSdk::WinHttpSyncHttpClient} [Debug] AllocateWindowsHttpRequest returned handle 06404E40
1164 15:38:25.845 [8956] (StorageArchive) <5316> EV:H {AwsSdk::WinHttpSyncHttpClient} [Debug] with headers:
1165 15:38:25.845 [8956] (StorageArchive) <5316> EV:H {AwsSdk::WinHttpSyncHttpClient} [Debug] amz-sdk-invocation-id: B56073AC-DD2A-44FA-8D33-42953E37C476|amz-sdk-request: attempt=1|authorization: AWS4-HMAC-SHA256 Credential=AKIA4TI2VRXXASSLYIYD/20231017/ap-south-1/s3/aws4_request, SignedHeaders=amz-sdk-invocation-id;amz-sdk-request;content-encoding;content-type;host;transfer-encoding;x-amz-content-sha256;x-amz-date;x-amz-decoded-content-length;x-amz-meta-evmetadata;x-amz-sdk-checksum-algorithm;x-amz-storage-class;x-amz-trailer, Signature=e3bf44ceca50a065352725f9682438f916a79f43d14a2d3349de9c0b3c9c41e2|content-encoding: aws-chunked|content-type: application/octet-stream|host: janitacnonworm.s3.ap-south-1.amazonaws.com|transfer-encoding: chunked|user-agent: APN/1.0 Veritas/1.0 EnterpriseVault/15.0 api/S3 ft/s3-transfer|x-amz-content-sha256: STREAMING-UNSIGNED-PAYLOAD-TRAILER|x-amz-date: 20231017T100825Z|x-amz-decoded-content-length: 60126|x-amz-meta-evmetadata: <EnterpriseVaultFile Version="1" FileIdentifier="610DC4D48ED73E1ABB1F5D05C8050CC1~28~66377FE9~00~1" FileType="DVSSP" ArchivedDateUTC="45216.4215277778" PartitionEntryId="122C863DFB567C94D9D818E5FE00F76851q10000EV-EVProduct-Server1"/>|x-amz-sdk-checksum-algorithm: CRC32|x-amz-storage-class: STANDARD|x-amz-trailer: x-amz-checksum-crc32|
1166 15:38:25.892 [8956] (StorageArchive) <5316> EV:H {AwsSdk::TransferManager} [Trace] Transfer handle ID [07F66FE0-4F4F-40F2-B2AB-CE67DECB8B49] 8200 bytes transferred for part [1].
1167 15:38:25.892 [8956] (StorageArchive) <5316> EV:H {AwsSdk::TransferManager} [Trace] Transfer handle ID [07F66FE0-4F4F-40F2-B2AB-CE67DECB8B49] 16400 bytes transferred for part [1].
1168 15:38:25.908 [8956] (StorageArchive) <5316> EV:H {AwsSdk::TransferManager} [Trace] Transfer handle ID [07F66FE0-4F4F-40F2-B2AB-CE67DECB8B49] 24600 bytes transferred for part [1].
1169 15:38:25.908 [8956] (StorageArchive) <5316> EV:H {AwsSdk::TransferManager} [Trace] Transfer handle ID [07F66FE0-4F4F-40F2-B2AB-CE67DECB8B49] 32800 bytes transferred for part [1].
1170 15:38:25.908 [8956] (StorageArchive) <5316> EV:H {AwsSdk::TransferManager} [Trace] Transfer handle ID [07F66FE0-4F4F-40F2-B2AB-CE67DECB8B49] 41000 bytes transferred for part [1].
1171 15:38:25.908 [8956] (StorageArchive) <5316> EV:H {AwsSdk::TransferManager} [Trace] Transfer handle ID [07F66FE0-4F4F-40F2-B2AB-CE67DECB8B49] 49200 bytes transferred for part [1].
1172 15:38:25.908 [8956] (StorageArchive) <5316> EV:H {AwsSdk::TransferManager} [Trace] Transfer handle ID [07F66FE0-4F4F-40F2-B2AB-CE67DECB8B49] 57400 bytes transferred for part [1].
1173 15:38:25.908 [8956] (StorageArchive) <5316> EV:H {AwsSdk::TransferManager} [Trace] Transfer handle ID [07F66FE0-4F4F-40F2-B2AB-CE67DECB8B49] 60252 bytes transferred for part [1].
1174 15:38:25.923 [8956] (StorageArchive) <5316> EV:H {AwsSdk::WinHttpSyncHttpClient} [Debug] Received response code 403
1175 15:38:25.923 [8956] (StorageArchive) <5316> EV:H {AwsSdk::WinHttpSyncHttpClient} [Debug] Received content type application/xml
1176 15:38:25.923 [8956] (StorageArchive) <5316> EV:H {AwsSdk::WinHttpSyncHttpClient} [Debug] Received headers:
1177 15:38:25.923 [8956] (StorageArchive) <5316> EV:H {AwsSdk::WinHttpSyncHttpClient} [Debug] HTTP/1.1 403 Forbidden|Connection: close|Date: Tue, 17 Oct 2023 10:08:26 GMT|Transfer-Encoding: chunked|Content-Type: application/xml|Server: AmazonS3|x-amz-request-id: CQY4E20AM11S74NR|x-amz-id-2: p/ji6GAfS1LdXZlvAvMIVSo1Icng7f28q93dO+1x7oK3XkaqflJGWMos+OABQAny+ZDu3qpXfek=|
1178 15:38:25.923 [8956] (StorageArchive) <5316> EV:H {AwsSdk::WinHttpSyncHttpClient} [Debug] Closing http request handle 06404E40
1179 15:38:25.923 [8956] (StorageArchive) <5316> EV:H {AwsSdk::WinHttpSyncHttpClient} [Debug] Releasing connection handle 05071580
1180 15:38:25.923 [8956] (StorageArchive) <5316> EV:H {AwsSdk::WinHttpConnectionPoolMgr} [Debug] Releasing connection to endpoint janitacnonworm.s3.ap-south-1.amazonaws.com:443
1181 15:38:25.923 [8956] (StorageArchive) <5316> EV:H {AwsSdk::AWSClient} [Debug] Request returned error. Attempting to generate appropriate error codes from response
1182 15:38:25.923 [8956] (StorageArchive) <5316> EV:H {AwsSdk::AWSErrorMarshaller} [Trace] Error response is <?xml version="1.0"?>|<?xml version="1.0" encoding="UTF-8"?>|<Error>| <Code>InvalidChunkSizeError</Code>| <Message>Only the last chunk is allowed to have a size less than 8192 bytes</Message>| <Chunk>2</Chunk>| <BadChunkSize>8184</BadChunkSize>| <RequestId>CQY4E20AM11S74NR</RequestId>| <HostId>p/ji6GAfS1LdXZlvAvMIVSo1Icng7f28q93dO+1x7oK3XkaqflJGWMos+OABQAny+ZDu3qpXfek=</HostId>|</Error>|
1183 15:38:25.923 [8956] (StorageArchive) <5316> EV:H {AwsSdk::AWSErrorMarshaller} [Warn] Encountered Unknown AWSError 'InvalidChunkSizeError': Only the last chunk is allowed to have a size less than 8192 bytes
1184 15:38:25.923 [8956] (StorageArchive) <5316> EV:H {AwsSdk::AWSXmlClient} [Error] HTTP response code: 403|Resolved remote host IP address: |Request ID: CQY4E20AM11S74NR|Exception name: InvalidChunkSizeError|Error message: Unable to parse ExceptionName: InvalidChunkSizeError Message: Only the last chunk is allowed to have a size less than 8192 bytes|7 response headers:|connection : close|content-type : application/xml|date : Tue, 17 Oct 2023 10:08:26 GMT|server : AmazonS3|transfer-encoding : chunked|x-amz-id-2 : p/ji6GAfS1LdXZlvAvMIVSo1Icng7f28q93dO+1x7oK3XkaqflJGWMos+OABQAny+ZDu3qpXfek=|x-amz-request-id : CQY4E20AM11S74NR
1185 15:38:25.923 [8956] (StorageArchive) <5316> EV:H {AwsSdk::AWSClient} [Warn] If the signature check failed. This could be because of a time skew. Attempting to adjust the signer.
1186 15:38:25.923 [8956] (StorageArchive) <5316> EV:H {AwsSdk::AWSClient} [Debug] Server time is Tue, 17 Oct 2023 10:08:26 GMT, while client time is Tue, 17 Oct 2023 10:08:25 GMT
1187 15:38:25.923 [8956] (StorageArchive) <5316> EV:H {AwsSdk::TransferManager} [Error] Transfer handle [07F66FE0-4F4F-40F2-B2AB-CE67DECB8B49] Failed to upload object to Bucket: [janitacnonworm] with Key: [22C863DFB567C94D9D818E5FE00F7685/2023/10-17/a/54f/a54f205d-becf-4d34-91ef-d4688f2812e9] HTTP response code: 403|Resolved remote host IP address: |Request ID: CQY4E20AM11S74NR|Exception name: InvalidChunkSizeError|Error message: Unable to parse ExceptionName: InvalidChunkSizeError Message: Only the last chunk is allowed to have a size less than 8192 bytes|7 response headers:|connection : close|content-type : application/xml|date : Tue, 17 Oct 2023 10:08:26 GMT|server : AmazonS3|transfer-encoding : chunked|x-amz-id-2 : p/ji6GAfS1LdXZlvAvMIVSo1Icng7f28q93dO+1x7oK3XkaqflJGWMos+OABQAny+ZDu3qpXfek=|x-amz-request-id : CQY4E20AM11S74NR
1188 15:38:25.923 [8956] (StorageArchive) <5316> EV:H {AwsSdk::TransferManager} [Debug] Transfer handle ID [07F66FE0-4F4F-40F2-B2AB-CE67DECB8B49] Setting part [1] to [FAILED].
1189 15:38:25.923 [8956] (StorageArchive) <5316> EV:H {AwsSdk::TransferManager} [Info] Transfer handle ID [07F66FE0-4F4F-40F2-B2AB-CE67DECB8B49] Updated handle status from [IN_PROGRESS] to [FAILED].
1190 15:38:25.923 [8956] (StorageArchive) <9232> EV:H {AwsSdk::TransferManager} [Info] Transfer handle [07F66FE0-4F4F-40F2-B2AB-CE67DECB8B49] Attempting to abort multipart upload.
1191 15:38:25.923 [8956] (StorageArchive) <9232> EV:H {AwsSdk::TransferManager} [Trace] Transfer handle ID [07F66FE0-4F4F-40F2-B2AB-CE67DECB8B49] Cancelling transfer.
1192 15:38:25.923 [8956] (StorageArchive) <9232> EV:H {CS3Storage::WriteObjectToStorage:#693} Error while uploading object. Exception [HTTP response code: 403|Resolved remote host IP address: |Request ID: CQY4E20AM11S74NR|Exception name: InvalidChunkSizeError|Error message: Unable to parse ExceptionName: InvalidChunkSizeError Message: Only the last chunk is allowed to have a size less than 8192 bytes|7 response headers:|connection : close|content-type : application/xml|date : Tue, 17 Oct 2023 10:08:26 GMT|server : AmazonS3|transfer-encoding : chunked|x-amz-id-2 : p/ji6GAfS1LdXZlvAvMIVSo1Icng7f28q93dO+1x7oK3XkaqflJGWMos+OABQAny+ZDu3qpXfek=|x-amz-request-id : CQY4E20AM11S74NR]
1193 15:38:25.923 [8956] (StorageArchive) <7064> EV:H {AwsSdk::TransferManager} [Trace] Transfer handle [07F66FE0-4F4F-40F2-B2AB-CE67DECB8B49] Waiting on handle to abort upload. In Bucket: [janitacnonworm] with Key: [22C863DFB567C94D9D818E5FE00F7685/2023/10-17/a/54f/a54f205d-becf-4d34-91ef-d4688f2812e9] with Upload ID: [].
1194 15:38:25.923 [8956] (StorageArchive) <7064> EV:H {AwsSdk::TransferManager} [Trace] Transfer handle [07F66FE0-4F4F-40F2-B2AB-CE67DECB8B49] Finished waiting on handle. In Bucket: [janitacnonworm] with Key: [22C863DFB567C94D9D818E5FE00F7685/2023/10-17/a/54f/a54f205d-becf-4d34-91ef-d4688f2812e9] with Upload ID: [].
1195 15:38:25.939 [8956] (StorageArchive) <7064> EV:H {AwsSdk::TransferManager} [Trace] Transfer handle [07F66FE0-4F4F-40F2-B2AB-CE67DECB8B49] Status changed to FAILED after waiting for cancel status. In Bucket: [janitacnonworm] with Key: [22C863DFB567C94D9D818E5FE00F7685/2023/10-17/a/54f/a54f205d-becf-4d34-91ef-d4688f2812e9] with Upload ID: [].
AWS CPP SDK version used
1.11.178
Compiler and Version used
Visual Studio 2017
Operating System and version
Windows Server 2016
Describe the bug
After upgrading AWS CPP SDK to 1.11.178, file upload using transfer manager failing with error 'InvalidChunkSizeError Message: Only the last chunk is allowed to have a size less than 8192 bytes'.
We tried uploading files with various size but getting same error.
Expected Behavior
File upload using transfer manager should work.
Current Behavior
Failed to upload file of any size using aws transfer manager cpp APIs after upgrading aws cpp sdk 1.11.178 version.
Reproduction Steps
Take file of any size and try to upload it using aws cpp transfer manager APIs with AWS CPP SDK version 1.11.178.
Possible Solution
No response
Additional Information/Context
AWS CPP SDK version used
1.11.178
Compiler and Version used
Visual Studio 2017
Operating System and version
Windows Server 2016