Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

SWT/Devel/Gtk/crashstack

< SWT‎ | Devel‎ | Gtk
Revision as of 19:09, 16 October 2017 by Lufimtse.redhat.com (Talk | contribs) (Created page with "When eclipse crashes, the stack trace often doesn't contain line number or other details: E.g: <code> #0 0x00007f40313f0ecc in WTFCrash () at /lib64/libjavascriptcoregtk-4.0...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

When eclipse crashes, the stack trace often doesn't contain line number or other details:

E.g:

  1. 0 0x00007f40313f0ecc in WTFCrash () at /lib64/libjavascriptcoregtk-4.0.so.18
  2. 1 0x00007f4031c93fe1 in WebKit::WebCookieManagerProxy::processPoolDestroyed() () at /lib64/libwebkit2gtk-4.0.so.37
  3. 2 0x00007f4031cd939a in WebKit::WebProcessPool::~WebProcessPool() ()at /lib64/libwebkit2gtk-4.0.so.37
  4. 3 0x00007f4031cd9859 in WebKit::WebProcessPool::~WebProcessPool() ()at /lib64/libwebkit2gtk-4.0.so.37
  5. 4 0x00007f4031e91ad0 in webkit_web_c

...

You can get a more detailed stack trace with gdb, ex: (gdb) bt

  1. 0 WTFCrash() () at Source/WTF/wtf/Assertions.cpp:278
  2. 1 WebKit::CallbackMap::invalidate(WebKit::CallbackBase::Error)

(error=WebKit::CallbackBase::Error::OwnerWasInvalidated) /WebKit/UIProcess/GenericCallback.h:225

  1. 2 WebKit::WebCookieManagerProxy::processPoolDestroyed() /WebKit/UIProcess/WebCookieManagerProxy.cpp:76
  2. 3 WebKit::WebProcessPool::~WebProcessPool() __in_chrg=.. /Source/WebKit/UIProcess/WebProcessPool.cpp:298
  3. 4 WebKit::WebProcessPool::~WebProcessPool() WebKit/UIProcess/WebProcessPool.cpp:317
  4. 5 WTF::ThreadSafeRefCounted<API::Object>::deref() const .. WTF/wtf/ThreadSafeRefCounted.h:71
  5. 6 WTF::derefIfNotNull<WebKit::WebProcessPool>(WebKit::WebProcessPool*)(ptr=../WTF/wtf/RefPtr.h:45

To do so, you need to attach your gdb to a currently running eclipse:

gdb -p 1234 #where 1234 is pid of eclipse c #Continue # < do something to make eclipse crash bt # print back trace

Note, as you attach gdb to eclipse, it might complain about missing debug information and it will prompt you to install them. An example line might look like as following:

   sudo dnf debuginfo-install dbus-libs-1.11.14-1.fc26.x86_64 libblkid-2.30-1.fc26.x86_64 libmount-2.30-1.fc26.x86_64 libsoup-2.58.1-2.fc26.x86_64 libuuid-2.30-1.fc26.x86_64 mesa-libwayland-egl-17.1.4-1.fc26.x86_64 nss-softokn-freebl-3.31.0-1.0.fc26.x86_64 webkitgtk4-2.18.0-1.fc26.x86_64 webkitgtk4-jsc-2.18.0-1.fc26.x86_64

You can view available debug info packages via:

   sudo dnf --enablerepo=fedora-debuginfo list available

As a note, debuginfo puts the source code into:

  /usr/src/debug/        #E.g 'webkitgtk-2.18.0' folder will contain webkitgtk source code.

Folders such as 'webkitgtk' can be imported into eclipse as a project (or link) and you can connect to an instance of eclipse with CDT via "Debug Attached Executable" and debug the C part of an eclipse visually. (See sections on debugging GTK).

Copyright © Eclipse Foundation, Inc. All Rights Reserved.