RESOLVED FIXED Bug 131264
Frequent PluginProcess crashes at libsqlite3.dylib: openDatabase
https://bugs.webkit.org/show_bug.cgi?id=131264
Summary Frequent PluginProcess crashes at libsqlite3.dylib: openDatabase
Alexey Proskuryakov
Reported 2014-04-05 00:50:22 PDT
We use WKCopyFoundationCacheDirectory() to pass NSURL_CACHE_DIR parameter to PluginProcess sandbox. But calling WKCopyFoundationCacheDirectory() implicitly instantiates a shared cache, which is then created on disk on a secondary thread. Our code then uses setenv to change DIRHELPER_USER_DIR_SUFFIX, and CFNetwork uses getenv, which results in a crash if timing is right. We really shouldn't be creating a cache just to find out what its path will be. <rdar://problem/14165329>
Attachments
proposed fix (5.46 KB, patch)
2014-04-05 01:02 PDT, Alexey Proskuryakov
no flags
Alexey Proskuryakov
Comment 1 2014-04-05 01:02:23 PDT
Created attachment 228666 [details] proposed fix As a side effect, this will change plug-in NSURL cache location from ~/Library/Caches/com.apple.PluginProcess to /var/folders/blah/blah/C/com.apple.PluginProcess for most users. CFNetwork uses complicated logic to fall back to the latter if the former isn't appropriate (namely, for network home directory users). It doesn't make much sense to try replicating this logic, as we can just always use the latter directory that works for everyone. CFNetwork behavior is of course subject to change, so trying to approximate it is futile. Perhaps we should have separate caches for different plug-ins (or even separate them by UI process bundle identifier too), but this patch doesn't change this aspect of the behavior.
WebKit Commit Bot
Comment 2 2014-04-05 17:51:03 PDT
Comment on attachment 228666 [details] proposed fix Clearing flags on attachment: 228666 Committed r166845: <http://trac.webkit.org/changeset/166845>
WebKit Commit Bot
Comment 3 2014-04-05 17:51:05 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.