Bug 1560010

Summary: Assertion `SYMBOL_LANGUAGE (sym) == DICT_LANGUAGE (dict)->la_language' failed.
Product: [Fedora] Fedora Reporter: Cédric Bellegarde <cedric.bellegarde>
Component: gdbAssignee: Keith Seitz <keiths>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 29CC: ahmadsamir3891, bugzilla, danstiner, digitalfreak, fedora, jan.kratochvil, jeremy.linton, keiths, kevinb, kevin, kloczko.tomasz, krinkodot22, luferrar, mcatanzaro+wrong-account-do-not-cc, mikhail.v.gavrilov, nfink95, papadopoulo, pmuldoon, sergiodj, stransky, tcfxfzoi, tony, tylervollbooks
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gdb-8.2-6.fc29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1560294 (view as bug list) Environment:
Last Closed: 2019-01-14 01:58:03 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:
Bug Depends On:    
Bug Blocks: 1560294    
Attachments:
Description Flags
bt full
none
File: backtrace none

Description Cédric Bellegarde 2018-03-23 17:33:45 UTC
Created attachment 1412223 [details]
bt full

Description of problem:

gdb segfaults while trying to get backtrace for:
- https://bugs.webkit.org/show_bug.cgi?id=183890
- https://bugs.webkit.org/show_bug.cgi?id=183197

Version-Release number of selected component (if applicable):
gdb-8.1-11.fc28.x86_64

Message:
Assertion `SYMBOL_LANGUAGE (sym) == DICT_LANGUAGE (dict)->la_language' failed.

Backtrace as attachment.

Comment 1 Keith Seitz 2018-03-23 17:43:38 UTC
Do you have a reproducer for this?

Comment 2 Cédric Bellegarde 2018-03-23 18:49:48 UTC
I have:

/var/lib/systemd/coredump/core.eolie.1000.86ce4399ed244bd8b01cf265874d31eb.3550.1521703974000000.lz4

Comment 4 Cédric Bellegarde 2018-03-24 16:04:44 UTC
Happen everytime I run:

thread apply all bt full

Comment 5 Keith Seitz 2018-03-24 16:36:34 UTC
If you can provide me with an executable and instructions on how to reproduce it, I am most interested in this bug. Unfortunately, a core dump isn't particularly helpful. This is a very odd assertion. [It is not a segfault -- GDB is asserting.]

Comment 6 Cédric Bellegarde 2018-03-24 18:57:33 UTC
Using epiphany for some days as default browser should allow you to get something useful ;)

Comment 7 Jan Kratochvil 2018-03-24 19:23:45 UTC
mkdir rhbz1560010;cd rhbz1560010;wget https://kojipkgs.fedoraproject.org//packages/webkit2gtk3/2.20.0/2.fc28/x86_64/webkit2gtk3-debuginfo-2.20.0-2.fc28.x86_64.rpm;rpm2cpio webkit2gtk3-debuginfo-2.20.0-2.fc28.x86_64.rpm|cpio -id;gdb -readnow ./usr/lib/debug/usr/lib64/libwebkit2gtk-4.0.so.37.28.0-2.20.0-2.fc28.x86_64.debug

