[webkit-dev] webkit crashes when doing stress-test

Luka Napotnik luka.napotnik at gmail.com
Wed Jul 30 04:28:02 PDT 2008


I have an application on an 64-bit Ubuntu 8.04 system that uses WebKit
to render a page to a buffer which is then sent to another program over
the network. In order to make offscreen rendering I had to modify WebKit
in some areas:

- support for Gtk+ off-screen rendering using the patch from clutter.
Meaning it is possible to force redrawing of the HTML page and sending
the output to a cairo surface without showing the HTML page.
- additional "update-requested" signal for Gtk+ port. The signal is
emitted whenever the html layout needs to update.
- removed the invalidation of GDK windows (ScrolledWindow) for Gtk+
port. This means that no content is shown if using the widget.
- added functions to emit a click on a HTML tag with the given tag ID.

I can send the patch if wanted or if it helps solving my problem.

Now I have multiple clients (about a hundred) that are connected to the
Offscreen webkit server. The server renders a simple page which has a
simple JavaScript loop that loads different images and creates an
animated cross.
For a while the rendering of the page for each client works as each
client is a thread and has it's own WebKit instance (I protect the calls
to webkit with the Gdk mutex). But later the server crashes. The cause
is WebKit related since the gdb backtrace print is:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f540b9ce7c0 (LWP 22049)]
0x00007f540abbbc3d in KJS::Heap::heapAllocate<(KJS::Heap::HeapType)0> ()
   from /usr/lib/libwebkit-1.0.so.1
Current language:  auto; currently asm
(gdb) bt
#0  0x00007f540abbbc3d in
KJS::Heap::heapAllocate<(KJS::Heap::HeapType)0> ()
   from /usr/lib/libwebkit-1.0.so.1
#1  0x00007f540ab7e1be in KJS::JSGlobalObject::reset ()
   from /usr/lib/libwebkit-1.0.so.1
#2  0x00007f540a577834 in WebCore::JSDOMWindowBase::JSDOMWindowBase ()
   from /usr/lib/libwebkit-1.0.so.1
#3  0x00007f540aa40112 in WebCore::JSDOMWindow::JSDOMWindow ()
   from /usr/lib/libwebkit-1.0.so.1
#4  0x00007f540a5939e0 in WebCore::ScriptController::clear ()
   from /usr/lib/libwebkit-1.0.so.1
#5  0x00007f540a73bd22 in WebCore::FrameLoader::clear ()
   from /usr/lib/libwebkit-1.0.so.1
#6  0x00007f540a73be60 in WebCore::FrameLoader::begin ()
   from /usr/lib/libwebkit-1.0.so.1
#7  0x00007f540a74b4b0 in WebCore::FrameLoader::receivedFirstData ()
   from /usr/lib/libwebkit-1.0.so.1
#8  0x00007f540a74b8e8 in WebCore::FrameLoader::setEncoding ()
   from /usr/lib/libwebkit-1.0.so.1
#9  0x00007f540a56d6d9 in WebKit::FrameLoaderClient::committedLoad ()
   from /usr/lib/libwebkit-1.0.so.1
#10 0x00007f540a72fcf9 in WebCore::DocumentLoader::commitLoad ()
   from /usr/lib/libwebkit-1.0.so.1
#11 0x00007f540a7659f3 in WebCore::ResourceLoader::didReceiveData ()
#18 0x00007f54073ec80b in curl_multi_perform ()
   from /usr/lib/libcurl-gnutls.so.4
#19 0x00007f540a8af0e0 in
    () from /usr/lib/libwebkit-1.0.so.1
#20 0x00007f540a7f2c93 in WebCore::TimerBase::fireTimers ()
   from /usr/lib/libwebkit-1.0.so.1
#21 0x00007f540a7f2d4b in WebCore::TimerBase::sharedTimerFired ()
   from /usr/lib/libwebkit-1.0.so.1
#22 0x00007f540aa05da2 in WebCore::timeout_cb ()
   from /usr/lib/libwebkit-1.0.so.1
#23 0x00007f54084523d4 in g_main_context_dispatch ()
   from /usr/lib/libglib-2.0.so.0
#24 0x00007f54084556e5 in ?? () from /usr/lib/libglib-2.0.so.0
#25 0x00007f5408455a05 in g_main_loop_run ()
from /usr/lib/libglib-2.0.so.0

The source revision of webkit is 34884. I tried to compile the latest
source from SVN but gor the following error:
"error: JavaScriptCore/WebKitAvailability.h: No such file or directory"

Please help.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.webkit.org/pipermail/webkit-dev/attachments/20080730/5b1f4a0d/attachment.bin 

More information about the webkit-dev mailing list