Bug 2278106

Summary: [abrt] binutils: elf_link_is_defined_archive_symbol(): ld.bfd killed by SIGSEGV
Product: [Fedora] Fedora Reporter: Benjamin Gilbert <bgilbert>
Component: binutilsAssignee: Benjamin Gilbert <bgilbert>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 40CC: bgilbert, dvlasenk, fweimer, jakub, josmyers, nickc, sipoyare, yahmad
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/ed92ec351872e39d043b61f277e6e63ed879766
Whiteboard: abrt_hash:816a3864fa66f3d2e37abe1cdf85a99579f47c74;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-05-11 04:14:47 UTC Type: ---
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
File: proc_pid_status
none
File: environ
none
File: cpuinfo
none
File: maps
none
File: open_fds
none
File: os_info
none
File: mountinfo
none
File: limits
none
File: core_backtrace
none
File: dso_list
none
File: exploitable
none
File: backtrace none

Description Benjamin Gilbert 2024-05-01 07:05:59 UTC
Description of problem:
I tried to build OpenSlide with sanitizers enabled, using OpenSlide's wrapper tool for this.  This worked fine on Fedora 39.  To reproduce:

dnf install -y git-core meson pkg-config python3 python3-requests python3-pyyaml diffutils zlib-devel libpng-devel libjpeg-turbo-devel libtiff-devel openjpeg2-devel gdk-pixbuf2-modules gdk-pixbuf2-devel libdicom-devel libxml2-devel sqlite-devel cairo-devel glib2-devel clang llvm
git clone https://github.com/openslide/openslide
cd openslide
meson setup build
cd build
ninja
test/driver sanitize

Version-Release number of selected component:
binutils-2.41-34.fc40

Additional info:
reporter:       libreport-2.17.15
runlevel:       N 5
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-org.gnome.Terminal.slice/vte-spawn-41345979-a590-47c4-9176-4fb5d72f4e29.scope
rootdir:        /
journald_cursor: s=653ac92871be4b06a24448959f584fbd;i=3de6046;b=23e8a6c67db0472084df408f3cc7bd2b;m=925a3edfa8;t=6175de2537565;x=faefe70a6eeca340
type:           CCpp
kernel:         6.8.7-300.fc40.x86_64
executable:     /usr/bin/ld.bfd
package:        binutils-2.41-34.fc40
reason:         ld.bfd killed by SIGSEGV
backtrace_rating: 4
crash_function: elf_link_is_defined_archive_symbol
cmdline:        /usr/bin/ld --hash-style=gnu --build-id --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o test/mosaic /usr/bin/../lib/gcc/x86_64-redhat-linux/14/../../../../lib64/crt1.o /usr/bin/../lib/gcc/x86_64-redhat-linux/14/../../../../lib64/crti.o /usr/bin/../lib/gcc/x86_64-redhat-linux/14/crtbegin.o -L/usr/bin/../lib/clang/18/lib/x86_64-redhat-linux-gnu -L/usr/bin/../lib/gcc/x86_64-redhat-linux/14 -L/usr/bin/../lib/gcc/x86_64-redhat-linux/14/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/lib -L/usr/lib -plugin /usr/bin/../lib64/LLVMgold.so -plugin-opt=mcpu=x86-64 --whole-archive /usr/bin/../lib/clang/18/lib/x86_64-redhat-linux-gnu/libclang_rt.asan_static.a --no-whole-archive --whole-archive /usr/bin/../lib/clang/18/lib/x86_64-redhat-linux-gnu/libclang_rt.asan.a --no-whole-archive --dynamic-list=/usr/bin/../lib/clang/18/lib/x86_64-redhat-linux-gnu/libclang_rt.asan.a.syms test/mosaic.p/mosaic.c.o --as-needed --no-undefined --no-undefined -z undefs -rpath $'$ORIGIN/../src' -rpath-link /home/bgilbert/openslide/openslide/build/build-qzjtbn88/src --start-group src/libopenslide.so.1.0.0 common/libopenslide-common.a /usr/lib64/libglib-2.0.so /usr/lib64/libcairo.so --end-group --no-as-needed -lpthread -lrt -lm -ldl -lresolv -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/bin/../lib/gcc/x86_64-redhat-linux/14/crtend.o /usr/bin/../lib/gcc/x86_64-redhat-linux/14/../../../../lib64/crtn.o
uid:            1000

Truncated backtrace:
Thread no. 1 (5 frames)
 #0 elf_link_is_defined_archive_symbol at ../../bfd/elflink.c:3574
 #1 elf_link_add_archive_symbols at ../../bfd/elflink.c:6078
 #2 load_symbols at ../../ld/ldlang.c:3098
 #3 open_input_bfds at ../../ld/ldlang.c:3587
 #5 lang_process at ../../ld/ldlang.c:8115

Comment 1 Benjamin Gilbert 2024-05-01 07:06:02 UTC
Created attachment 2030533 [details]
File: proc_pid_status

Comment 2 Benjamin Gilbert 2024-05-01 07:06:04 UTC
Created attachment 2030534 [details]
File: environ

Comment 3 Benjamin Gilbert 2024-05-01 07:06:05 UTC
Created attachment 2030536 [details]
File: cpuinfo

Comment 4 Benjamin Gilbert 2024-05-01 07:06:06 UTC
Created attachment 2030538 [details]
File: maps

Comment 5 Benjamin Gilbert 2024-05-01 07:06:08 UTC
Created attachment 2030540 [details]
File: open_fds

Comment 6 Benjamin Gilbert 2024-05-01 07:06:09 UTC
Created attachment 2030542 [details]
File: os_info

Comment 7 Benjamin Gilbert 2024-05-01 07:06:10 UTC
Created attachment 2030544 [details]
File: mountinfo

Comment 8 Benjamin Gilbert 2024-05-01 07:06:12 UTC
Created attachment 2030546 [details]
File: limits

Comment 9 Benjamin Gilbert 2024-05-01 07:06:13 UTC
Created attachment 2030548 [details]
File: core_backtrace

Comment 10 Benjamin Gilbert 2024-05-01 07:06:14 UTC
Created attachment 2030550 [details]
File: dso_list

Comment 11 Benjamin Gilbert 2024-05-01 07:06:16 UTC
Created attachment 2030551 [details]
File: exploitable

Comment 12 Benjamin Gilbert 2024-05-01 07:06:17 UTC
Created attachment 2030552 [details]
File: backtrace

Comment 13 Benjamin Gilbert 2024-05-01 07:15:28 UTC
If `test/driver sanitize` finishes the build and gets to the "Fetching Aperio/CMU-1.svs" stage, the problem didn't occur.

Comment 14 Benjamin Gilbert 2024-05-04 11:37:50 UTC
A workaround is to link with lld instead of ld.bfd.