Reading symbols from ./usr/lib/debug/usr/lib64/libwebkit2gtk-4.0.so.37.28.0-2.20.0-2.fc28.x86_64.debug...expanding to full symbols...../../gdb/dictionary.c:690: internal-error: void insert_symbol_hashed(dictionary*, symbol*): Assertion `SYMBOL_LANGUAGE (sym) == DICT_LANGUAGE (dict)->la_language' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) _

PASS: gdb-8.0.1-36.fc27.x86_64
FAIL: gdb-8.1-11.fc28.x86_64

Comment 8 Keith Seitz 2018-03-27 18:28:30 UTC
Bug verified, "moving" to upstream:
https://sourceware.org/bugzilla/show_bug.cgi?id=23010

This Fedora bug is for tracking purposes only.

Comment 9 Jan Kratochvil 2018-03-29 21:43:43 UTC
*** Bug 1562211 has been marked as a duplicate of this bug. ***

Comment 10 Jan Kratochvil 2018-05-02 17:38:33 UTC
*** Bug 1574015 has been marked as a duplicate of this bug. ***

Comment 11 Keith Seitz 2018-05-17 17:58:09 UTC
Patch committed for this upstream:

commit 58f0c71853f98afe623ab89c4362682885905ebb
Author: Tom Tromey <tom>
Date:   Thu Apr 12 08:24:41 2018 -0600

    Fix for dwz-related crash
    
    PR symtab/23010 reports a crash that occurs when using -readnow
    on a dwz-generated debuginfo file.

Confirmed that the reproducer from Jan is fixed by this patch.

Comment 12 Sergio Durigan Junior 2018-05-17 20:28:07 UTC
Reopening because the patch will be backported to Fedora GDB, and Bodhi will close the bug later.

Comment 13 Tyler Voll 2018-05-18 15:43:13 UTC
Similar problem has been detected:

I was having issues with my network, I had accidentally changed both my modem and my router to bridged connections. 
I tried to connect my laptop directly to my modem in order to make changes to my modem's settings (to put it back to routed), but no matter what, Gnome kept crashing as soon as I connected directly to my modem with my laptop.
The issue stopped as soon as I was able to reset the modem's setting manually (after holding down the reset button for 15 seconds, this defaulted the modem back to routed).

reporter:       libreport-2.9.5
backtrace_rating: 4
cmdline:        /usr/libexec/gdb -batch -iex add-auto-load-safe-path /var/cache/abrt-di/usr/lib/debug -iex add-auto-load-scripts-directory /var/cache/abrt-di/usr/lib/debug -ex set debug-file-directory /usr/lib/debug:/var/cache/abrt-di/usr/lib/debug -ex file /usr/bin/gnome-shell -ex core-file ./coredump -ex thread apply all -ascending backtrace 1024 full -ex info sharedlib -ex print (char*)__abort_msg -ex print (char*)__glib_assert_msg -ex info all-registers -ex disassemble
crash_function: dump_core
executable:     /usr/libexec/gdb
journald_cursor: s=7c949e80a9334254bdf8190b91bbb1ba;i=278d6;b=eac10c1a5257418f94df8e35ac4a98f4;m=f378a5f5;t=56c7b21cba1a0;x=829688bc3c856685
kernel:         4.16.8-300.fc28.x86_64
package:        gdb-headless-8.1-15.fc28
reason:         gdb killed by SIGABRT
rootdir:        /
runlevel:       N 5
type:           CCpp
uid:            1000

Comment 14 Tyler Voll 2018-05-18 15:43:18 UTC
Created attachment 1438732 [details]
File: backtrace

Comment 15 Keith Seitz 2018-06-03 13:26:19 UTC
*** Bug 1585467 has been marked as a duplicate of this bug. ***

Comment 16 kevin 2018-06-05 02:50:32 UTC
Similar problem has been detected:

While trying to report another crash, the "Crash Reporting Assistant" failed and says "The debugger has quit unexpectedly." and then this gdb crash came up.

reporter:       libreport-2.9.5
backtrace_rating: 4
cmdline:        /usr/bin/gdb -nw -n -batch -x /tmp/drkonqi.iMSPal -p 10187 /usr/bin/kdenlive
crash_function: dump_core
executable:     /usr/libexec/gdb
journald_cursor: s=fba2e101d2484955b35034eaab958c06;i=411e3a;b=80f11dec44e94273a7763a19428f0638;m=1428326a4;t=56ddc0b7e1b76;x=21c6e444b532a7b
kernel:         4.16.13-300.fc28.x86_64
package:        gdb-headless-8.1-15.fc28
reason:         gdb killed by SIGABRT
rootdir:        /
runlevel:       N 5
type:           CCpp
uid:            1000

Comment 17 Michael Catanzaro 2018-07-01 19:02:53 UTC
*** Bug 1582034 has been marked as a duplicate of this bug. ***

Comment 18 krinkodot22 2018-07-08 17:56:47 UTC
Similar problem has been detected:

GDB crashed while trying to debug gnome-shell.

Steps to reproduce:

1. Copy the ~/bin/xenv.sh script from https://wiki.gnome.org/Projects/GnomeShell/Debugging .
2. Log in to a Gnome on Xorg session.
3. Log in to a virtual terminal and source ~/bin/xenv.sh.
4. Run `gdb --args /usr/bin/gnome-shell --replace` and run gnome-shell.
5. Switch back to the VT running the graphical session, and then back to the VT running gdb.
6. Install all the debuginfo packages that gdb requests, and then repeat steps 4 & 5.

Expected results:
Either gdb should be running normally, or it should have caught a segfault (due to https://gitlab.gnome.org/GNOME/gnome-shell/issues/398).

Actual results:
gdb crashes with this internal error.

This crash likely depends on the gnome-shell issue I linked to, so I'm not sure how reproducable it will be...

reporter:       libreport-2.9.5
backtrace_rating: 4
cmdline:        gdb --args /usr/bin/gnome-shell --replace
crash_function: dump_core
executable:     /usr/libexec/gdb
journald_cursor: s=708391902a0b4eb8bdc1f55ca61541b3;i=212871;b=b643b10fc08a449281d6e11b2d337d30;m=188b86097;t=570800629143a;x=6ba5af36817aa046
kernel:         4.17.3-200.fc28.x86_64
package:        gdb-headless-8.1-19.fc28
reason:         gdb killed by SIGABRT
rootdir:        /
runlevel:       N 5
type:           CCpp
uid:            1000

Comment 19 Sergio Durigan Junior 2018-07-25 22:04:43 UTC
Patch has been pushed upstream:

commit 380618d68a2b4ee60cebf3941d11a5af4e0aeee0
Author: Keith Seitz <keiths>
Date:   Tue Jul 24 12:48:58 2018 -0700

    Set CU language before processing any DIEs (symtab/23010 et al)

I'll release a new F28 GDB with the patch soon.

Comment 20 Fedora Update System 2018-07-26 00:06:19 UTC
gdb-8.1-25.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-3ae24ddb5f

Comment 21 Fedora Update System 2018-07-26 16:33:26 UTC
gdb-8.1-25.fc28 has been pushed to the Fedora 28 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-2018-3ae24ddb5f

Comment 22 Fedora Update System 2018-07-31 18:04:09 UTC
gdb-8.1-25.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 23 Théodore Papadopoulo 2018-08-16 15:53:43 UTC
Similar problem has been detected:

Using gdb on a C++ program and trying to print the content of an stringstream structure. Well if I remember correctly.

reporter:       libreport-2.9.5
backtrace_rating: 4
cmdline:        gdb bin/EEGOReader
crash_function: dump_core
executable:     /usr/libexec/gdb
journald_cursor: s=027367fcf2e248a385d59e5d0986cafc;i=e6f5b;b=1ca6e5ba604b419983b05a0ef3884013;m=8d563de15a;t=5736862f1b66f;x=a6c103c3e73273bf
kernel:         4.17.9-200.fc28.x86_64
package:        gdb-headless-8.1.1-3.fc28
reason:         gdb killed by SIGABRT
rootdir:        /
runlevel:       N 5
type:           CCpp
uid:            19049

Comment 24 Sergio Durigan Junior 2018-08-16 16:00:47 UTC
I'm reopening this bug.

Comment 25 Sergio Durigan Junior 2018-11-29 17:47:09 UTC
*** Bug 1654593 has been marked as a duplicate of this bug. ***

Comment 26 Keith Seitz 2019-01-08 21:08:51 UTC
*** Bug 1663875 has been marked as a duplicate of this bug. ***

Comment 27 Keith Seitz 2019-01-08 21:13:24 UTC
For the record, there are many bugs that are similar to this one that we have been adding as dups of this bug. The majority of these bugs now give a slightly different assertion:

Reading symbols from ../../obj3/gcc/build/genchecksum...done.
../../gdb/dwarf2read.c:9730: internal-error: void dw2_add_symbol_to_list(symbol*, pending**): Assertion `(*listhead) == NULL || (SYMBOL_LANGUAGE ((*listhead)->symbol[0]) == SYMBOL_LANGUAGE (symbol))' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) 

