Bug 1713762 - gdb crash when loading Intel Fortran debug symbol
Summary: gdb crash when loading Intel Fortran debug symbol
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Developer Toolset
Classification: Red Hat
Component: gdb
Version: DTS 8.1 RHEL 7
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: alpha
: 8.1
Assignee: Keith Seitz
QA Contact: Michal Kolar
URL:
Whiteboard:
Depends On:
Blocks: 1934673
TreeView+ depends on / blocked
 
Reported: 2019-05-24 18:24 UTC by Piyush Bhoot
Modified: 2023-03-24 14:55 UTC (History)
9 users (show)

Fixed In Version: gdb-8.3-3.el[67]
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1934673 (view as bug list)
Environment:
Last Closed: 2019-12-10 07:50:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker DTS-85 0 None None None 2023-03-24 14:55:12 UTC
Red Hat Product Errata RHEA-2019:4140 0 None None None 2019-12-10 07:50:20 UTC

Description Piyush Bhoot 2019-05-24 18:24:04 UTC
Description of problem:
It seems that Fortran compiler is emitting incorrect symbol/debug information or the debugger is failing at parsing those

Every time we have to load debug symbol generated by Intel Fortran


Version-Release number of selected component (if applicable):
devtoolset-8-gdb-8.2-2.el7.x86_64

How reproducible:

sh-4.2$ gdb gdb
GNU gdb (GDB) Red Hat Enterprise Linux 8.2-2.el7
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from gdb...Reading symbols from .gnu_debugdata for /opt/rh/devtoolset-8/root/usr/bin/gdb...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Missing separate debuginfos, use: debuginfo-install devtoolset-8-gdb-8.2-2.el7.x86_64
(gdb) r /mnt/data/svc_certif_R422_fortran19/linux_a64/code/bin/EncryptDecrypt
Starting program: /opt/rh/devtoolset-8/root/usr/bin/gdb /mnt/data/svc_certif_R422_fortran19/linux_a64/code/bin/EncryptDecrypt
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[Detaching after vfork from child process 43116]
GNU gdb (GDB) Red Hat Enterprise Linux 8.2-2.el7
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /mnt/data/svc_certif_R422_fortran19/linux_a64/code/bin/EncryptDecrypt...Reading symbols from /mnt/data/svc_certif_R422_fortran19/linux_a64/code/bin/EncryptDecrypt.pdb...done.
done.
(gdb) r
Starting program: /mnt/data/svc_certif_R422_fortran19/linux_a64/code/bin/EncryptDecrypt
[Detaching after vfork from child process 43120]
[Detaching after fork from child process 43121]
[Detaching after fork from child process 43123]
Missing separate debuginfos, use: debuginfo-install glibc-2.17-260.el7.x86_64

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff57de901 in __strlen_sse2_pminub () from /lib64/libc.so.6
(gdb) bt
#0  0x00007ffff57de901 in __strlen_sse2_pminub () from /lib64/libc.so.6
#1  0x0000000000619248 in add_partial_symbol(partial_die_info*, dwarf2_cu*) ()
#2  0x0000000000619713 in scan_partial_symbols(partial_die_info*, unsigned long*, unsigned long*, int, dwarf2_cu*) ()
#3  0x000000000061be56 in process_psymtab_comp_unit_reader(die_reader_specs const*, unsigned char const*, die_info*, int, void*) ()
#4  0x000000000060ea4c in init_cutu_and_read_dies(dwarf2_per_cu_data*, abbrev_table*, int, int, bool, void (*)(die_reader_specs const*, unsigned char const*, die_info*, int, void*), void*) ()
#5  0x000000000061261b in process_psymtab_comp_unit(dwarf2_per_cu_data*, int, language) ()
#6  0x000000000061fbf0 in dwarf2_build_psymtabs(objfile*) ()
#7  0x00000000006c24dc in require_partial_symbols(objfile*, int) ()
#8  0x00000000007132d5 in read_symbols(objfile*, enum_flags<symfile_add_flag>) ()
#9  0x0000000000712aa3 in symbol_file_add_with_addrs(bfd*, char const*, enum_flags<symfile_add_flag>, std::vector<other_sections, std::allocator<other_sections> >*, enum_flags<objfile_flag>, objfile*) ()
#10 0x00000000007131c1 in symbol_file_add_separate(bfd*, char const*, enum_flags<symfile_add_flag>, objfile*) ()
#11 0x0000000000527cb3 in elf_symfile_read(objfile*, enum_flags<symfile_add_flag>) ()
#12 0x00000000007132a5 in read_symbols(objfile*, enum_flags<symfile_add_flag>) ()
#13 0x0000000000712aa3 in symbol_file_add_with_addrs(bfd*, char const*, enum_flags<symfile_add_flag>, std::vector<other_sections, std::allocator<other_sections> >*, enum_flags<objfile_flag>, objfile*) ()
#14 0x00000000006fc76f in solib_read_symbols(so_list*, enum_flags<symfile_add_flag>) ()
#15 0x00000000006fd66c in solib_add(char const*, int, int) ()
#16 0x00000000006fd7c8 in handle_solib_event() ()
#17 0x0000000000598a5d in bpstat_stop_status(address_space const*, unsigned long, thread_info*, target_waitstatus const*, bpstats*) ()
#18 0x0000000000673d29 in handle_signal_stop(execution_control_state*) ()
#19 0x0000000000675488 in handle_inferior_event(execution_control_state*) ()
#20 0x0000000000676995 in fetch_inferior_event(void*) ()
#21 0x0000000000631de5 in gdb_wait_for_event(int) ()
#22 0x0000000000631ff8 in gdb_do_one_event() ()
#23 0x000000000063207d in start_event_loop() ()
#24 0x0000000000692328 in captured_command_loop() ()
#25 0x000000000069373d in gdb_main(captured_main_args*) ()
#26 0x00000000004109b1 in main ()

Additional Information:

It seems that Intel provided fixes already, but I can't find upstream information

https://patches-gcc.linaro.org/patch/16052/
https://gdb-patches.sourceware.narkive.com/QdNqGcSq/patch-1-7-dwarf-don-t-add-nameless-modules-to-partial-symbol-table

Comment 8 David Smith 2019-07-09 22:16:46 UTC
Since we've got an accepted upstream patch that seems to fix this issue (https://sourceware.org/ml/gdb-patches/2019-06/msg00220.html), I'm setting devel_ack.

Comment 9 Keith Seitz 2019-08-02 15:40:44 UTC
There is a test included with the patch (gdb/testsuite/gdb.fortran/block-data.exp), but it will
require the Intel Fortran Compiler (ifort) to reproduce. [It will pass w/GCC.] No doc needed.

Comment 11 Michal Kolar 2019-10-24 10:54:53 UTC
Verified sanity only based on comment #7. Should be fixed by 9f73cef commit.

Comment 13 errata-xmlrpc 2019-12-10 07:50:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2019:4140


Note You need to log in before you can comment on or make changes to this bug.