Bug 133118 - REGRESSION(r168625): [GTK] Assertion failure in LocalStorageDatabaseTracker
Summary: REGRESSION(r168625): [GTK] Assertion failure in LocalStorageDatabaseTracker
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-20 05:09 PDT by Tomas Popela
Modified: 2014-05-21 09:19 PDT (History)
6 users (show)

See Also:


Attachments
Patch (1.54 KB, patch)
2014-05-21 08:48 PDT, Carlos Garcia Campos
pnormand: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Popela 2014-05-20 05:09:27 PDT
After http://trac.webkit.org/changeset/168628 the MiniBrowser is crasing because we are passing empty localStorageDirectory when creating new WebContext.

$ ./MiniBrowser
ASSERTION FAILED: !m_localStorageDirectory.isEmpty()
../../Source/WebKit2/UIProcess/Storage/LocalStorageDatabaseTracker.cpp(50) : WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker(WTF::PassRefPtr<WorkQueue>, const WTF::String&)
1   0x7fb148665f32 /home/tpopela/dev/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-3.0.so.25(WTFCrash+0x1e) [0x7fb148665f32]
2   0x7fb14841aab0 /home/tpopela/dev/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-3.0.so.25(_ZN6WebKit27LocalStorageDatabaseTrackerC1EN3WTF10PassRefPtrI9WorkQueueEERKNS1_6StringE+0xa8) [0x7fb14841aab0]
3   0x7fb14841a97d /home/tpopela/dev/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-3.0.so.25(_ZN6WebKit27LocalStorageDatabaseTracker6createEN3WTF10PassRefPtrI9WorkQueueEERKNS1_6StringE+0x4d) [0x7fb14841a97d]
4   0x7fb1485b3e7e /home/tpopela/dev/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-3.0.so.25(_ZN6WebKit14StorageManagerC2ERKN3WTF6StringE+0x92) [0x7fb1485b3e7e]
5   0x7fb1485b3dd1 /home/tpopela/dev/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-3.0.so.25(_ZN6WebKit14StorageManager6createERKN3WTF6StringE+0x2d) [0x7fb1485b3dd1]
6   0x7fb14831d278 /home/tpopela/dev/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-3.0.so.25(_ZN6WebKit10WebContextC1ENS_23WebContextConfigurationE+0x320) [0x7fb14831d278]
7   0x7fb14831ced6 /home/tpopela/dev/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-3.0.so.25(_ZN6WebKit10WebContext6createENS_23WebContextConfigurationE+0x52) [0x7fb14831ced6]
8   0x7fb148584edf /home/tpopela/dev/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-3.0.so.25(+0x4035edf) [0x7fb148584edf]
9   0x306d66fa18 /lib64/libglib-2.0.so.0(g_once_impl+0x58) [0x306d66fa18]
10  0x7fb148585083 /home/tpopela/dev/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-3.0.so.25(webkit_web_context_get_default+0x3d) [0x7fb148585083]
11  0x40f986 ./MiniBrowser(main+0x1aa) [0x40f986]
12  0x37db621d65 /lib64/libc.so.6(__libc_start_main+0xf5) [0x37db621d65]
13  0x408369 ./MiniBrowser() [0x408369]
Segmentation fault (core dumped)
 
(gdb) bt full
#0  0x00007fb148665f37 in WTFCrash () at ../../Source/WTF/wtf/Assertions.cpp:333
No locals.
#1  0x00007fb14841aab0 in WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker (this=0xa37040, queue=..., localStorageDirectory="(null)") at ../../Source/WebKit2/UIProcess/Storage/LocalStorageDatabaseTracker.cpp:50
        localStorageDatabaseTracker = {m_ptr = 0x7fff65b93518}
#2  0x00007fb14841a97d in WebKit::LocalStorageDatabaseTracker::create (queue=..., localStorageDirectory="(null)") at ../../Source/WebKit2/UIProcess/Storage/LocalStorageDatabaseTracker.cpp:43
No locals.
#3  0x00007fb1485b3e7e in WebKit::StorageManager::StorageManager (this=0xa36c10, localStorageDirectory="(null)") at ../../Source/WebKit2/UIProcess/Storage/StorageManager.cpp:378
No locals.
#4  0x00007fb1485b3dd1 in WebKit::StorageManager::create (localStorageDirectory="(null)") at ../../Source/WebKit2/UIProcess/Storage/StorageManager.cpp:373
No locals.
#5  0x00007fb14831d278 in WebKit::WebContext::WebContext (this=0xb83c00, configuration=...) at ../../Source/WebKit2/UIProcess/WebContext.cpp:183
No locals.
#6  0x00007fb14831ced6 in WebKit::WebContext::create (configuration=...) at ../../Source/WebKit2/UIProcess/WebContext.cpp:138
No locals.
#7  0x00007fb148584edf in createDefaultWebContext () at ../../Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp:258
        webContext = {m_ptr = 0x98f210 [WebKitWebContext]}
        priv = 0x98f130
        webContextConfiguration = {injectedBundlePath = "(null)", localStorageDirectory = "(null)", webSQLDatabaseDirectory = "(null)", indexedDBDatabaseDirectory = "(null)"}
#8  0x000000306d66fa18 in g_once_impl (once=0x7fb14d3f8e30 <webkit_web_context_get_default::onceInit>, func=0x7fb148584d92 <createDefaultWebContext(gpointer)>, arg=0x0) at gthread.c:590
No locals.
#9  0x00007fb148585083 in webkit_web_context_get_default () at ../../Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp:290
        onceInit = {status = G_ONCE_STATUS_PROGRESS, retval = 0x0}
