Bug 29693 - clang-libs from f37 fails self test with pre-2.3 trunk
Summary: clang-libs from f37 fails self test with pre-2.3 trunk
Status: RESOLVED FIXED
Alias: None
Product: libabigail
Classification: Unclassified
Component: default (show other bugs)
Version: unspecified
: P2 critical
Target Milestone: ---
Assignee: Dodji Seketeli
URL:
Keywords:
Depends on:
Blocks: 29413
  Show dependency treegraph
 
Reported: 2022-10-14 22:14 UTC by Ben Woodard
Modified: 2023-05-17 15:36 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Woodard 2022-10-14 22:14:43 UTC
This is an interesting one because it is both an assert and a bad comparison. It also doesn't seem to fall in with any of the other bad comparisons or asserts.

The impacted library is libclang-cpp.so.15 so this is a library issue.


$ fedabipkgdiff --self-compare -a --from fc37 clang-libs
Comparing the ABI of binaries between clang-libs-15.0.0-2.fc37.aarch64.rpm and clang-libs-15.0.0-2.fc37.aarch64.rpm:

======== comparing'libclang-cpp.so.15' to itself wrongly yielded result: ===========
  Functions changes summary: 0 Removed, 1 Changed (1 filtered out), 0 Added functions
  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable

  1 function with some indirect sub-type change:

    [C] 'method virtual clang::dataflow::Solver::Result clang::dataflow::WatchedLiteralsSolver::solve(llvm::DenseSet<clang::dataflow::BoolValue *, llvm::DenseMapInfo<clang::dataflow::BoolValue *, void> >)' at WatchedLiteralsSolver.h:31:1 has some indirect sub-type changes:
      return type changed:
        type size hasn't changed
        2 data member deletions:
          'clang::dataflow::Solver::Result::Status SATCheckStatus', at offset 0 (in bits) at Solver.h:78:1
          'llvm::Optional<llvm::DenseMap<clang::dataflow::AtomicBoolValue *, clang::dataflow::Solver::Result::Assignment, llvm::DenseMapInfo<clang::dataflow::AtomicBoolValue *, void>, llvm::detail::DenseMapPair<clang::dataflow::AtomicBoolValue *, clang::dataflow::Solver::Result::Assignment> > > Solution', at offset 64 (in bits) at Solver.h:79:1

===SELF CHECK FAILED for 'libclang-cpp.so.15'
==== SELF CHECK SUCCEEDED for 'libclang.so.15.0.0' ====

Comparing the ABI of binaries between clang-devel-15.0.0-2.fc37.aarch64.rpm and clang-devel-15.0.0-2.fc37.aarch64.rpm:

==== SELF CHECK SUCCEEDED for 'clang-tblgen' ====

Comparing the ABI of binaries between clang-libs-15.0.0-2.fc37.i686.rpm and clang-libs-15.0.0-2.fc37.i686.rpm:

==== SELF CHECK SUCCEEDED for 'libclang-cpp.so.15' ====
==== SELF CHECK SUCCEEDED for 'libclang.so.15.0.0' ====

Comparing the ABI of binaries between clang-devel-15.0.0-2.fc37.i686.rpm and clang-devel-15.0.0-2.fc37.i686.rpm:

==== SELF CHECK SUCCEEDED for 'clang-tblgen' ====

Comparing the ABI of binaries between clang-libs-15.0.0-2.fc37.ppc64le.rpm and clang-libs-15.0.0-2.fc37.ppc64le.rpm:

==== SELF CHECK SUCCEEDED for 'libclang-cpp.so.15' ====
==== SELF CHECK SUCCEEDED for 'libclang.so.15.0.0' ====

Comparing the ABI of binaries between clang-devel-15.0.0-2.fc37.ppc64le.rpm and clang-devel-15.0.0-2.fc37.ppc64le.rpm:

==== SELF CHECK SUCCEEDED for 'clang-tblgen' ====

Comparing the ABI of binaries between clang-libs-15.0.0-2.fc37.s390x.rpm and clang-libs-15.0.0-2.fc37.s390x.rpm:

==== SELF CHECK SUCCEEDED for 'libclang-cpp.so.15' ====
==== SELF CHECK SUCCEEDED for 'libclang.so.15.0.0' ====

Comparing the ABI of binaries between clang-devel-15.0.0-2.fc37.s390x.rpm and clang-devel-15.0.0-2.fc37.s390x.rpm:

==== SELF CHECK SUCCEEDED for 'clang-tblgen' ====

Comparing the ABI of binaries between clang-devel-15.0.0-2.fc37.x86_64.rpm and clang-devel-15.0.0-2.fc37.x86_64.rpm:

==== SELF CHECK SUCCEEDED for 'clang-tblgen' ====

Comparing the ABI of binaries between clang-libs-15.0.0-2.fc37.x86_64.rpm and clang-libs-15.0.0-2.fc37.x86_64.rpm:

abipkgdiff: ../../../libabigail/src/abg-default-reporter.cc:375: virtual void abigail::comparison::default_reporter::report(const abigail::comparison::qualified_type_diff&, std::ostream&, const std::string&) const: Assertion `__abg_cond__' failed.
Comment 1 Ben Woodard 2022-10-25 17:01:00 UTC
Tom Stellard:

I have wanted to use libabigail for checking the ABI of libLLVM.so and
libclang-cpp.so, but it takes way too much memory (IIRC >32GB).
Optimizing libabigail to work better with these libraries
would allow us to actually use this tool check our RPM updates.
Comment 2 Ben Woodard 2023-03-23 21:13:52 UTC
This continues to reproduce with the latest trunk as of: 

commit a8a4ca8862959e9fede1b4878469681b8fadeb74 (HEAD -> master, origin/master, origin/HEAD)
Author: Dodji Seketeli <dodji@redhat.com>
Date:   Wed Mar 22 15:42:43 2023 +0100

    abipkgdiff: Fix a typo
    
            * tools/abipkgdiff.cc (compare_to_self): Fix a typo.
    
    Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Comment 3 Ben Woodard 2023-03-23 23:41:21 UTC
This one seems to be behaving oddly. Most other fedabipkgdiff launch abipkgdiff and you can see the amount of memory shoot up as it consumes the corpus. Then that finishes and it moves onto the next package and finally terminates.

clang-libs did that but the python code in fedabipkgdiff seemed to get stuck in a tight loop after the abipkgdiffs ran and it just continues running at 100% CPU but I don't think it is doing much real work because it is only using 0.1% of memory. So I think something is going wrong in the fedabipkgdiff python.

This is with the current trunk as of:

commit a8a4ca8862959e9fede1b4878469681b8fadeb74 (HEAD -> master, origin/master,
origin/HEAD)
Author: Dodji Seketeli <dodji@redhat.com>
Date:   Wed Mar 22 15:42:43 2023 +0100

    abipkgdiff: Fix a typo

            * tools/abipkgdiff.cc (compare_to_self): Fix a typo.

    Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Comment 4 Ben Woodard 2023-03-24 16:20:10 UTC
The fedabipkgdiff on clang-libs ran all night without making any apparent forward progress. So it appears like we have two bugs here.

1) what is causing fedabipkgdiff to spin in what appears to be an infinite loop after doing  at least some of the abipkgdiff comparisons.

2) clang-libs is failing selfcheck when run at a basic abipkgdiff level.


$ abipkgdiff --self-check  --d1 /home/ben/.cache/fedabipkgdiff/downloads/clang-devel-debuginfo-15.0.7-2.fc37.aarch64.rpm  --d1 /home/ben/.cache/fedabipkgdiff/downloads/clang-libs-debuginfo-15.0.7-2.fc37.aarch64.rpm  --d1 /home/ben/.cache/fedabipkgdiff/downloads/clang-tools-extra-debuginfo-15.0.7-2.fc37.aarch64.rpm  --d1 /home/ben/.cache/fedabipkgdiff/downloads/clang-debuginfo-15.0.7-2.fc37.aarch64.rpm /home/ben/.cache/fedabipkgdiff/downloads/clang-libs-15.0.7-2.fc37.aarch64.rpm
======== comparing'libclang-cpp.so.15' to itself wrongly yielded result: ===========
  Functions changes summary: 0 Removed, 1 Changed (1 filtered out), 0 Added functions
  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable

  1 function with some indirect sub-type change:

    [C] 'method virtual clang::dataflow::Solver::Result clang::dataflow::WatchedLiteralsSolver::solve(llvm::DenseSet<clang::dataflow::BoolValue *, llvm::DenseMapInfo<clang::dataflow::BoolValue *, void> >)' at WatchedLiteralsSolver.h:31:1 has some indirect sub-type changes:
      return type changed:
        type size hasn't changed
        2 data member deletions:
          'clang::dataflow::Solver::Result::Status SATCheckStatus', at offset 0 (in bits) at Solver.h:78:1
          'llvm::Optional<llvm::DenseMap<clang::dataflow::AtomicBoolValue *, clang::dataflow::Solver::Result::Assignment, llvm::DenseMapInfo<clang::dataflow::AtomicBoolValue *, void>, llvm::detail::DenseMapPair<clang::dataflow::AtomicBoolValue *, clang::dataflow::Solver::Result::Assignment> > > Solution', at offset 64 (in bits) at Solver.h:79:1

===SELF CHECK FAILED for 'libclang-cpp.so.15'
==== SELF CHECK SUCCEEDED for 'libclang.so.15.0.7' ====
Comment 5 Dodji Seketeli 2023-05-17 15:36:37 UTC
This issue should now be solved by commit https://sourceware.org/git/?p=libabigail.git;a=commit;h=06e8d54d0404ccf2a103804ec568797822152b69, applied to the master branch. This fix should be available in the 2.4 version of libabigail.

Thank you for taking the time to file this issue and sorry for the inconvenience.