mapbox / mapbox-gl-native

Interactive, thoroughly customizable maps in native Android, iOS, macOS, Node.js, and Qt applications, powered by vector tiles and OpenGL
https://mapbox.com/mobile
Other
4.37k stars 1.32k forks source link

GDB crashes when debugging mbgl-test in Ubuntu 16.04 #8690

Closed brunoabinader closed 7 years ago

brunoabinader commented 7 years ago

When issuing make run-tests on Ubuntu 16.04 LTS, I get the following error:

Reading symbols from build/linux-x86_64/Debug/mbgl-test.../build/gdb-cXfXJ3/gdb-7.11.1/gdb/cp-support.c:1595: demangler-warning: unable to demangle '_ZSt7forwardIRZN4mbgl6detail27packageArgumentsAndCallbackISt5tupleIJOPZNS0_17DefaultFileSource7requestERKNS0_8ResourceESt8functionIFvNS0_8ResponseEEEE18DefaultFileRequestRS5_RSB_EEJLm0ELm1EEEEDaSt10shared_ptrISt6atomicIbEEOT_St16integer_sequenceImJXspT0_EEEEUlDpOT_E0_ESN_RNSt16remove_referenceISM_E4typeE' (demangler failed with signal 11) Unable to dump core, use `ulimit -c unlimited' before executing GDB next time. /build/gdb-cXfXJ3/gdb-7.11.1/gdb/cp-support.c:1608: demangler-warning: unable to demangle '_ZSt7forwardIRZN4mbgl6detail27packageArgumentsAndCallbackISt5tupleIJOPZNS0_17DefaultFileSource7requestERKNS0_8ResourceESt8functionIFvNS0_8ResponseEEEE18DefaultFileRequestRS5_RSB_EEJLm0ELm1EEEEDaSt10shared_ptrISt6atomicIbEEOT_St16integer_sequenceImJXspT0_EEEEUlDpOT_E0_ESN_RNSt16remove_referenceISM_E4typeE' (demangler failed with signal 11) A problem internal to GDB has been detected, further debugging may prove unreliable.

The function in question is mbgl::detail::packageArgumentsAndCallback.

GDB version: GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1

Related GDB bugzilla: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78252

/cc @jfirebaugh

brunoabinader commented 7 years ago

I've tested a custom gdb built from trunk (containing the fix commented on the bugzilla link) and gdb does not complain anymore. I'm preparing a new package of it for mason.

springmeyer commented 7 years ago

@brunoabinader it looks like the crashing version of gdb is 7.11. The 7.12 release is already packaged in mason and being used at https://github.com/mapbox/mapbox-gl-native/blob/62e8e64299ae1635e56df701a7c2264e8b37b77a/scripts/travis_setup.sh#L37-L38. Have you tried enabling that version (7.12) of gdb? Maybe that will work and you won't need a gdb build from trunk?

brunoabinader commented 7 years ago

@springmeyer GDB 7.12 does not contain this patch which fixes the issue - to be sure I've tested gdb 7.12 locally and got the same error.

brunoabinader commented 7 years ago

Fixed in #9020.