public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [Bug libdw/30980] New: offline.c:53: dwfl_offline_section_address: Assertion `mod->e_type == ET_REL' failed.
@ 2023-10-18 13:44 cebtenzzre at gmail dot com
  2023-10-18 13:57 ` [Bug libdw/30980] " mark at klomp dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: cebtenzzre at gmail dot com @ 2023-10-18 13:44 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=30980

            Bug ID: 30980
           Summary: offline.c:53: dwfl_offline_section_address: Assertion
                    `mod->e_type == ET_REL' failed.
           Product: elfutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libdw
          Assignee: unassigned at sourceware dot org
          Reporter: cebtenzzre at gmail dot com
                CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

Created attachment 15181
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15181&action=edit
The file that elfutils crashes on while trying to read debug info.

I ran into this crash while systemd-coredump was trying to process a coredump
from evolution.


evolution backtrace:

#0  0x0000000000000000 in  ()
#1  0x00007f8d92ec6ba1 in compute_next_step (assistant=0x55a0bfe3ea60)
    at ../gtk/gtk/gtkassistant.c:1035
#2  gtk_assistant_next_page (assistant=0x55a0bfe3ea60) at
../gtk/gtk/gtkassistant.c:1610
#3  0x00007f8d7a34ad5e in  () at /usr/lib/evolution/libevolution-mail.so
#4  0x00007f8d8e356252 in e_simple_async_result_complete ()
    at /usr/lib/evolution/libevolution-util.so
#5  0x00007f8d8e3562b9 in  () at /usr/lib/evolution/libevolution-util.so
#6  0x00007f8d93834f19 in g_main_dispatch (context=0x55a0be1fefc0)
    at ../glib/glib/gmain.c:3476
#7  0x00007f8d938932b7 in g_main_context_dispatch_unlocked
(context=0x55a0be1fefc0)
    at ../glib/glib/gmain.c:4284
#8  g_main_context_iterate_unlocked.isra.0
    (context=0x55a0be1fefc0, block=block@entry=1, dispatch=dispatch@entry=1,
self=<optimized out>) at ../glib/glib/gmain.c:4349
#9  0x00007f8d93835b47 in g_main_loop_run (loop=0x55a0bed6cde0)
    at ../glib/glib/gmain.c:4551
#10 0x00007f8d930337ed in gtk_main () at ../gtk/gtk/gtkmain.c:1329
#11 0x000055a0bcea857f in main ()


elfutils backtrace:

#5  0x00007fb1fae54d26 in __assert_fail
(assertion=assertion@entry=0x7fb1fa4e1c30 "mod->e_type == ET_REL",
file=file@entry=0x7fb1fa4e1c26 "offline.c", line=line@entry=53, 
    function=function@entry=0x7fb1fa4fded0 <__PRETTY_FUNCTION__.0.lto_priv.43>
"dwfl_offline_section_address") at assert.c:101
#6  0x00007fb1fa4c3c30 in dwfl_offline_section_address (mod=<optimized out>,
userdata=<optimized out>, modname=<optimized out>, base=<optimized out>,
secname=<optimized out>, 
    shndx=<optimized out>, shdr=0x7fff255196b0, addr=0x7fff255196c0) at
../libdwfl/offline.c:53
#7  0x00007fb1fa4c859c in __libdwfl_relocate_value
(mod=mod@entry=0x5624c5cd80d0, elf=elf@entry=0x5624c605dc30,
shstrndx=shstrndx@entry=0x7fff25519760, shndx=4, 
    value=value@entry=0x7fff25519768) at ../libdwfl/relocate.c:72
#8  0x00007fb1fa4c8772 in find_elf_build_id (mod=mod@entry=0x5624c5cd80d0,
e_type=1, elf=elf@entry=0x5624c605dc30,
build_id_bits=build_id_bits@entry=0x7fff25519890, 
    build_id_elfaddr=build_id_elfaddr@entry=0x7fff25519888,
build_id_len=build_id_len@entry=0x7fff25519884) at
../libdwelf/dwelf_elf_gnu_build_id.c:113
#9  0x00007fb1fa4c88e3 in __libdwfl_find_elf_build_id
(mod=mod@entry=0x5624c5cd80d0, elf=0x5624c605dc30,
build_id_bits=build_id_bits@entry=0x7fff25519890, 
    build_id_elfaddr=build_id_elfaddr@entry=0x7fff25519888,
build_id_len=build_id_len@entry=0x7fff25519884) at
../libdwelf/dwelf_elf_gnu_build_id.c:142
#10 0x00007fb1fa4c8992 in __libdwfl_find_build_id
(mod=mod@entry=0x5624c5cd80d0, set=set@entry=false, elf=<optimized out>) at
../libdwfl/dwfl_module_build_id.c:70
#11 0x00007fb1fa4c939e in validate (debuglink_crc=<optimized out>,
check=<optimized out>, fd=<optimized out>, mod=0x5624c5cd80d0) at
../libdwfl/find-debuginfo.c:141
#12 find_debuginfo_in_path (mod=mod@entry=0x5624c5cd80d0,
file_name=file_name@entry=0x5624c5cd82b0
"/usr/lib/libjavascriptcoregtk-4.1.so.0", 
    debuglink_file=debuglink_file@entry=0x7faf25bbedc8 "crti.o.debug",
debuglink_crc=debuglink_crc@entry=465747295,
debuginfo_file_name=debuginfo_file_name@entry=0x5624c5cd8128)
    at ../libdwfl/find-debuginfo.c:326
#13 0x00007fb1fa4ccfc0 in dwfl_standard_find_debuginfo (mod=0x5624c5cd80d0,
userdata=<optimized out>, modname=<optimized out>, base=<optimized out>, 
    file_name=0x5624c5cd82b0 "/usr/lib/libjavascriptcoregtk-4.1.so.0",
debuglink_file=0x7faf25bbedc8 "crti.o.debug", debuglink_crc=465747295,
debuginfo_file_name=0x5624c5cd8128)
    at ../libdwfl/find-debuginfo.c:386
#14 0x00007fb1fa4c5b83 in find_debuginfo (mod=mod@entry=0x5624c5cd80d0) at
../libdwfl/dwfl_module_getdwarf.c:538
#15 0x00007fb1fa4cfa60 in find_dw (mod=0x5624c5cd80d0) at
../libdwfl/dwfl_module_getdwarf.c:1412
#16 dwfl_module_getdwarf (mod=mod@entry=0x5624c5cd80d0, bias=0x7fff25519b88) at
../libdwfl/dwfl_module_getdwarf.c:1446
#17 0x00007fb1fa4d8bd8 in dwfl_module_addrdie (mod=0x5624c5cd80d0,
addr=140245923026755, bias=<optimized out>) at
../libdwfl/dwfl_module_addrdie.c:38
#18 0x00007fb1fb0ed9e9 in frame_callback (frame=<optimized out>,
userdata=0x7fff25519e50) at ../systemd-stable/src/shared/elf-util.c:203
#19 0x00007fb1fa4de175 in dwfl_thread_getframes (thread=0x7fff25519ce0,
callback=0x7fb1fb0ed920 <frame_callback>, arg=0x7fff25519e50) at
../libdwfl/dwfl_frame.c:428
#20 0x00007fb1fb0edd08 in thread_callback (thread=0x7fff25519ce0,
userdata=0x7fff25519e50) at ../systemd-stable/src/shared/elf-util.c:262
#21 0x00007fb1fa4d4275 in dwfl_getthreads (dwfl=0x5624c5a791b0,
callback=0x7fb1fb0edc90 <thread_callback>, arg=0x7fff25519e50) at
../libdwfl/dwfl_frame.c:284
#22 0x00007fb1fb0f3e44 in parse_core (ret_package_metadata=<optimized out>,
ret=<optimized out>, executable=<optimized out>, fd=<optimized out>)
    at ../systemd-stable/src/shared/elf-util.c:619
#23 parse_elf (ret_package_metadata=0x7fff25519db8, ret=<optimized out>,
executable=<optimized out>, fd=<optimized out>) at
../systemd-stable/src/shared/elf-util.c:665
#24 parse_elf_object (fd=fd@entry=6, executable=0x5624c5a6b41d
"/usr/bin/evolution", fork_disable_dump=<optimized out>,
ret=ret@entry=0x7fff25519fa8, 
    ret_package_metadata=ret_package_metadata@entry=0x7fff25519fb0) at
../systemd-stable/src/shared/elf-util.c:810
#25 0x00005624c4125ff4 in submit_coredump
(context=context@entry=0x7fff2551a5e0, iovw=iovw@entry=0x7fff2551a560,
input_fd=input_fd@entry=5) at ../systemd-stable/src/coredump/coredump.c:897
#26 0x00005624c41285f2 in process_socket (fd=3) at
../systemd-stable/src/coredump/coredump.c:1134
#27 0x00005624c411fc31 in run (argv=0x7fff2551a838, argc=1) at
../systemd-stable/src/coredump/coredump.c:1522
#28 main (argc=1, argv=0x7fff2551a838) at
../systemd-stable/src/coredump/coredump.c:1528


The crash happens while elfutils tries to call dwfl_offline_section_address on
/usr/lib/libjavascriptcoregtk-4.1.so.0. That function is expecting a
relocatable file (ET_REL), but that is a shared object (ET_DYN).

A copy of that file is attached.

Downstream bug report: https://github.com/systemd/systemd/issues/29585

-- 
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:[~2023-11-02 13:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-18 13:44 [Bug libdw/30980] New: offline.c:53: dwfl_offline_section_address: Assertion `mod->e_type == ET_REL' failed cebtenzzre at gmail dot com
2023-10-18 13:57 ` [Bug libdw/30980] " mark at klomp dot org
2023-10-18 14:01 ` mark at klomp dot org
2023-10-18 14:19 ` mark at klomp dot org
2023-10-18 14:26 ` mark at klomp dot org
2023-10-25  3:21 ` sam at gentoo dot org
2023-11-01 23:36 ` amerey at redhat dot com
2023-11-02 12:17 ` mark at klomp dot org
2023-11-02 13:44 ` amerey 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).