[webkit-dev] segfault when having multiple webkit instances (got backtrace)

Luka Napotnik luka.napotnik at gmail.com
Mon Oct 6 00:50:29 PDT 2008


Hello.

I have a program that uses the webkit engine (gtk+ port) for
intense-rendering. I have about 10 threads, each with it's own webkit
instance. While there's no problem when only two instances are active.
But when I increase the instances, the program segfaults. I got the
following backtrace from gdb:
===================================================================
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb56f6720 (LWP 20719)]
0xb7d852dc in JSC::Heap::heapAllocate<(JSC::Heap::HeapType)0> ()
from /usr/lib/libwebkit-1.0.so.1
Current language:  auto; currently asm
(gdb) bt
#0  0xb7d852dc in JSC::Heap::heapAllocate<(JSC::Heap::HeapType)0> ()
from /usr/lib/libwebkit-1.0.so.1
#1  0xb7b87822 in WebCore::JSHTMLImageElement::createPrototype ()
from /usr/lib/libwebkit-1.0.so.1
#2  0xb7b72d6f in WebCore::createImageWrapper ()
from /usr/lib/libwebkit-1.0.so.1
#3  0xb7b75552 in WebCore::createJSHTMLWrapper ()
from /usr/lib/libwebkit-1.0.so.1
#4  0xb7657332 in WebCore::toJS () from /usr/lib/libwebkit-1.0.so.1
#5  0xb765124a in WebCore::constructImage ()
from /usr/lib/libwebkit-1.0.so.1
#6  0xb7cb1b0d in JSC::Machine::privateExecute ()
from /usr/lib/libwebkit-1.0.so.1
#7  0xb7cb8ed7 in JSC::Machine::execute ()
from /usr/lib/libwebkit-1.0.so.1
#8  0xb7d7ebee in JSC::Interpreter::evaluate ()
from /usr/lib/libwebkit-1.0.so.1
#9  0xb7660310 in WebCore::ScriptController::evaluate ()
from /usr/lib/libwebkit-1.0.so.1
#10 0xb784256c in WebCore::FrameLoader::executeScript ()
from /usr/lib/libwebkit-1.0.so.1
#11 0xb7801702 in WebCore::HTMLTokenizer::scriptExecution ()
from /usr/lib/libwebkit-1.0.so.1
#12 0xb7802919 in WebCore::HTMLTokenizer::scriptHandler ()
from /usr/lib/libwebkit-1.0.so.1
#13 0xb780337a in WebCore::HTMLTokenizer::parseSpecial ()
from /usr/lib/libwebkit-1.0.so.1
#14 0xb7805661 in WebCore::HTMLTokenizer::parseTag ()
from /usr/lib/libwebkit-1.0.so.1
#15 0xb78080c7 in WebCore::HTMLTokenizer::write ()
from /usr/lib/libwebkit-1.0.so.1
#16 0xb782d919 in WebCore::FrameLoader::write ()
from /usr/lib/libwebkit-1.0.so.1
#17 0xb782ddd7 in WebCore::FrameLoader::addData ()
from /usr/lib/libwebkit-1.0.so.1
#18 0xb7620415 in WebKit::FrameLoaderClient::committedLoad ()
from /usr/lib/libwebkit-1.0.so.1
#19 0xb7829a77 in WebCore::FrameLoader::committedLoad ()
from /usr/lib/libwebkit-1.0.so.1
#20 0xb781b40c in WebCore::DocumentLoader::commitLoad ()
from /usr/lib/libwebkit-1.0.so.1
#21 0xb7829e73 in WebCore::FrameLoader::receivedData ()
from /usr/lib/libwebkit-1.0.so.1
#22 0xb7847d46 in WebCore::MainResourceLoader::addData ()
from /usr/lib/libwebkit-1.0.so.1
#23 0xb784eb12 in WebCore::ResourceLoader::didReceiveData ()
from /usr/lib/libwebkit-1.0.so.1
#24 0xb7847e9d in WebCore::MainResourceLoader::didReceiveData ()
from /usr/lib/libwebkit-1.0.so.1
#25 0xb784e7f8 in WebCore::ResourceLoader::didReceiveData ()
from /usr/lib/libwebkit-1.0.so.1
#26 0xb79cbec4 in WebCore::writeCallback ()
from /usr/lib/libwebkit-1.0.so.1
#27 0xb6b97285 in ?? () from /usr/lib/libcurl-gnutls.so.4
#28 0xb6b8cd02 in ?? () from /usr/lib/libcurl-gnutls.so.4
#29 0xb6ba0b70 in ?? () from /usr/lib/libcurl-gnutls.so.4
#30 0xb6bb088d in ?? () from /usr/lib/libcurl-gnutls.so.4
#31 0xb6bb0bd9 in curl_multi_perform ()
from /usr/lib/libcurl-gnutls.so.4
#32 0xb79ccc58 in WebCore::ResourceHandleManager::downloadTimerCallback
() from /usr/lib/libwebkit-1.0.so.1
#33 0xb79cdbbb in WebCore::Timer<WebCore::ResourceHandleManager>::fired
() from /usr/lib/libwebkit-1.0.so.1
#34 0xb78d622b in WebCore::TimerBase::fireTimers ()
from /usr/lib/libwebkit-1.0.so.1
---Type <return> to continue, or q <return> to quit---
#35 0xb78d6577 in WebCore::TimerBase::sharedTimerFired ()
from /usr/lib/libwebkit-1.0.so.1
#36 0xb7afc44e in WebCore::timeout_cb ()
from /usr/lib/libwebkit-1.0.so.1
#37 0xb6defe26 in ?? () from /usr/lib/libglib-2.0.so.0
#38 0xb6def6f8 in g_main_context_dispatch ()
from /usr/lib/libglib-2.0.so.0
#39 0xb6df2da3 in ?? () from /usr/lib/libglib-2.0.so.0
#40 0xb6df32c2 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#41 0xb72cc299 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#42 0x0804ab13 in main (argc=2, argv=0xbf9ea774) at main.c:123
===================================================================

I've disabled updating to gtk+ and even make a
gdk_threads_enter()/_leave() when opening pages. Do I have to protect
the webkit instance with other functions? It seems the memory management
of webkit fails. Please help.

Greets,
Luka
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: To je digitalno podpisan del =?UTF-8?Q?sporo=C4=8Dila?=
Url : http://lists.webkit.org/pipermail/webkit-dev/attachments/20081006/8a5596eb/attachment.bin 


More information about the webkit-dev mailing list