Bug 159919
Summary: | Not possible to GDB WebKitGtk+ 2.13.3: demangler-warning: unable to demangle | ||
---|---|---|---|
Product: | WebKit | Reporter: | Andres Gomez Garcia <agomez> |
Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | CC: | aperez, bugs-noreply, clopez, Hironori.Fujii, jfernandez, mcatanzaro, pnormand |
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
See Also: |
https://bugzilla.redhat.com/show_bug.cgi?id=1377020 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68159 |
Andres Gomez Garcia
I'm using WebKitGtk+ with my own JHBuild setting:
https://github.com/tanty/jhbuild-epiphany/tree/master
Epiphany 3.20.3 and WebKit 2.13.3
I'm running Epiphany with the dconf key:
"process-model" = "shared-secondary-process"
The compilation was done with CMake args:
'-DPORT=GTK -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS_RELEASE="-O0 -g1 -DNDEBUG -DG_DISABLE_CAST_CHECKS" -DCMAKE_CXX_FLAGS_RELEASE="-O0 -g1 -DNDEBUG -DG_DISABLE_CAST_CHECKS"'
When trying to attach with gdb to any of the running processes (epiphany, WebKitNetworkProcess or WebKitWebProcess), I get:
/build/gdb-7.10/gdb/cp-support.c:1595: demangler-warning: unable to demangle '_ZSt7forwardIRZN6WebKit29NetworkConnectionToWebProcess26writeBlobsToTemporaryFilesERKN3WTF6VectorINS2_6StringELm0ENS2_15CrashOnOverflowELm16EEEmEUlRT_E_EOS9_RNSt16remove_referenceIS9_E4typeE' (demangler failed with signal 11)
And the only option is to exit the debugging session.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Andres Gomez Garcia
Compilation and gdb done in current Debian Testing:
$ gdb --version
GNU gdb (Debian 7.10-1.1) 7.10
$ gcc --version
gcc (Debian 5.4.0-4) 5.4.0 20160609
Andres Gomez Garcia
As a workaround in the meanwhile, it is possible to add:
set demangle-style none
Into ~/.gdbinit
Andres Gomez Garcia
Reproducible also with:
$ gdb --version
GNU gdb (Debian 7.11.1-2) 7.11.1
Michael Catanzaro
This is really annoying, but it's clearly a toolchain bug, not a WebKit issue. It's been reported with several different versions of gcc, so we can safely say it's a gdb issue.
Philippe Normand
Possibly related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68383
Carlos Alberto Lopez Perez
I think the issue is this one:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61321
I'm able to reproduce the issue with this test case that comes from <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68159#c4>:
$ echo 'void _ZSt7forwardIRKZN5Write14DataMapGrammarISt20back_insert_iteratorISsEEC4EvEUlRT_E_EOS5_RNSt16remove_referenceIS5_E4typeE() {} int main() {}' | gcc -xc - -o /tmp/a.out && gdb /tmp/a.out
[...]
Reading symbols from /tmp/a.out.../build/gdb-GtCqbH/gdb-7.11.1/gdb/cp-support.c:1595: demangler-warning: unable to demangle '_ZSt7forwardIRKZN5Write14DataMapGrammarISt20back_insert_iteratorISsEEC4EvEUlRT_E_EOS5_RNSt16remove_referenceIS5_E4typeE' (demangler failed with signal 11)
Unable to dump core, use `ulimit -c unlimited' before executing GDB next time.
/build/gdb-GtCqbH/gdb-7.11.1/gdb/cp-support.c:1608: demangler-warning: unable to demangle '_ZSt7forwardIRKZN5Write14DataMapGrammarISt20back_insert_iteratorISsEEC4EvEUlRT_E_EOS5_RNSt16remove_referenceIS5_E4typeE' (demangler failed with signal 11)
Carlos Alberto Lopez Perez
The bug is definitive this one: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68159 and is still present in last GDB git master.
I tried using lldb (LLVM debugger) and its also crashing (segfaults)...
So... at least on my environment I'm complete unable to use a debugger on current trunk of WebKit with Debug builds.
Is anybody here able to work with gdb/llvdb and debug builds?
Carlos Alberto Lopez Perez
(In reply to comment #7)
> The bug is definitive this one:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68159 and is still present in
> last GDB git master.
>
> I tried using lldb (LLVM debugger) and its also crashing (segfaults)...
>
>
> So... at least on my environment I'm complete unable to use a debugger on
> current trunk of WebKit with Debug builds.
>
>
> Is anybody here able to work with gdb/llvdb and debug builds?
BTW, adrian perez pointed me to this very helpful trick:
* Put in your ~/.gdbinit file:
set demangle-style none
* Then pipe the output of GDB through c++filt (a stand-alone demangler).
It works for me.
I see that the WebKit tooling for generating GDB crash logs is already piping the output through c++filt. So I'm going to just set this line on the GTK+ bots ~/.gdbinit files.