#10 0x000000000040f986 in main (argc=1, argv=0x7fff65b937b8) at ../../Tools/MiniBrowser/gtk/main.c:272
        multiprocess = 0x0
        context = 0xa2e400
        webkitSettings = 0xb26af0 [WebKitSettings]
        error = 0x0
Comment 1 Manuel Rego Casasnovas 2014-05-21 01:24:46 PDT
I've reverted r168628 and it's still crashing to me:

ASSERTION FAILED: !localStorageDirectory.isNull()
../../Source/WebKit2/UIProcess/Storage/StorageManager.cpp(390) : void WebKit::StorageManager::setLocalStorageDirectory(const WTF::String&)
1   0x7fa5ae7f498e /home/rego/checkout/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-3.0.so.25(WTFCrash+0x1e) [0x7fa5ae7f498e]
2   0x7fa5ae74304e /home/rego/checkout/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-3.0.so.25(_ZN6WebKit14StorageManager24setLocalStorageDirectoryERKN3WTF6StringE+0x44) [0x7fa5ae74304e]
3   0x7fa5ae4af28a /home/rego/checkout/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-3.0.so.25(_ZN6WebKit10WebContextC1ENS_23WebContextConfigurationE+0x61a) [0x7fa5ae4af28a]
4   0x7fa5ae4aebee /home/rego/checkout/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-3.0.so.25(_ZN6WebKit10WebContext6createENS_23WebContextConfigurationE+0x52) [0x7fa5ae4aebee]
5   0x7fa5ae714350 /home/rego/checkout/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-3.0.so.25(+0x420c350) [0x7fa5ae714350]
6   0x7fa5a9869be8 /home/rego/checkout/WebKit/WebKitBuild/Dependencies/Root/lib64/libglib-2.0.so.0(g_once_impl+0x58) [0x7fa5a9869be8]
7   0x7fa5ae7144f4 /home/rego/checkout/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-3.0.so.25(webkit_web_context_get_default+0x3d) [0x7fa5ae7144f4]
8   0x40f9ae WebKitBuild/Debug/bin/MiniBrowser(main+0x1aa) [0x40f9ae]
9   0x7fa5a9475b45 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7fa5a9475b45]
10  0x408399 WebKitBuild/Debug/bin/MiniBrowser() [0x408399]
Segmentation fault


Backtrace:

#0  0x00007ffff3217993 in WTFCrash () at ../../Source/WTF/wtf/Assertions.cpp:333
No locals.
#1  0x00007ffff316604e in WebKit::StorageManager::setLocalStorageDirectory (this=0x5655c0, localStorageDirectory=...) at ../../Source/WebKit2/UIProcess/Storage/StorageManager.cpp:390
        __PRETTY_FUNCTION__ = "void WebKit::StorageManager::setLocalStorageDirectory(const WTF::String&)"
#2  0x00007ffff2ed228a in WebKit::WebContext::WebContext (this=0x487310, configuration=...) at ../../Source/WebKit2/UIProcess/WebContext.cpp:234
No locals.
#3  0x00007ffff2ed1bee in WebKit::WebContext::create (configuration=...) at ../../Source/WebKit2/UIProcess/WebContext.cpp:138
No locals.
#4  0x00007ffff3137350 in createDefaultWebContext () at ../../Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp:258
        webContext = {m_ptr = 0x564150}
        priv = 0x564070
        webContextConfiguration = {injectedBundlePath = {m_impl = {m_ptr = 0x0}}, localStorageDirectory = {m_impl = {m_ptr = 0x0}}, webSQLDatabaseDirectory = {m_impl = {m_ptr = 0x0}}, 
          indexedDBDatabaseDirectory = {m_impl = {m_ptr = 0x0}}}
#5  0x00007fffee28cbe8 in g_once_impl (once=0x7ffff7dc9d50 <webkit_web_context_get_default::onceInit>, func=0x7ffff3137203 <createDefaultWebContext(gpointer)>, arg=0x0) at gthread.c:624
No locals.
#6  0x00007ffff31374f4 in webkit_web_context_get_default () at ../../Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp:290
        onceInit = {status = G_ONCE_STATUS_PROGRESS, retval = 0x0}
#7  0x000000000040f9ae in main (argc=1, argv=0x7fffffffd898) at ../../Tools/MiniBrowser/gtk/main.c:272
        multiprocess = 0x0
        context = 0x55be30
        webkitSettings = 0x485200
        error = 0x0
Comment 2 Manuel Rego Casasnovas 2014-05-21 01:34:17 PDT
Maybe it was introduced in: http://trac.webkit.org/changeset/168625
Comment 3 Carlos Garcia Campos 2014-05-21 08:48:47 PDT
Created attachment 231831 [details]
Patch

Temptative fix, I haven't had time to try it out.
Comment 4 WebKit Commit Bot 2014-05-21 08:51:01 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 5 Philippe Normand 2014-05-21 09:06:26 PDT
Comment on attachment 231831 [details]
Patch

Looks legit!
Comment 6 Manuel Rego Casasnovas 2014-05-21 09:07:06 PDT
(In reply to comment #3)
> Created an attachment (id=231831) [details]
> Patch
> 
> Temptative fix, I haven't had time to try it out.

Thanks for the patch, it fixes the issue here.
Comment 7 Carlos Garcia Campos 2014-05-21 09:19:56 PDT
Committed r169163: <http://trac.webkit.org/changeset/169163>