Bug 135418 - media/track/add-and-remove-track.html and media/media-fragments/TC0001.html are flaky on Mac WK2 EWS, asserting under TestRunner::removeAllWebNotificationPermissions
Summary: media/track/add-and-remove-track.html and media/media-fragments/TC0001.html a...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-30 09:44 PDT by Alexey Proskuryakov
Modified: 2014-07-31 12:22 PDT (History)
3 users (show)

See Also:


Attachments
proposed fix (3.65 KB, patch)
2014-07-31 11:35 PDT, Alexey Proskuryakov
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2014-07-30 09:44:06 PDT
Mac WK2 EWS very frequently fails, claiming media/track/add-and-remove-track.html to be failing. But it's actually flaky. Quite obviously, it's caused by some other test doing Web Notification work.

It is very likely that the same issue happens on testers too, but we botwatched it away by marking affected tests in TestExpectations. But due to the nature of this failure, it can clearly happen on other tests randomly, and can migrate to other tests with time.

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.JavaScriptCore      	0x000000010ffdbc1e WTFCrash + 62 (Assertions.cpp:329)
1   WebKitTestRunnerInjectedBundle	0x0000000113e60703 WTF::CrashOnOverflow::overflowed() + 9
2   WebKitTestRunnerInjectedBundle	0x0000000113e632e4 WTR::InjectedBundle::page() const + 24 (InjectedBundle.cpp:134)
3   WebKitTestRunnerInjectedBundle	0x0000000113e568a1 WTR::TestRunner::removeAllWebNotificationPermissions() + 27 (InjectedBundlePage.h:41)
4   WebKitTestRunnerInjectedBundle	0x0000000113e63054 WTR::InjectedBundle::didReceiveMessage(OpaqueWKString const*, void const*) + 398 (Vector.h:610)
5   com.apple.WebKit              	0x000000010ef97618 WebKit::InjectedBundleClient::didReceiveMessage(WebKit::InjectedBundle*, WTF::String const&, API::Object*) + 120 (WKSharedAPICast.h:130)
6   com.apple.WebKit              	0x000000010f0f58e5 WebKit::WebProcess::postInjectedBundleMessage(IPC::DataReference const&) + 135 (RefPtr.h:55)
7   com.apple.WebKit              	0x000000010f0fefd0 WebKit::WebProcess::didReceiveWebProcessMessage(IPC::Connection*, IPC::MessageDecoder&) + 2356 (HandleMessage.h:16)
8   com.apple.WebKit              	0x000000010f0f41e9 WebKit::WebProcess::didReceiveMessage(IPC::Connection*, IPC::MessageDecoder&) + 175 (WebProcess.cpp:612)
9   com.apple.WebKit              	0x000000010ef52400 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::MessageDecoder, std::__1::default_delete<IPC::MessageDecoder> >) + 94 (memory:2665)
Comment 1 Alexey Proskuryakov 2014-07-30 09:51:57 PDT
media/media-fragments/TC0001.html is another test that's randomly affected.
Comment 2 Alexey Proskuryakov 2014-07-30 16:56:22 PDT
I wonder if this is related to bug 122475. Apparently m_pages can be empty sometimes. Perhaps a race when terminating a process and creating a new one?
Comment 3 Alexey Proskuryakov 2014-07-31 10:34:48 PDT
> I wonder if this is related to bug 122475.

Yes it is! I could reproduce, looks like that fix was not sufficient for single-WebProcess case (as used on Mountain Lion).
Comment 4 Alexey Proskuryakov 2014-07-31 11:35:33 PDT
Created attachment 235832 [details]
proposed fix
Comment 5 Alexey Proskuryakov 2014-07-31 12:22:00 PDT
Committed <http://trac.webkit.org/r171880>.