Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

RocksDB library leaks private symbols #12929

Open
ottok opened this issue Aug 10, 2024 · 1 comment · May be fixed by #12944
Open

RocksDB library leaks private symbols #12929

ottok opened this issue Aug 10, 2024 · 1 comment · May be fixed by #12944

Comments

@ottok
Copy link
Contributor

ottok commented Aug 10, 2024

As one of the maintainers in Debian, I attempted to create a librocksdb9.3.symbols file for tracking ABI stability in RocksDB releases. The file draft begins:

librocksdb.so.9.3 librocksdb9.3 #MINVER#
* Build-Depends-Package: librocksdb-dev
 ROCKSDB_XXH128@Base 9.3.1
 ROCKSDB_XXH128_canonicalFromHash@Base 9.3.1
 ROCKSDB_XXH128_cmp@Base 9.3.1
 ROCKSDB_XXH128_hashFromCanonical@Base 9.3.1
 ROCKSDB_XXH128_isEqual@Base 9.3.1
 ROCKSDB_XXH32@Base 9.3.1
 ROCKSDB_XXH32_canonicalFromHash@Base 9.3.1
 ROCKSDB_XXH32_copyState@Base 9.3.1
 ROCKSDB_XXH32_createState@Base 9.3.1
 ROCKSDB_XXH32_digest@Base 9.3.1
 ROCKSDB_XXH32_freeState@Base 9.3.1
 ROCKSDB_XXH32_hashFromCanonical@Base 9.3.1
 ROCKSDB_XXH32_reset@Base 9.3.1
 ROCKSDB_XXH32_update@Base 9.3.1
 ROCKSDB_XXH3_128bits@Base 9.3.1
 ROCKSDB_XXH3_128bits_digest@Base 9.3.1
 ROCKSDB_XXH3_128bits_reset@Base 9.3.1

Expected behavior

Only intentional symbols from the RocksDB API should be visible.

Actual behavior

Thousands of private symbols leak through when running dpkg-gensymbols.

From https://salsa.debian.org/otto/rocksdb/-/jobs/5963452:

+ _ZNSt17_Function_handlerIFbRKN7rocksdb13ConfigOptionsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvSD_PS9_EZNS0_14OptionTypeInfo6VectorISt10shared_ptrINS0_31TablePropertiesCollectorFactoryEEEESG_iNS0_22OptionVerificationTypeENS0_15OptionTypeFlagsERKSG_cEUlS3_SB_SD_SD_SE_E_E10_M_managerERSt9_Any_dataRKSR_St18_Manager_operation@Base 9.3.1-1+salsaci+20240713+4
+ _ZNSt17_Function_handlerIFbRKN7rocksdb13ConfigOptionsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvSD_PS9_EZNS0_14OptionTypeInfo6VectorISt10shared_ptrINS0_31TablePropertiesCollectorFactoryEEEESG_iNS0_22OptionVerificationTypeENS0_15OptionTypeFlagsERKSG_cEUlS3_SB_SD_SD_SE_E_E9_M_invokeERKSt9_Any_dataS3_SB_OSD_SU_OSE_@Base 9.3.1-1+salsaci+20240713+4
+ _ZNSt17_Function_handlerIFbRKN7rocksdb13ConfigOptionsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvSD_PS9_EZNS0_14OptionTypeInfo6VectorIiEESG_iNS0_22OptionVerificationTypeENS0_15OptionTypeFlagsERKSG_cEUlS3_SB_SD_SD_SE_E1_E10_M_managerERSt9_Any_dataRKSO_St18_Manager_operation@Base 9.3.1-1+salsaci+20240713+4
+ _ZNSt17_Function_handlerIFbRKN7rocksdb13ConfigOptionsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvSD_PS9_EZNS0_14OptionTypeInfo6VectorIiEESG_iNS0_22OptionVerificationTypeENS0_15OptionTypeFlagsERKSG_cEUlS3_SB_SD_SD_SE_E1_E9_M_invokeERKSt9_Any_dataS3_SB_OSD_SR_OSE_@Base 9.3.1-1+salsaci+20240713+4
+ _ZNSt17_Function_handlerIFbRKN7rocksdb13ConfigOptionsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvSD_PS9_EZNS0_14OptionTypeInfo6VectorIiEESG_iNS0_22OptionVerificationTypeENS0_15OptionTypeFlagsERKSG_cEUlS3_SB_SD_SD_SE_E_E10_M_managerERSt9_Any_dataRKSO_St18_Manager_operation@Base 9.3.1-1+salsaci+20240713+4
+ _ZNSt17_Function_handlerIFbRKN7rocksdb13ConfigOptionsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvSD_PS9_EZNS0_14OptionTypeInfo6VectorIiEESG_iNS0_22OptionVerificationTypeENS0_15OptionTypeFlagsERKSG_cEUlS3_SB_SD_SD_SE_E_E9_M_invokeERKSt9_Any_dataS3_SB_OSD_SR_OSE_@Base 9.3.1-1+salsaci+20240713+4
+ _ZNSt17_Function_handlerIFbRKN7rocksdb13ConfigOptionsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvSD_PS9_EZNS0_14OptionTypeInfo6VectorImEESG_iNS0_22OptionVerificationTypeENS0_15OptionTypeFlagsERKSG_cEUlS3_SB_SD_SD_SE_E1_E10_M_managerERSt9_Any_dataRKSO_St18_Manager_operation@Base 9.3.1-1+salsaci+20240713+4
+ _ZNSt17_Function_handlerIFbRKN7rocksdb13ConfigOptionsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvSD_PS9_EZNS0_14OptionTypeInfo6VectorImEESG_iNS0_22OptionVerificationTypeENS0_15OptionTypeFlagsERKSG_cEUlS3_SB_SD_SD_SE_E1_E9_M_invokeERKSt9_Any_dataS3_SB_OSD_SR_OSE_@Base 9.3.1-1+salsaci+20240713+4
+ _ZNSt17_Function_handlerIFbRKN7rocksdb13ConfigOptionsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvSD_PS9_EZNS0_14OptionTypeInfo6VectorImEESG_iNS0_22OptionVerificationTypeENS0_15OptionTypeFlagsERKSG_cEUlS3_SB_SD_SD_SE_E_E10_M_managerERSt9_Any_dataRKSO_St18_Manager_operation@Base 9.3.1-1+salsaci+20240713+4
@rhubner rhubner linked a pull request Aug 19, 2024 that will close this issue
@rhubner
Copy link
Contributor

rhubner commented Aug 20, 2024

Hello @ottok ,

I create small patch #12944. Can you please test it and let me know if this will work.

Unfortunately this is quite big change, so I put it behind feature flag HIDE_PRIVATE_SYMBOLS. It should work for make as for CMake.

Radek

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants