Bug 1715008

Summary: gdb crash
Product: [Fedora] Fedora Reporter: Josef Kubin <jkubin>
Component: gdbAssignee: Sergio Durigan Junior <sergiodj>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 30CC: dsmith, jan.kratochvil, keiths, kevinb, pmuldoon, sergiodj
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: gdb-8.3-3.fc30 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-14 00:53:29 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
coredump none

Description Josef Kubin 2019-05-29 11:10:05 UTC
Created attachment 1574708 [details]
coredump

Description of problem:

# dnf install gdb
# dnf debuginfo-install grub2-tools
# gdb -q --args grub2-install /dev/sda
Reading symbols from grub2-install...
Reading symbols from /usr/lib/debug/usr/sbin/grub2-install-2.02-81.fc30.x86_64.ยป
Segmentation fault (core dumped)

Version-Release number of selected component (if applicable):

# gdb --version
GNU gdb (GDB) Fedora 8.3-2.fc30

# grub2-install --version
grub2-install (GRUB) 2.03

Expected results:

better internal error handling (on possible corrupted debug info)

gdb should write an error message instead of crash
(for example: you have to rebuild something ... because the culprit is something outside of gdb)

Additional info:

# coredumpctl -o gdb.coredump dump /usr/libexec/gdb
           PID: 8466 (gdb)
           UID: 0 (root)
           GID: 0 (root)
        Signal: 11 (SEGV)
     Timestamp: Wed 2019-05-29 12:37:20 CEST (25min ago)
  Command Line: gdb -q --args grub2-install /dev/sda
    Executable: /usr/libexec/gdb
 Control Group: /user.slice/user-0.slice/session-5.scope
          Unit: session-5.scope
         Slice: user-0.slice
       Session: 5
     Owner UID: 0 (root)
       Boot ID: 9d93a50ce0a148dc8df1ca570dd2873f
    Machine ID: 3047f6ad84f7478998e6ea84a5aeb694
      Hostname: F30
       Storage: /var/lib/systemd/coredump/core.gdb.0.9d93a50ce0a148dc8df1ca570dd2873f.8466.1559126240000000.lz4
       Message: Process 8466 (gdb) of user 0 dumped core.
                
                Stack trace of thread 8466:
                #0  0x00007f8c307a2825 __strcmp_avx2 (libc.so.6)
                #1  0x000055c17534774d n/a (gdb)
                #2  0x000055c175673d23 n/a (gdb)
                #3  0x000055c17567422b n/a (gdb)
                #4  0x000055c175347470 n/a (gdb)
                #5  0x000055c175348817 n/a (gdb)
                #6  0x000055c175281917 n/a (gdb)
                #7  0x000055c175281a54 n/a (gdb)
                #8  0x000055c17528210c n/a (gdb)
                #9  0x000055c175298c38 n/a (gdb)
                #10 0x000055c17529d9f8 n/a (gdb)
                #11 0x000055c17529dee6 n/a (gdb)
                #12 0x000055c17529e777 n/a (gdb)
                #13 0x000055c175496a2b n/a (gdb)
                #14 0x000055c175496b83 n/a (gdb)
                #15 0x000055c17537d6a1 n/a (gdb)
                #16 0x000055c17549b197 n/a (gdb)
                #17 0x000055c17549ad89 n/a (gdb)
                #18 0x000055c17549afd3 n/a (gdb)
                #19 0x000055c175488bd6 n/a (gdb)
                #20 0x000055c175348cc8 n/a (gdb)
                #21 0x000055c17534a4a5 n/a (gdb)
                #22 0x000055c175144da0 n/a (gdb)
                #23 0x00007f8c3066ef33 __libc_start_main (libc.so.6)
                #24 0x000055c17514937e n/a (gdb)
More than one entry matches, ignoring rest.

Comment 1 Sergio Durigan Junior 2019-05-29 14:47:07 UTC
Patch submitted: https://sourceware.org/ml/gdb-patches/2019-05/msg00635.html

Comment 2 Fedora Update System 2019-05-30 01:34:11 UTC
FEDORA-2019-22dbeb3c5b has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-22dbeb3c5b

Comment 3 Fedora Update System 2019-05-31 00:53:00 UTC
gdb-8.3-3.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-22dbeb3c5b

Comment 4 Sergio Durigan Junior 2019-06-03 13:32:39 UTC
gdb-8.3.50.20190601-15.fc31 has also been built on Rawhide containing the fix for this.

Comment 5 Fedora Update System 2019-06-14 00:53:29 UTC
gdb-8.3-3.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.