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

ABI breakage 2.3.2 -> 2.3.3 [11840] #2014

Closed
roehling opened this issue Jun 18, 2021 · 3 comments
Closed

ABI breakage 2.3.2 -> 2.3.3 [11840] #2014

roehling opened this issue Jun 18, 2021 · 3 comments

Comments

@roehling
Copy link
Contributor

I just wanted to let you know that your latest patch release removed and changed publicly visible functions.
I'm not sure how much fallout this will cause (it won't affect Debian because no 2.3 release has entered the archive during the ongoing Bullseye release freeze), but it is something that should be avoided.

If you're interested in reproducing this output, I am using the abidiff and abipkgdiff tools from libabigail which can be installed in Debian and Ubuntu using apt-get install abigail-tools.

================ changes of 'libfastrtps.so.2.3.2'===============
  Functions changes summary: 1 Removed, 9 Changed (453 filtered out), 2 Added functions
  Variables changes summary: 0 Removed, 0 Changed (3 filtered out), 2 Added variables

  1 Removed function:

    'method bool eprosima::fastdds::rtps::UDPv6Transport::is_interface_allowed(const asio::ip::address_v6&) const'    {_ZNK8eprosima7fastdds4rtps14UDPv6Transport20is_interface_allowedERKN4asio2ip10address_v6E}

  2 Added functions:

    'method bool eprosima::fastdds::rtps::UDPv6Transport::compare_ips(const std::string&, const std::string&) const'    {_ZNK8eprosima7fastdds4rtps14UDPv6Transport11compare_ipsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_}
    'method eprosima::fastrtps::types::MemberId eprosima::fastrtps::types::DynamicData::get_union_id() const'    {_ZNK8eprosima8fastrtps5types11DynamicData12get_union_idEv}

  9 functions with some indirect sub-type change:

    [C]'method dds::domain::DomainParticipant::DomainParticipant(int, void**, uint32_t, const dds::domain::qos::DomainParticipantQos&, dds::domain::DomainParticipantListener*, const dds::core::status::StatusMask&)' at DomainParticipant.cpp:41:1 has some indirect sub-type changes:
      parameter 5 of type 'dds::domain::DomainParticipantListener*' has sub-type changes:
        in pointed to type 'class dds::domain::DomainParticipantListener' at DomainParticipantListener.hpp:181:1:
          type size hasn't changed
          1 base class change:
            'class eprosima::fastdds::dds::DomainParticipantListener' at DomainParticipantListener.hpp:44:1 changed:
              type size hasn't changed
              1 member function changes (4 filtered):
                'method virtual void eprosima::fastdds::dds::DomainParticipantListener::on_type_discovery(eprosima::fastdds::dds::DomainParticipant*, const eprosima::fastrtps::rtps::SampleIdentity&, const eprosima::fastrtps::string_255&, const eprosima::fastrtps::types::TypeIdentifier*, const eprosima::fastrtps::types::TypeObject*, eprosima::fastrtps::types::DynamicType_ptr)' has some sub-type changes:
                  parameter 6 of type 'class eprosima::fastrtps::types::DynamicType_ptr' has sub-type changes:
                    type size hasn't changed
                    1 base class change:
                      'class std::shared_ptr<eprosima::fastrtps::types::DynamicType>' at shared_ptr.h:121:1 changed:
                        type size hasn't changed
                        1 base class change:
                          'class std::__shared_ptr<eprosima::fastrtps::types::DynamicType, (__gnu_cxx::_Lock_policy)2>' at shared_ptr_base.h:1083:1 changed:
                            type size hasn't changed
                            1 data member change:
                             type of 'std::__shared_ptr<eprosima::fastrtps::types::DynamicType, (__gnu_cxx::_Lock_policy)2>::element_type* std::__shared_ptr<eprosima::fastrtps::types::DynamicType, (__gnu_cxx::_Lock_policy)2>::_M_ptr' changed:
                               in pointed to type 'typedef std::__shared_ptr<eprosima::fastrtps::types::DynamicType, (__gnu_cxx::_Lock_policy)2>::element_type' at shared_ptr_base.h:1087:1:
                                 underlying type 'typedef std::remove_extent<eprosima::fastrtps::types::DynamicType>::type' at type_traits:1973:1 changed:
                                   underlying type 'class eprosima::fastrtps::types::DynamicType' at DynamicType.h:37:1 changed:
                                     type size hasn't changed
                                     1 data member change:
                                      type of 'eprosima::fastrtps::types::TypeDescriptor* eprosima::fastrtps::types::DynamicType::descriptor_' changed:
                                        in pointed to type 'class eprosima::fastrtps::types::TypeDescriptor' at TypeDescriptor.h:45:1:
                                          type size changed from 1216 to 1984 (in bits)
                                          1 data member insertion:
                                            'const int eprosima::fastrtps::types::TypeDescriptor::stateTable[4][6]', at offset 1216 (in bits) at TypeDescriptor.h:58:1
                                          no data member changes (5 filtered);







    [C]'method bool eprosima::fastdds::dds::DomainParticipantImpl::check_get_type_request(const eprosima::fastrtps::rtps::SampleIdentity&, const eprosima::fastrtps::types::TypeIdentifier*, const eprosima::fastrtps::types::TypeObject*, eprosima::fastrtps::types::DynamicType_ptr)' at DomainParticipantImpl.cpp:1402:1 has some indirect sub-type changes:
      parameter 4 of type 'class eprosima::fastrtps::types::DynamicType_ptr' has sub-type changes:
        details were reported earlier

    [C]'method eprosima::fastrtps::types::ReturnCode_t eprosima::fastdds::dds::DomainParticipantImpl::register_dynamic_type(eprosima::fastrtps::types::DynamicType_ptr)' at DomainParticipantImpl.cpp:1618:1 has some indirect sub-type changes:
      parameter 1 of type 'class eprosima::fastrtps::types::DynamicType_ptr' has sub-type changes:
        details were reported earlier

    [C]'method const eprosima::fastrtps::ParticipantAttributes& eprosima::fastrtps::Participant::getAttributes() const' at Participant.cpp:42:1 has some indirect sub-type changes:
      return type changed:
        in referenced type 'const eprosima::fastrtps::ParticipantAttributes':
          in unqualified underlying type 'class eprosima::fastrtps::ParticipantAttributes' at ParticipantAttributes.h:34:1:
            type size hasn't changed
            1 data member change:
             type of 'eprosima::fastrtps::rtps::RTPSParticipantAttributes eprosima::fastrtps::ParticipantAttributes::rtps' changed:
               type size hasn't changed


    [C]'method eprosima::fastrtps::types::ReturnCode_t eprosima::fastrtps::types::DynamicDataFactory::create_members(eprosima::fastrtps::types::DynamicData*, eprosima::fastrtps::types::DynamicType_ptr)' at DynamicDataFactory.h:36:1 has some indirect sub-type changes:
      parameter 2 of type 'class eprosima::fastrtps::types::DynamicType_ptr' has sub-type changes:
        details were reported earlier

    [C]'method eprosima::fastrtps::types::ReturnCode_t eprosima::fastrtps::types::DynamicTypeBuilder::add_member(eprosima::fastrtps::types::MemberId, const std::string&, eprosima::fastrtps::types::DynamicType_ptr)' at DynamicTypeBuilder.cpp:233:1 has some indirect sub-type changes:
      parameter 3 of type 'class eprosima::fastrtps::types::DynamicType_ptr' has sub-type changes:
        details were reported earlier

    [C]'method eprosima::fastrtps::types::MemberDescriptor::MemberDescriptor(eprosima::fastrtps::types::MemberId, const std::string&, eprosima::fastrtps::types::DynamicType_ptr, const std::string&)' at MemberDescriptor.h:62:1 has some indirect sub-type changes:
      parameter 3 of type 'class eprosima::fastrtps::types::DynamicType_ptr' has sub-type changes:
        details were reported earlier

    [C]'method eprosima::fastrtps::types::MemberDescriptor::MemberDescriptor(eprosima::fastrtps::types::MemberId, const std::string&, eprosima::fastrtps::types::DynamicType_ptr, const std::string&, const std::vector<long unsigned int, std::allocator<long unsigned int> >&, bool)' at MemberDescriptor.h:68:1 has some indirect sub-type changes:
      parameter 3 of type 'class eprosima::fastrtps::types::DynamicType_ptr' has sub-type changes:
        details were reported earlier

    [C]'method eprosima::fastrtps::types::DynamicType_ptr eprosima::fastrtps::types::TypeObjectFactory::build_dynamic_type(eprosima::fastrtps::types::TypeDescriptor&, const eprosima::fastrtps::types::TypeObject*, eprosima::fastrtps::types::DynamicType_ptr) const' at TypeObjectFactory.h:46:1 has some indirect sub-type changes:
      parameter 3 of type 'class eprosima::fastrtps::types::DynamicType_ptr' has sub-type changes:
        details were reported earlier



  2 Added variables:

    'const char* eprosima::fastrtps::xmlparser::_PERSISTENT_DURABILITY_QOS'    {_ZN8eprosima8fastrtps9xmlparser26_PERSISTENT_DURABILITY_QOSE}
    'const char* eprosima::fastrtps::xmlparser::_TRANSIENT_DURABILITY_QOS'    {_ZN8eprosima8fastrtps9xmlparser25_TRANSIENT_DURABILITY_QOSE}

