Bug 173315 - [WTR] Crash in WebGeolocationManagerProxy::~WebGeolocationManagerProxy() when running several tests
Summary: [WTR] Crash in WebGeolocationManagerProxy::~WebGeolocationManagerProxy() when...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk, LayoutTestFailure
Depends on:
Blocks:
 
Reported: 2017-06-13 08:57 PDT by Carlos Garcia Campos
Modified: 2017-06-13 10:49 PDT (History)
5 users (show)

See Also:


Attachments
Patch (2.85 KB, patch)
2017-06-13 09:00 PDT, Carlos Garcia Campos
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2017-06-13 08:57:18 PDT
This has started to happen after r218165, but I don't think it's a regression, but that r218165 revealed the bug somehow in WTR. The problem is that GeolocationProviderMock keeps a pointer to the WKGeolocationManagerRef returned by WKContextGetGeolocationManager. But in TestController::generatePageConfiguration() the context is freed before the GeolocationProviderMock. When the GeolocationProviderMock is then destroyed, it calls WKGeolocationManagerSetProvider(m_geolocationManager, 0); but the WKGeolocationManagerRef has already been destroyed.

Thread 1 (Thread 0x7fafced2af00 (LWP 31298)):
#0  0x0000000000000041 in ?? ()
#1  0x00007fafde78baa2 in WebKit::WebGeolocationManagerProxy::~WebGeolocationManagerProxy() () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#2  0x00007fafde7c7d56 in WebKit::WebProcessPool::~WebProcessPool() () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#3  0x00007fafde7c8639 in WebKit::WebProcessPool::~WebProcessPool() () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#4  0x00007fafe10b2019 in WTR::TestController::generatePageConfiguration(OpaqueWKContextConfiguration const*) ()
#5  0x00007fafe10b7d6b in WTR::TestController::createWebViewWithOptions(WTR::TestOptions const&) ()
#6  0x00007fafe10b8223 in WTR::TestController::ensureViewSupportsOptionsForTest(WTR::TestInvocation const&) ()
#7  0x00007fafe10b8421 in WTR::TestController::configureViewForTest(WTR::TestInvocation const&) ()
#8  0x00007fafe10c0a31 in WTR::TestInvocation::invoke() ()
#9  0x00007fafe10b369c in WTR::TestController::runTest(char const*) ()
#10 0x00007fafe10b386b in WTR::TestController::runTestingServerLoop() ()
#11 0x00007fafe10b6038 in WTR::TestController::TestController(int, char const**) ()
#12 0x00007fafe10acf9c in main ()
Comment 1 Carlos Garcia Campos 2017-06-13 09:00:43 PDT
Created attachment 312775 [details]
Patch
Comment 2 Carlos Garcia Campos 2017-06-13 10:49:00 PDT
Committed r218183: <http://trac.webkit.org/changeset/218183>