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

Maciej Stachowiak mjs at apple.com
Mon Oct 6 03:09:08 PDT 2008


On Oct 6, 2008, at 2:32 AM, Luka Napotnik wrote:

> Ok I understand.
>
> Would it make a difference if I have only one WebKit instance and then
> create frames and then operate on frames in the threads?

That would probably make it even more likely to crash. The only safe  
way to get more concurrency out of WebKit is to use multiple processes  
(just fork a few and use message passing over pipes or something to  
coordinate).

Regards,
Maciej


>
>
> Greets,
> Luka
>
> Dne 06.10.2008 (pon) ob 02:18 -0700 je Oliver Hunt zapisal(a):
>> No amount of locking will save you -- webkit uses many threads itself
>> -- many (if not most) of which then post messages directly to the  
>> main  
>> application thread, on the assumption that all webviews are being
>> controlled by that one thread.
>>
>> --Oliver
>>
>> On Oct 6, 2008, at 1:24 AM, Luka Napotnik wrote:
>>
>>> Hello.
>>>
>>> Thanks for the quick reply. It seems that locking the GDK subsystem
>>> before every call to WebKit is not enough. Can this be a problem  
>>> with
>>> the way how WebKit manages memory? Is there a locking function for
>>> that?
>>>
>>> Greets,
>>> Luka
>>>
>>> Dne 06.10.2008 (pon) ob 01:10 -0700 je Maciej Stachowiak zapisal(a):
>>>> On Oct 6, 2008, at 12:50 AM, Luka Napotnik wrote:
>>>>
>>>>> 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.
>>>>
>>>> WebKit is not threadsafe. It is not currently possible to use it
>>>> safely from multiple threads. If it ever seems to work, it is only
>>>> through luck.
>>>>
>>>> Regards,
>>>> Maciej
>>>>
>>> _______________________________________________
>>> webkit-dev mailing list
>>> webkit-dev at lists.webkit.org
>>> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>>



More information about the webkit-dev mailing list