* [Bug default/29346] New: SIGFPE when doing abipkgdiff --self-check of aisleriot-debuginfo-3.22.21-1.fc36.aarch64.rpm
@ 2022-07-09 19:02 woodard at redhat dot com
2022-07-09 20:13 ` [Bug default/29346] " mark at klomp dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: woodard at redhat dot com @ 2022-07-09 19:02 UTC (permalink / raw)
To: libabigail
https://sourceware.org/bugzilla/show_bug.cgi?id=29346
Bug ID: 29346
Summary: SIGFPE when doing abipkgdiff --self-check of
aisleriot-debuginfo-3.22.21-1.fc36.aarch64.rpm
Product: libabigail
Version: unspecified
Status: NEW
Severity: minor
Priority: P2
Component: default
Assignee: dodji at redhat dot com
Reporter: woodard at redhat dot com
CC: libabigail at sourceware dot org
Target Milestone: ---
This is a strange one, it looks like there is an unhandled situation reading
the ELF file.
$ gdb `which abipkgdiff`
(gdb) set args --self-check --d1
/home/ben/.cache/fedabipkgdiff/downloads/aisleriot-debuginfo-3.22.21-1.fc36.aarch64.rpm
/home/ben/.cache/fedabipkgdiff/downloads/aisleriot-3.22.21-1.fc36.aarch64.rpm
(gdb) r
Starting program: /home/ben/Shared/Work/test/libabigail-x86_64/bin/abipkgdiff
--self-check --d1
/home/ben/.cache/fedabipkgdiff/downloads/aisleriot-debuginfo-3.22.21-1.fc36.aarch64.rpm
/home/ben/.cache/fedabipkgdiff/downloads/aisleriot-3.22.21-1.fc36.aarch64.rpm
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7ffff71ff640 (LWP 3130292)]
[New Thread 0x7ffff69fe640 (LWP 3130293)]
[Detaching after vfork from child process 3130295]
[Detaching after vfork from child process 3130294]
[Thread 0x7ffff71ff640 (LWP 3130292) exited]
[Thread 0x7ffff69fe640 (LWP 3130293) exited]
[Detaching after vfork from child process 3130302]
Thread 1 "abipkgdiff" received signal SIGFPE, Arithmetic exception.
0x00007ffff7e37aa3 in abigail::dwarf_reader::get_soname_of_elf_file
(path="/home/ben/.cache/libabigail/abipkgdiff-tmp-dir-ipFB18/package1/usr/lib64/aisleriot/guile/3.0/yield.go",
soname="") at ../../../libabigail/src/abg-dwarf-reader.cc:16638
16638 ? shdr->sh_size / shdr->sh_entsize : INT_MAX);
(gdb) bt
#0 0x00007ffff7e37aa3 in abigail::dwarf_reader::get_soname_of_elf_file (
path="/home/ben/.cache/libabigail/abipkgdiff-tmp-dir-ipFB18/package1/usr/lib64/aisleriot/guile/3.0/yield.go",
soname="")
at ../../../libabigail/src/abg-dwarf-reader.cc:16638
#1 0x00000000004136e1 in elf_file::elf_file (
path="/home/ben/.cache/libabigail/abipkgdiff-tmp-dir-ipFB18/package1/usr/lib64/aisleriot/guile/3.0/yield.go",
this=0x43e240)
at ../../../libabigail/tools/abipkgdiff.cc:289
#2 create_maps_of_package_content (opts=..., package=...) at
../../../libabigail/tools/abipkgdiff.cc:2357
#3 extract_package_and_map_its_content (pkg=std::shared_ptr<package> (use
count 3, weak count 0) = {...}, opts=...)
at ../../../libabigail/tools/abipkgdiff.cc:2529
#4 0x0000000000409093 in prepare_package (opts=...,
pkg=std::shared_ptr<package> (use count 3, weak count 0) = {...})
at ../../../libabigail/tools/abipkgdiff.cc:2592
#5 compare_to_self (opts=..., pkg=std::shared_ptr<package> (use count 3, weak
count 0) = {...}) at ../../../libabigail/tools/abipkgdiff.cc:3184
#6 main (argc=<optimized out>, argv=<optimized out>) at
../../../libabigail/tools/abipkgdiff.cc:3694
(gdb)
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug default/29346] SIGFPE when doing abipkgdiff --self-check of aisleriot-debuginfo-3.22.21-1.fc36.aarch64.rpm
2022-07-09 19:02 [Bug default/29346] New: SIGFPE when doing abipkgdiff --self-check of aisleriot-debuginfo-3.22.21-1.fc36.aarch64.rpm woodard at redhat dot com
@ 2022-07-09 20:13 ` mark at klomp dot org
2022-07-09 20:29 ` mark at klomp dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: mark at klomp dot org @ 2022-07-09 20:13 UTC (permalink / raw)
To: libabigail
https://sourceware.org/bugzilla/show_bug.cgi?id=29346
Mark Wielaard <mark at klomp dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mark at klomp dot org
--- Comment #1 from Mark Wielaard <mark at klomp dot org> ---
> Thread 1 "abipkgdiff" received signal SIGFPE, Arithmetic exception.
> 0x00007ffff7e37aa3 in abigail::dwarf_reader::get_soname_of_elf_file
> (path="/home/ben/.cache/libabigail/abipkgdiff-tmp-dir-ipFB18/package1/usr/lib64/aisleriot/guile/3.0/yield.go", soname="") at ../../../libabigail/src/abg-dwarf-reader.cc:16638
> 16638 ? shdr->sh_size / shdr->sh_entsize : INT_MAX);
The issue is that the yield.go file (a guile generated ELF file) has sh_entsize
of zero for the .dynamic section. I think that is a bug in guile. And it is
slightly questionable that abipkgdiff tries to diff the abi of a generated
guile file. But something like the following should fix it (untested):
diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc
index 32a2cead..f08f194b 100644
--- a/src/abg-dwarf-reader.cc
+++ b/src/abg-dwarf-reader.cc
@@ -16634,6 +16634,8 @@ get_soname_of_elf_file(const string& path, string
&soname)
Elf_Scn* scn = gelf_offscn (elf, phdr->p_offset);
GElf_Shdr shdr_mem;
GElf_Shdr* shdr = gelf_getshdr (scn, &shdr_mem);
+ size_t entsize = (shdr->sh_entsize
+ ?: gelf_fsize (elf, ELF_T_DYN, 1, EV_CURRENT));
int maxcnt = (shdr != NULL
? shdr->sh_size / shdr->sh_entsize : INT_MAX);
ABG_ASSERT (shdr == NULL || shdr->sh_type == SHT_DYNAMIC);
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug default/29346] SIGFPE when doing abipkgdiff --self-check of aisleriot-debuginfo-3.22.21-1.fc36.aarch64.rpm
2022-07-09 19:02 [Bug default/29346] New: SIGFPE when doing abipkgdiff --self-check of aisleriot-debuginfo-3.22.21-1.fc36.aarch64.rpm woodard at redhat dot com
2022-07-09 20:13 ` [Bug default/29346] " mark at klomp dot org
@ 2022-07-09 20:29 ` mark at klomp dot org
2022-07-20 9:35 ` mark at klomp dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: mark at klomp dot org @ 2022-07-09 20:29 UTC (permalink / raw)
To: libabigail
https://sourceware.org/bugzilla/show_bug.cgi?id=29346
--- Comment #2 from Mark Wielaard <mark at klomp dot org> ---
I probably should have tried to compile it at least.
This actually compiles (but I haven't replicated the original issue):
diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc
index 32a2cead..f2f06037 100644
--- a/src/abg-dwarf-reader.cc
+++ b/src/abg-dwarf-reader.cc
@@ -16634,8 +16634,11 @@ get_soname_of_elf_file(const string& path, string
&soname)
Elf_Scn* scn = gelf_offscn (elf, phdr->p_offset);
GElf_Shdr shdr_mem;
GElf_Shdr* shdr = gelf_getshdr (scn, &shdr_mem);
+ size_t entsize = (shdr != NULL && shdr->sh_entsize != 0
+ ? shdr->sh_entsize
+ : gelf_fsize (elf, ELF_T_DYN, 1, EV_CURRENT));
int maxcnt = (shdr != NULL
- ? shdr->sh_size / shdr->sh_entsize : INT_MAX);
+ ? shdr->sh_size / entsize : INT_MAX);
ABG_ASSERT (shdr == NULL || shdr->sh_type == SHT_DYNAMIC);
Elf_Data* data = elf_getdata (scn, NULL);
if (data == NULL)
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug default/29346] SIGFPE when doing abipkgdiff --self-check of aisleriot-debuginfo-3.22.21-1.fc36.aarch64.rpm
2022-07-09 19:02 [Bug default/29346] New: SIGFPE when doing abipkgdiff --self-check of aisleriot-debuginfo-3.22.21-1.fc36.aarch64.rpm woodard at redhat dot com
2022-07-09 20:13 ` [Bug default/29346] " mark at klomp dot org
2022-07-09 20:29 ` mark at klomp dot org
@ 2022-07-20 9:35 ` mark at klomp dot org
2022-07-26 20:17 ` woodard at redhat dot com
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: mark at klomp dot org @ 2022-07-20 9:35 UTC (permalink / raw)
To: libabigail
https://sourceware.org/bugzilla/show_bug.cgi?id=29346
--- Comment #3 from Mark Wielaard <mark at klomp dot org> ---
https://code.wildebeest.org/git/user/mjw/libabigail/commit/?h=pr29346
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug default/29346] SIGFPE when doing abipkgdiff --self-check of aisleriot-debuginfo-3.22.21-1.fc36.aarch64.rpm
2022-07-09 19:02 [Bug default/29346] New: SIGFPE when doing abipkgdiff --self-check of aisleriot-debuginfo-3.22.21-1.fc36.aarch64.rpm woodard at redhat dot com
` (2 preceding siblings ...)
2022-07-20 9:35 ` mark at klomp dot org
@ 2022-07-26 20:17 ` woodard at redhat dot com
2022-07-28 22:01 ` woodard at redhat dot com
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: woodard at redhat dot com @ 2022-07-26 20:17 UTC (permalink / raw)
To: libabigail
https://sourceware.org/bugzilla/show_bug.cgi?id=29346
Ben Woodard <woodard at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |29412
Referenced Bugs:
https://sourceware.org/bugzilla/show_bug.cgi?id=29412
[Bug 29412] Assertion metabug
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug default/29346] SIGFPE when doing abipkgdiff --self-check of aisleriot-debuginfo-3.22.21-1.fc36.aarch64.rpm
2022-07-09 19:02 [Bug default/29346] New: SIGFPE when doing abipkgdiff --self-check of aisleriot-debuginfo-3.22.21-1.fc36.aarch64.rpm woodard at redhat dot com
` (3 preceding siblings ...)
2022-07-26 20:17 ` woodard at redhat dot com
@ 2022-07-28 22:01 ` woodard at redhat dot com
2022-07-29 22:51 ` woodard at redhat dot com
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: woodard at redhat dot com @ 2022-07-28 22:01 UTC (permalink / raw)
To: libabigail
https://sourceware.org/bugzilla/show_bug.cgi?id=29346
--- Comment #4 from Ben Woodard <woodard at redhat dot com> ---
This appears to affect the following packages:
guile22
gdb-headless
sagemath
guile30
gnucash
aisleriot
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug default/29346] SIGFPE when doing abipkgdiff --self-check of aisleriot-debuginfo-3.22.21-1.fc36.aarch64.rpm
2022-07-09 19:02 [Bug default/29346] New: SIGFPE when doing abipkgdiff --self-check of aisleriot-debuginfo-3.22.21-1.fc36.aarch64.rpm woodard at redhat dot com
` (4 preceding siblings ...)
2022-07-28 22:01 ` woodard at redhat dot com
@ 2022-07-29 22:51 ` woodard at redhat dot com
2022-07-29 23:21 ` woodard at redhat dot com
2022-10-14 18:53 ` woodard at redhat dot com
7 siblings, 0 replies; 9+ messages in thread
From: woodard at redhat dot com @ 2022-07-29 22:51 UTC (permalink / raw)
To: libabigail
https://sourceware.org/bugzilla/show_bug.cgi?id=29346
--- Comment #5 from Ben Woodard <woodard at redhat dot com> ---
The second patch that Mark posted in the notes appears to work for at least 4
of the 6 packages.
guile22
guile30
gnucash
aisleriot
The last two haven't completed testing yet and so the results for them is still
uncertain.
gdb-headless
sagemath
At the very least, they do not crash out as soon.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug default/29346] SIGFPE when doing abipkgdiff --self-check of aisleriot-debuginfo-3.22.21-1.fc36.aarch64.rpm
2022-07-09 19:02 [Bug default/29346] New: SIGFPE when doing abipkgdiff --self-check of aisleriot-debuginfo-3.22.21-1.fc36.aarch64.rpm woodard at redhat dot com
` (5 preceding siblings ...)
2022-07-29 22:51 ` woodard at redhat dot com
@ 2022-07-29 23:21 ` woodard at redhat dot com
2022-10-14 18:53 ` woodard at redhat dot com
7 siblings, 0 replies; 9+ messages in thread
From: woodard at redhat dot com @ 2022-07-29 23:21 UTC (permalink / raw)
To: libabigail
https://sourceware.org/bugzilla/show_bug.cgi?id=29346
--- Comment #6 from Ben Woodard <woodard at redhat dot com> ---
gdb-headless and sagemath timed out at 60min this very likely could be an
unrelated problem.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug default/29346] SIGFPE when doing abipkgdiff --self-check of aisleriot-debuginfo-3.22.21-1.fc36.aarch64.rpm
2022-07-09 19:02 [Bug default/29346] New: SIGFPE when doing abipkgdiff --self-check of aisleriot-debuginfo-3.22.21-1.fc36.aarch64.rpm woodard at redhat dot com
` (6 preceding siblings ...)
2022-07-29 23:21 ` woodard at redhat dot com
@ 2022-10-14 18:53 ` woodard at redhat dot com
7 siblings, 0 replies; 9+ messages in thread
From: woodard at redhat dot com @ 2022-10-14 18:53 UTC (permalink / raw)
To: libabigail
https://sourceware.org/bugzilla/show_bug.cgi?id=29346
Ben Woodard <woodard at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #7 from Ben Woodard <woodard at redhat dot com> ---
This appears to be fixed in 2.1
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-10-14 18:53 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-09 19:02 [Bug default/29346] New: SIGFPE when doing abipkgdiff --self-check of aisleriot-debuginfo-3.22.21-1.fc36.aarch64.rpm woodard at redhat dot com
2022-07-09 20:13 ` [Bug default/29346] " mark at klomp dot org
2022-07-09 20:29 ` mark at klomp dot org
2022-07-20 9:35 ` mark at klomp dot org
2022-07-26 20:17 ` woodard at redhat dot com
2022-07-28 22:01 ` woodard at redhat dot com
2022-07-29 22:51 ` woodard at redhat dot com
2022-07-29 23:21 ` woodard at redhat dot com
2022-10-14 18:53 ` woodard at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).