This assertion was added with the original patch for this bug. If you use LTO, you will likely hit one of the assertions listed in this bug.

There is a new upstream patch submitted for this:
https://sourceware.org/ml/gdb-patches/2018-11/msg00138.html

Comment 28 Fedora Update System 2019-01-11 17:47:04 UTC
gdb-8.2-6.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-c4ff3ce3fb

Comment 29 Sergio Durigan Junior 2019-01-11 17:48:17 UTC
I've pushed an update to F29 GDB containing the patch.  Initially, I don't plan to update F28 GDB.  Please let me know if you would like to do that.

Thanks.

Comment 30 Fedora Update System 2019-01-12 02:30:57 UTC
gdb-8.2-6.fc29 has been pushed to the Fedora 29 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-c4ff3ce3fb

Comment 31 Fedora Update System 2019-01-14 01:58:03 UTC
gdb-8.2-6.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 32 Sergio Durigan Junior 2019-05-16 18:31:35 UTC
*** Bug 1544195 has been marked as a duplicate of this bug. ***

Comment 33 Sergio Durigan Junior 2019-05-16 18:40:01 UTC
*** Bug 1579554 has been marked as a duplicate of this bug. ***

Comment 34 Rafal Luzynski 2019-05-21 14:35:03 UTC
Similar problem has been detected:

I was debugging a program in Eclipse. I am not sure why this happened, it happened only once. Otherwise the debugger works fine.

reporter:       libreport-2.9.5
backtrace_rating: 4
cmdline:        gdb --interpreter mi2 --nx -q --interpreter console -ex new-ui mi /dev/pts/1 -ex set pagination off -ex show version
crash_function: dump_core
executable:     /usr/libexec/gdb
journald_cursor: s=741268fc7b644525b34f7653c433ac8a;i=76f0;b=86c98d69303c4558be8e785401ac3e2d;m=27627428f;t=5896692c8e6b0;x=f2c0f6df03adf901
kernel:         5.0.16-100.fc28.x86_64
package:        gdb-headless-8.1.1-4.fc28
reason:         gdb killed by SIGABRT
rootdir:        /
runlevel:       N 5
type:           CCpp
uid:            500

Comment 35 Sergio Durigan Junior 2019-05-21 15:08:27 UTC
(In reply to Rafal Luzynski from comment #34)
> Similar problem has been detected:
> 
> I was debugging a program in Eclipse. I am not sure why this happened, it
> happened only once. Otherwise the debugger works fine.
> 
> reporter:       libreport-2.9.5
> backtrace_rating: 4
> cmdline:        gdb --interpreter mi2 --nx -q --interpreter console -ex
> new-ui mi /dev/pts/1 -ex set pagination off -ex show version
> crash_function: dump_core
> executable:     /usr/libexec/gdb
> journald_cursor:
> s=741268fc7b644525b34f7653c433ac8a;i=76f0;b=86c98d69303c4558be8e785401ac3e2d;
> m=27627428f;t=5896692c8e6b0;x=f2c0f6df03adf901
> kernel:         5.0.16-100.fc28.x86_64
> package:        gdb-headless-8.1.1-4.fc28
> reason:         gdb killed by SIGABRT
> rootdir:        /
> runlevel:       N 5
> type:           CCpp
> uid:            500

Please update your GDB, this bug has been fixed already.

Thanks.