================ end of changes of 'libfastrtps.so.2.3.2'===============

@MiguelCompany
Copy link
Member

@roehling Thanks for your report. I will take note of the tools used and include them on our release process checklist.

Let's try to analyze your report.

The removed function and the first added function are on a private class for which the header is not installed.

The second added method, though in a public class, would not break ABI with applications using the previous version of the library.

The same applies to the added variables.

Then we have the ones related to changes on DynamicType_ptr. All of them are due to the addition of the stateTable constant, which is a protected field (and thus no application would be able to use it). What bothers me in this case, is that two unnecessary enumerations were added to a public header. I have just created PR #2015 to fix that.

The only remaining case in the report is the one related to ParticipantAttributes, but I can see no related change on the version diff

@MiguelCompany MiguelCompany changed the title ABI breakage 2.3.2 -> 2.3.3 ABI breakage 2.3.2 -> 2.3.3 [11840] Jun 18, 2021
@roehling
Copy link
Contributor Author

Thanks for your quick reply and your willingness to look into this in more detail! You're right, the UDPv6Transport class header is not exported. I did instruct the tool to ignore symbols which where not defined in the public headers, so this is either a bug or a usage error on my part.

I agree that added functions are generally harmless, because they do not break old code. In Debian, those are usually dealt with by adding version restrictions such as Depends: libfastrtsp2.3 (>= 2.3.3) to packages which make use of those new symbols.

The change of the stableTable is bit difficult to grasp for me. It might be another false positive, or there might be a subtle interference I fail to see.

There is another similar tool, abi-compliance-checker, so I'll retest the two versions with that for a second opinion and get back to you later.

@MiguelCompany
Copy link
Member

There is another similar tool, abi-compliance-checker

I will take note of both tools, and see how to integrate them on our release process.

As #2015 has been merged, I will go ahead and close this.
Feel free to reopen if needed.

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

No branches or pull requests

2 participants