Bug 56144
Summary: | DatabaseTracker threading model should be changed to use message passing. | ||
---|---|---|---|
Product: | WebKit | Reporter: | Brady Eidson <beidson> |
Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | adauria, andersca, ap, dimich, ericu, jorlow, levin, michaeln |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All |
Brady Eidson
DatabaseTracker threading model should be changed to use message passing.
The original model tried carefully to guard shared data with locks, etc.
In our experience it has been working fine and there's no known outstanding issues with it. But the model itself fragile to work with, and we could make it more robust by transitioning to a message passing model.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Michael Nordman
There have been deadlocks, races, and crashes related to how the db system handles multi-threading... and then bringing the system up in the context of workers was extra challenging as well.
Some of the grief stems from the synchronous APIs exposed by the 'tracker' to the embedder. Satisfying those sync requests is troublesome. Altering those webkit level interfaces to be async would provide a little breathing room.
Brady Eidson
(In reply to comment #1)
>
> Some of the grief stems from the synchronous APIs exposed by the 'tracker' to the embedder. Satisfying those sync requests is troublesome. Altering those webkit level interfaces to be async would provide a little breathing room.
The sync interfaces have shipped, and as a policy with the WebKit project we don't break backwards compatibility without at least a deprecation period.
The first step to resolving that headache would be to add a new async interface, which would allow us to deprecate the old interface.
Michael Nordman
Kinuko and David Levin had been talking about adding better infrastructure for thread message passing to webcore. I don't think that talk has translated into code yet, but maybe after there's some improved infrastructure in place it would be a good time to migrate the database tracker (and the database stuff in general) over.
Brady Eidson
Anders, are we still exploring moving CoreIPC to WTF?
It supports threaded mode, and It could be used here pretty painlessly, I imagine.
Anders Carlsson
(In reply to comment #4)
> Anders, are we still exploring moving CoreIPC to WTF?
Yes.
> It supports threaded mode, and It could be used here pretty painlessly, I imagine.
It might be a bit overkill for simple message passing since it serializes/deserializes data that might not be needed.