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

TransferManager changes in 1.11.486 break ABI #3258

Open
1 task done
0x9fff00 opened this issue Jan 19, 2025 · 1 comment
Open
1 task done

TransferManager changes in 1.11.486 break ABI #3258

0x9fff00 opened this issue Jan 19, 2025 · 1 comment
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@0x9fff00
Copy link

0x9fff00 commented Jan 19, 2025

Describe the bug

1e2db20#diff-3952e6db12d0030871dfd112b58cfdc90dbd5ee8cbd9e8e676f5f52228ed0e25 adds an optional checksum parameter to TransferManager::UploadFile and TransferManager::CreateUploadFileHandle, and changes the state parameter of TransferManager::SetChecksumForAlgorithm to be a reference. These changes break the ABI of libaws-cpp-sdk-transfer.so.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

ABI breaks should only happen with a major version bump and soname change.

Current Behavior

The ABI was broken in a patch release and without a soname change. This causes errors with programs that dynamically link to the affected functions, such as Nix, if they were compiled with older versions of the AWS SDK:

$ nix-channel --help
nix-channel: symbol lookup error: /usr/lib/libnixstore.so: undefined symbol: _ZN3Aws8Transfer15TransferManager10UploadFileERKSt10shared_ptrISdERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESD_SD_RKSt3mapISB_SB_St4lessISB_ESaISt4pairISC_SB_EEERKS2_IKNS_6Client18AsyncCallerContextEE

Reproduction Steps

  1. Build libaws-cpp-sdk-transfer.so in version 1.11.485 and 1.11.486 or later
  2. Use abidiff from libabigail to compare the binaries:
$ abidiff 1.11.485/libaws-cpp-sdk-transfer.so 1.11.488/libaws-cpp-sdk-transfer.so
Functions changes summary: 0 Removed, 0 Changed, 4 Added functions
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
Function symbols changes summary: 4 Removed, 0 Added function symbols not referenced by debug info
Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referenced by debug info

4 Added functions:

  [A] 'method std::shared_ptr<Aws::Transfer::TransferHandle> Aws::Transfer::TransferManager::CreateUploadFileHandle(Aws::IOStream*, const Aws::String&, const Aws::String&, const Aws::String&, const Aws::Map&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&, const Aws::String&, const Aws::String&)'    {_ZN3Aws8Transfer15TransferManager22CreateUploadFileHandleEPSdRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_SA_RKSt3mapIS8_S8_St4lessIS8_ESaISt4pairIS9_S8_EEERKSt10shared_ptrIKNS_6Client18AsyncCallerContextEESA_SA_}
  [A] 'method void Aws::Transfer::TransferManager::SetChecksumForAlgorithm(const std::shared_ptr<Aws::Transfer::PartState>&, Aws::S3::Model::CompletedPart&)'    {_ZN3Aws8Transfer15TransferManager23SetChecksumForAlgorithmERKSt10shared_ptrINS0_9PartStateEERNS_2S35Model13CompletedPartE}
  [A] 'method std::shared_ptr<Aws::Transfer::TransferHandle> Aws::Transfer::TransferManager::UploadFile(const Aws::String&, const Aws::String&, const Aws::String&, const Aws::String&, const Aws::Map&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&, const Aws::String&)'    {_ZN3Aws8Transfer15TransferManager10UploadFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_S9_S9_RKSt3mapIS7_S7_St4lessIS7_ESaISt4pairIS8_S7_EEERKSt10shared_ptrIKNS_6Client18AsyncCallerContextEES9_}
  [A] 'method std::shared_ptr<Aws::Transfer::TransferHandle> Aws::Transfer::TransferManager::UploadFile(const std::shared_ptr<std::basic_iostream<char, std::char_traits<char> > >&, const Aws::String&, const Aws::String&, const Aws::String&, const Aws::Map&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&, const Aws::String&)'    {_ZN3Aws8Transfer15TransferManager10UploadFileERKSt10shared_ptrISdERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESD_SD_RKSt3mapISB_SB_St4lessISB_ESaISt4pairISC_SB_EEERKS2_IKNS_6Client18AsyncCallerContextEESD_}

4 Removed function symbols not referenced by debug info:

  [D] _ZN3Aws8Transfer15TransferManager10UploadFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_S9_S9_RKSt3mapIS7_S7_St4lessIS7_ESaISt4pairIS8_S7_EEERKSt10shared_ptrIKNS_6Client18AsyncCallerContextEE
  [D] _ZN3Aws8Transfer15TransferManager10UploadFileERKSt10shared_ptrISdERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESD_SD_RKSt3mapISB_SB_St4lessISB_ESaISt4pairISC_SB_EEERKS2_IKNS_6Client18AsyncCallerContextEE
  [D] _ZN3Aws8Transfer15TransferManager22CreateUploadFileHandleEPSdRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_SA_RKSt3mapIS8_S8_St4lessIS8_ESaISt4pairIS9_S8_EEERKSt10shared_ptrIKNS_6Client18AsyncCallerContextEESA_
  [D] _ZN3Aws8Transfer15TransferManager23SetChecksumForAlgorithmESt10shared_ptrINS0_9PartStateEERNS_2S35Model13CompletedPartE

Possible Solution

No response

Additional Information/Context

Related bug report for Arch Linux nix package: https://gitlab.archlinux.org/archlinux/packaging/packages/nix/-/issues/6

AWS CPP SDK version used

1.11.488

Compiler and Version used

gcc (GCC) 14.2.1 20240910

Operating System and version

Arch Linux

@0x9fff00 0x9fff00 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 19, 2025
@sbiscigl
Copy link
Contributor

ABI breaks should only happen with a major version bump and soname change.

The CPP SDK is not ABI stable. If you want ABI stability as feature of the SDK please make a feature request to require ABI stability. right now the recommended way to consume the SDK is building from source

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

2 participants