Bug 29901 - abidiff hangs when comparing freshly-built libgs.so.10 with itself (runs for hours)
Summary: abidiff hangs when comparing freshly-built libgs.so.10 with itself (runs for ...
Status: RESOLVED FIXED
Alias: None
Product: libabigail
Classification: Unclassified
Component: default (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Dodji Seketeli
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-16 04:05 UTC by Sam James
Modified: 2022-12-20 15:37 UTC (History)
1 user (show)

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


Attachments
backtrace from hanging (few minutes) (1.68 KB, text/plain)
2022-12-16 04:05 UTC, Sam James
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James 2022-12-16 04:05:01 UTC
Created attachment 14519 [details]
backtrace from hanging (few minutes)

Sorry for the lack of detail, I'm not sure how to describe this properly yet.

In Gentoo, we have tooling for developers to use abidiff when upgrading packages or changing build options, which is a great convenience. It compares the system copy with the version just built. Thanks for libabigail, it's a huge help.

With ghostscript-gpl-10.0.0, libabigail's abidiff seems to hang when doing this comparison (had been running for an hour at this point):
```
root     2761321 97.6  1.8 1360832 1242480 pts/1 RN+  02:40  55:22 abidiff --stats --d1 /usr/lib/debug --d2 /var/tmp/portage/app-text/ghostscript-gpl-10.0.0-r4/image/usr/lib/debug /usr/lib64/libgs.so.10.00 /var/tmp/portage/app-text/ghostscript-gpl-10.0.0-r4/image/usr/lib64/libgs.so.10.00
```

Same happens without --stats.

$ abidiff --version
abidiff: 2.2.0

Attached backtrace after running for about 3-4 minutes on a fresh run. Sorry it's not from a longer run, I can grab one of those if needed. Let me know if & how to grab more info. Thanks!
Comment 1 Sam James 2022-12-16 08:14:01 UTC
Sorry, I obviously should've provided two binaries as well. I'll upload them later today.
Comment 2 Dodji Seketeli 2022-12-19 17:05:32 UTC
Hello,

I have been looking at bug https://sourceware.org/bugzilla/show_bug.cgi?id=29857 and I think that the patch I am working on there should fix this one as well.

But to be sure of that, I'd need to get my hand on the binaries you are looking at.  Would that be possible, please?

Thanks.
Comment 3 Sam James 2022-12-20 08:40:33 UTC
(In reply to dodji from comment #2)
> Hello,
> 
> I have been looking at bug
> https://sourceware.org/bugzilla/show_bug.cgi?id=29857 and I think that the
> patch I am working on there should fix this one as well.
> 
> But to be sure of that, I'd need to get my hand on the binaries you are
> looking at.  Would that be possible, please?
> 
> Thanks.

Sorry for the delay! Here it is (too large to attach to bugzilla, hope that's alright): https://dev.gentoo.org/~sam/bugs/sourceware/29901/libabigail-bug.tar.xz
Comment 4 Dodji Seketeli 2022-12-20 09:43:15 UTC
(In reply to Sam James from comment #3)

[...]

> Sorry for the delay!

No problem.

> Here it is (too large to attach to bugzilla, hope
> that's alright):
> https://dev.gentoo.org/~sam/bugs/sourceware/29901/libabigail-bug.tar.xz

I could get it.  Thank you.

However, the debug info of each binary (libgs.so.10.00 and libgs.so.10.00.new) are split out into separate debuginfo files.  Those files must be somewhere (probably under /usr/lib/debug) on your system and are named "libgs.so.10.00.debug". 

I need those debug files to reproduce the issue.

Could you please provide them as well?

Thanks in advance.
Comment 5 Sam James 2022-12-20 09:52:39 UTC
My apologies -- obvious in retrospect!

Please try again at the same link.
Comment 6 Dodji Seketeli 2022-12-20 11:25:31 UTC
(In reply to Sam James from comment #5)
> My apologies -- obvious in retrospect!

No problem, and thank you for following up.
 
> Please try again at the same link.

I got it now, thanks.  Looking into it.
Comment 7 Dodji Seketeli 2022-12-20 15:37:57 UTC
This problem should hopefully be fixed by commit https://sourceware.org/git/?p=libabigail.git;a=commit;h=e1aadfa576963f2baddc6b6bf17898a86e3a041e.

On my machine, the comparison now ends up in about less than 45minutes.  This is still a lot, but at least there is no more infinite loop.

This fix should be available in libabigail 2.3.

Thank you taking the time to report this problem and sorry for the inconvenience.