RESOLVED FIXED 160414
[Tools] The GDB backtrace report tool don't checks the gdb return code.
https://bugs.webkit.org/show_bug.cgi?id=160414
Summary [Tools] The GDB backtrace report tool don't checks the gdb return code.
Carlos Alberto Lopez Perez
Reported 2016-08-01 12:07:59 PDT
There is an issue with current Debug builds of WebKitGTK+ and GDB. Check #159919 GDB=7.7.1 segfaults when trying to analyze a core produced on a Debug build of WebKitGTK+ without producing any output. The WebKit tooling don't checks the return code and assumes that an empty stdout means that the corefile was not generated as expected. So, it returns this: """ crash log for WebKitWebProcess (pid 7371): Coredump core-pid_7371.dump not found. To enable crash logs: - run this command as super-user: echo "|Tools/Scripts/process-linux-coredump /home/clopez/webkit/cores/core-pid_%p.dump" > /proc/sys/kernel/core_pattern - enable core dumps: ulimit -c unlimited - set the WEBKIT_CORE_DUMPS_DIRECTORY environment variable: export WEBKIT_CORE_DUMPS_DIRECTORY=/home/clopez/webkit/cores STDERR: STDERR: warning: core file may not match specified executable file. STDERR: <empty> """ Which is at best, misleading. We should detect the return code from GDB and inform about it when it is non-zero.
Attachments
Patch (1.57 KB, patch)
2016-08-01 12:18 PDT, Carlos Alberto Lopez Perez
no flags
Patch (1.57 KB, patch)
2016-08-01 12:23 PDT, Carlos Alberto Lopez Perez
no flags
Carlos Alberto Lopez Perez
Comment 1 2016-08-01 12:18:47 PDT
WebKit Commit Bot
Comment 2 2016-08-01 12:20:08 PDT
Attachment 285026 [details] did not pass style-queue: ERROR: Tools/Scripts/webkitpy/port/linux_get_crash_log.py:49: missing whitespace around operator [pep8/E225] [5] Total errors found: 1 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Carlos Alberto Lopez Perez
Comment 3 2016-08-01 12:23:33 PDT
Carlos Alberto Lopez Perez
Comment 4 2016-08-01 12:26:22 PDT
Example of -crash-log.txt file produced after this patch: """ crash log for WebKitWebProcess (pid 11081): ERROR: The gdb process exited with non-zero return code -11 STDERR: STDERR: warning: core file may not match specified executable file. STDERR: <empty> """ And if using gdb=>7.11.1 which don't segfaults but fails to generate the backtrace, we get: """ crash log for WebKitWebProcess (pid 12130): ERROR: The gdb process exited with non-zero return code 1 [New LWP 12130] [New LWP 12148] [New LWP 12142] [New LWP 12153] [New LWP 12146] [New LWP 12139] [New LWP 12144] [New LWP 12150] [New LWP 12149] [New LWP 12140] [New LWP 12145] [New LWP 12152] [New LWP 12141] [New LWP 12147] [New LWP 12151] cp-support.c:1615: demangler-warning: unable to demangle '_ZSt7forwardIRZN6WebKit29NetworkConnectionToWebProcess26writeBlobsToTemporaryFilesERKN3WTF6VectorINS2_6StringELm0ENS2_15CrashOnOverflowELm16EEEmEUlRT_E_EOS9_RNSt16remove_referenceIS9_E4typeE' (demangler failed with signal 11) A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) [answered Y; input not from terminal] STDERR: STDERR: warning: core file may not match specified executable file. STDERR: STDERR: warning: Could not load shared library symbols for linux-vdso.so.1. STDERR: Do you need "set solib-search-path" or "set sysroot"? """
Carlos Alberto Lopez Perez
Comment 5 2016-08-01 18:51:37 PDT
Comment on attachment 285028 [details] Patch Clearing flags on attachment: 285028 Committed r204007: <http://trac.webkit.org/changeset/204007>
Carlos Alberto Lopez Perez
Comment 6 2016-08-01 18:51:46 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.