Bug 1289674

Summary: abipkgdiff crashes when given debuginfo rpm instead of the expected binary rpms
Product: [Fedora] Fedora Reporter: Honza Horak <hhorak>
Component: libabigailAssignee: Sinny Kumari <ksinny>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: dodji, dodji, ksinny
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-20 16:48:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
core dump for abipkgdiff none

Description Honza Horak 2015-12-08 17:10:27 UTC
Description of problem:
When comparing two debuginfo packages of opencv from Fedora, abipkgdiff crashes with coredump.

Version-Release number of selected component (if applicable):
$ rpm -q libabigail
libabigail-1.0-0.6.20150909git164d17e.fc23.x86_64

How reproducible:
every-time

Steps to Reproduce:
1. download opencv-debuginfo-2.4.5-1.fc19.x86_64.rpm and opencv-debuginfo-2.4.12.3-1.fc24.x86_64.rpm from http://koji.fedoraproject.org
2. abipkgdiff opencv-debuginfo-2.4.5-1.fc19.x86_64.rpm opencv-debuginfo-2.4.12.3-1.fc24.x86_64.rpm

Actual results:
abipkgdiff crashes

Expected results:
abipkgdiff doesn't crash

Additional info:
Backtrace:
Core was generated by `abipkgdiff opencv-debuginfo-2.4.5-1.fc19.x86_64.rpm opencv-debuginfo-2.4.12.3-1'.
Program terminated with signal SIGABRT, Aborted.
#0  0x00007f183c3dfa98 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: dnf debuginfo-install libabigail-1.0-0.6.20150909git164d17e.fc23.x86_64
(gdb) bt
#0  0x00007f183c3dfa98 in raise () from /lib64/libc.so.6
#1  0x00007f183c3e169a in abort () from /lib64/libc.so.6
#2  0x00007f183c3d8227 in __assert_fail_base () from /lib64/libc.so.6
#3  0x00007f183c3d82d2 in __assert_fail () from /lib64/libc.so.6
#4  0x00007f183d99f0e1 in abigail::dwarf_reader::get_parent_die(abigail::dwarf_reader::read_context&, Dwarf_Die*, bool, Dwarf_Die&, unsigned long) () from /lib64/libabigail.so.0
#5  0x00007f183d9abdb5 in abigail::dwarf_reader::get_scope_for_die(abigail::dwarf_reader::read_context&, Dwarf_Die*, bool, bool, unsigned long) () from /lib64/libabigail.so.0
#6  0x00007f183d9abc29 in abigail::dwarf_reader::build_ir_node_from_die(abigail::dwarf_reader::read_context&, Dwarf_Die*, bool, bool, unsigned long) () from /lib64/libabigail.so.0
#7  0x00007f183d9aec3e in abigail::dwarf_reader::build_class_type_and_add_to_ir(abigail::dwarf_reader::read_context&, Dwarf_Die*, bool, abigail::ir::scope_decl*, bool, std::tr1::shared_ptr<abigail::ir::class_decl>, bool, unsigned long) [clone .constprop.564] () from /lib64/libabigail.so.0
#8  0x00007f183d9a84c4 in abigail::dwarf_reader::build_ir_node_from_die(abigail::dwarf_reader::read_context&, Dwarf_Die*, bool, abigail::ir::scope_decl*, bool, unsigned long) ()
   from /lib64/libabigail.so.0
#9  0x00007f183d9abc47 in abigail::dwarf_reader::build_ir_node_from_die(abigail::dwarf_reader::read_context&, Dwarf_Die*, bool, bool, unsigned long) () from /lib64/libabigail.so.0
#10 0x00007f183d9ac4b5 in abigail::dwarf_reader::build_pointer_type_def(abigail::dwarf_reader::read_context&, Dwarf_Die*, bool, bool, unsigned long) () from /lib64/libabigail.so.0
#11 0x00007f183d9a7acf in abigail::dwarf_reader::build_ir_node_from_die(abigail::dwarf_reader::read_context&, Dwarf_Die*, bool, abigail::ir::scope_decl*, bool, unsigned long) ()
   from /lib64/libabigail.so.0
#12 0x00007f183d9abc47 in abigail::dwarf_reader::build_ir_node_from_die(abigail::dwarf_reader::read_context&, Dwarf_Die*, bool, bool, unsigned long) () from /lib64/libabigail.so.0
#13 0x00007f183d9aec3e in abigail::dwarf_reader::build_class_type_and_add_to_ir(abigail::dwarf_reader::read_context&, Dwarf_Die*, bool, abigail::ir::scope_decl*, bool, std::tr1::shared_ptr<abigail::ir::class_decl>, bool, unsigned long) [clone .constprop.564] () from /lib64/libabigail.so.0
#14 0x00007f183d9a84c4 in abigail::dwarf_reader::build_ir_node_from_die(abigail::dwarf_reader::read_context&, Dwarf_Die*, bool, abigail::ir::scope_decl*, bool, unsigned long) ()
   from /lib64/libabigail.so.0
#15 0x00007f183d9abc47 in abigail::dwarf_reader::build_ir_node_from_die(abigail::dwarf_reader::read_context&, Dwarf_Die*, bool, bool, unsigned long) () from /lib64/libabigail.so.0
#16 0x00007f183d9abe3f in abigail::dwarf_reader::get_scope_for_die(abigail::dwarf_reader::read_context&, Dwarf_Die*, bool, bool, unsigned long) () from /lib64/libabigail.so.0
#17 0x00007f183d9abc29 in abigail::dwarf_reader::build_ir_node_from_die(abigail::dwarf_reader::read_context&, Dwarf_Die*, bool, bool, unsigned long) () from /lib64/libabigail.so.0
#18 0x00007f183d9aa11a in abigail::dwarf_reader::build_ir_node_from_die(abigail::dwarf_reader::read_context&, Dwarf_Die*, bool, abigail::ir::scope_decl*, bool, unsigned long) ()
   from /lib64/libabigail.so.0
#19 0x00007f183d9abc47 in abigail::dwarf_reader::build_ir_node_from_die(abigail::dwarf_reader::read_context&, Dwarf_Die*, bool, bool, unsigned long) () from /lib64/libabigail.so.0
#20 0x00007f183d9a6d03 in abigail::dwarf_reader::build_namespace_decl_and_add_to_ir(abigail::dwarf_reader::read_context&, Dwarf_Die*, bool, unsigned long) () from /lib64/libabigail.so.0
#21 0x00007f183d9a7a68 in abigail::dwarf_reader::build_ir_node_from_die(abigail::dwarf_reader::read_context&, Dwarf_Die*, bool, abigail::ir::scope_decl*, bool, unsigned long) ()
   from /lib64/libabigail.so.0
#22 0x00007f183d9abc47 in abigail::dwarf_reader::build_ir_node_from_die(abigail::dwarf_reader::read_context&, Dwarf_Die*, bool, bool, unsigned long) () from /lib64/libabigail.so.0
#23 0x00007f183d9b05a4 in abigail::dwarf_reader::read_corpus_from_elf(abigail::dwarf_reader::read_context&, abigail::dwarf_reader::status&) () from /lib64/libabigail.so.0
#24 0x00007f183d9b1ed7 in abigail::dwarf_reader::read_corpus_from_elf(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char**, abigail::ir::environment*, bool, abigail::dwarf_reader::status&) () from /lib64/libabigail.so.0
#25 0x000055af35dec5c7 in main ()

Comment 1 Honza Horak 2015-12-08 17:12:12 UTC
Created attachment 1103653 [details]
core dump for abipkgdiff

Comment 2 Dodji Seketeli 2015-12-11 13:43:52 UTC
Hello,

You are right, abipkgdiff crashes in this case and I reproduce it.  Thank you for taking time to file that issue.

So, just be clear, abipkgdiff expects you to provide it with RPMs that contain binaries which ABI you want to compare.

This is not what you did.  You gave it RPMs that contain debug info.

The correct invocation should have been, for instance:

abipkgdiff --d1 opencv-debuginfo-2.4.5-1.fc19.x86_64.rpm --d2 opencv-debuginfo-2.4.12.3-1.fc24.x86_64.rpm opencv-2.4.5-1.fc19.x86_64.rpm opencv-2.4.12.3-1.fc24.x86_64.rpm

I agree 100% with you that abipkgdiff should not crash when given arguments it doesn't expect.  But then, in this particular case, I am not sure how to *reliably* detect that a given package is a debug info package, as opposed to a package with meaningful ELF binary payloads.

This bug report is interesting.  Now I need to figure out how to reliably detect that a package is a debug info one.

Comment 3 Fedora End Of Life 2016-11-24 14:04:16 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Fedora End Of Life 2016-12-20 16:48:41 UTC
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.