Bug 190048 - Regression(r236512): fast/scrolling/scroll-animator-overlay-scrollbars-clicked.html and editing/pasteboard/emacs-ctrl-a-k-y.html are flaky
Summary: Regression(r236512): fast/scrolling/scroll-animator-overlay-scrollbars-clicke...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on: 190067
Blocks: 189927
  Show dependency treegraph
 
Reported: 2018-09-27 11:48 PDT by Chris Dumez
Modified: 2018-09-28 08:39 PDT (History)
7 users (show)

See Also:


Attachments
Patch (105.75 KB, patch)
2018-09-27 13:23 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2018-09-27 11:48:16 PDT
fast/scrolling/scroll-animator-overlay-scrollbars-clicked.html and editing/pasteboard/emacs-ctrl-a-k-y.html are flaky since the IPC change in r236512:
--- /Volumes/Data/slave/highsierra-release-tests-wk2/build/layout-test-results/editing/pasteboard/emacs-ctrl-a-k-y-expected.txt
+++ /Volumes/Data/slave/highsierra-release-tests-wk2/build/layout-test-results/editing/pasteboard/emacs-ctrl-a-k-y-actual.txt
@@ -8,11 +8,11 @@
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 8 of #text > DIV > DIV > BODY > HTML > #document to 8 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldInsertText: two three four replacingDOMRange:range from 3 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > DIV > DIV > BODY > HTML > #document givenAction:WebViewInsertActionTyped
 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 18 of #text > DIV > DIV > BODY > HTML > #document to 18 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600

--- /Volumes/Data/slave/highsierra-release-tests-wk2/build/layout-test-results/fast/scrolling/scroll-animator-overlay-scrollbars-clicked-expected.txt
+++ /Volumes/Data/slave/highsierra-release-tests-wk2/build/layout-test-results/fast/scrolling/scroll-animator-overlay-scrollbars-clicked-actual.txt
@@ -1,9 +1,9 @@
 CONSOLE MESSAGE: line 14: MainFrameView: didAddVerticalScrollbar
 CONSOLE MESSAGE: line 14: MainFrameView: didAddHorizontalScrollbar
 CONSOLE MESSAGE: line 14: FrameView: didAddVerticalScrollbar
-CONSOLE MESSAGE: line 14: FrameView: willRemoveVerticalScrollbar
 CONSOLE MESSAGE: line 14: MainFrameView: mouseEnteredContentArea
 CONSOLE MESSAGE: line 14: MainFrameView: mouseMovedInContentArea
+CONSOLE MESSAGE: line 14: FrameView: willRemoveVerticalScrollbar
 CONSOLE MESSAGE: line 16: MainFrameView: mouseEnteredVerticalScrollbar
 CONSOLE MESSAGE: line 16: FrameView: mouseEnteredContentArea
 CONSOLE MESSAGE: line 16: MainFrameView: mouseMovedInContentArea
Comment 1 Chris Dumez 2018-09-27 12:13:36 PDT
This seems to be related to the DecidePolicyForNavigationAction IPC:
1   0x76af9221d WebCore::ScrollAnimatorMock::willRemoveVerticalScrollbar(WebCore::Scrollbar*)
2   0x76ac0dc79 WebCore::ScrollableArea::willRemoveScrollbar(WebCore::Scrollbar*, WebCore::ScrollbarOrientation)
3   0x76aa4a761 WebCore::FrameView::willRemoveScrollbar(WebCore::Scrollbar*, WebCore::ScrollbarOrientation)
4   0x76ac00826 WebCore::ScrollView::setHasScrollbarInternal(WTF::RefPtr<WebCore::Scrollbar, WTF::DumbPtrTraits<WebCore::Scrollbar> >&, WebCore::ScrollbarOrientation, bool, bool*)
5   0x76ac008f0 WebCore::ScrollView::setHasVerticalScrollbar(bool, bool*)
6   0x76aa31b6e WebCore::FrameView::~FrameView()
7   0x76aa32455 WebCore::FrameView::~FrameView()
8   0x76aa32499 WebCore::FrameView::~FrameView()
9   0x76851a86f WTF::RefCounted<WebCore::Widget>::deref() const
10  0x76851b0b5 void WTF::derefIfNotNull<WebCore::FrameView>(WebCore::FrameView*)
11  0x76851b079 WTF::RefPtr<WebCore::FrameView, WTF::DumbPtrTraits<WebCore::FrameView> >::~RefPtr()
12  0x7684fdb55 WTF::RefPtr<WebCore::FrameView, WTF::DumbPtrTraits<WebCore::FrameView> >::~RefPtr()
13  0x76aa27d43 WTF::RefPtr<WebCore::FrameView, WTF::DumbPtrTraits<WebCore::FrameView> >::operator=(WTF::RefPtr<WebCore::FrameView, WTF::DumbPtrTraits<WebCore::FrameView> >&&)
14  0x76aa275a3 WebCore::Frame::setView(WTF::RefPtr<WebCore::FrameView, WTF::DumbPtrTraits<WebCore::FrameView> >&&)
15  0x76aa2b72b WebCore::Frame::createView(WebCore::IntSize const&, WebCore::Color const&, bool, WebCore::IntSize const&, WebCore::IntRect const&, bool, WebCore::ScrollbarMode, bool, WebCore::ScrollbarMode, bool)
16  0x10d88713a WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage()
17  0x76a86d595 WebCore::FrameLoader::transitionToCommitted(WebCore::CachedPage*)
18  0x76a86c5d0 WebCore::FrameLoader::commitProvisionalLoad()
19  0x76a805dbc WebCore::DocumentLoader::commitIfReady()
20  0x76a806182 WebCore::DocumentLoader::finishedLoading()
21  0x76a8107c1 WebCore::DocumentLoader::maybeLoadEmpty()
22  0x76a8109ae WebCore::DocumentLoader::startLoadingMainResource(WebCore::ShouldContinue)
23  0x76a88f10c WebCore::FrameLoader::continueLoadAfterNavigationPolicy(WebCore::ResourceRequest const&, WebCore::FormState*, WebCore::ShouldContinue, WebCore::AllowNavigationToInvalidURL)::$_11::operator()() const
24  0x76a88eda9 WTF::Function<void ()>::CallableWrapper<WebCore::FrameLoader::continueLoadAfterNavigationPolicy(WebCore::ResourceRequest const&, WebCore::FormState*, WebCore::ShouldContinue, WebCore::AllowNavigationToInvalidURL)::$_11>::call()
25  0x76800fe7d WTF::Function<void ()>::operator()() const
26  0x7695881e0 WTF::CompletionHandler<void ()>::operator()()
27  0x76a86a489 WebCore::FrameLoader::continueLoadAfterNavigationPolicy(WebCore::ResourceRequest const&, WebCore::FormState*, WebCore::ShouldContinue, WebCore::AllowNavigationToInvalidURL)
28  0x76a88ca65 WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::RefPtr<WebCore::FormState, WTF::DumbPtrTraits<WebCore::FormState> >&&, WebCore::AllowNavigationToInvalidURL, WebCore::ShouldTreatAsContinuingLoad, WebCore::ShouldSkipSafeBrowsingCheck, WTF::CompletionHandler<void ()>&&)::$_8::operator()(WebCore::ResourceRequest const&, WTF::WeakPtr<WebCore::FormState>&&, WebCore::ShouldContinue)
29  0x76a88c945 WTF::Function<void (WebCore::ResourceRequest&&, WTF::WeakPtr<WebCore::FormState>&&, WebCore::ShouldContinue)>::CallableWrapper<WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::RefPtr<WebCore::FormState, WTF::DumbPtrTraits<WebCore::FormState> >&&, WebCore::AllowNavigationToInvalidURL, WebCore::ShouldTreatAsContinuingLoad, WebCore::ShouldSkipSafeBrowsingCheck, WTF::CompletionHandler<void ()>&&)::$_8>::call(WebCore::ResourceRequest&&, WTF::WeakPtr<WebCore::FormState>&&, WebCore::ShouldContinue)
30  0x76a8c0e0b WTF::Function<void (WebCore::ResourceRequest&&, WTF::WeakPtr<WebCore::FormState>&&, WebCore::ShouldContinue)>::operator()(WebCore::ResourceRequest&&, WTF::WeakPtr<WebCore::FormState>&&, WebCore::ShouldContinue) const
31  0x76a8af067 WTF::CompletionHandler<void (WebCore::ResourceRequest&&, WTF::WeakPtr<WebCore::FormState>&&, WebCore::ShouldContinue)>::operator()(WebCore::ResourceRequest&&, WTF::WeakPtr<WebCore::FormState>&&, WebCore::ShouldContinue)

and

1   0x76af9211d WebCore::ScrollAnimatorMock::didAddVerticalScrollbar(WebCore::Scrollbar*)
2   0x76ac0dbd9 WebCore::ScrollableArea::didAddScrollbar(WebCore::Scrollbar*, WebCore::ScrollbarOrientation)
3   0x76aa4a661 WebCore::FrameView::didAddScrollbar(WebCore::Scrollbar*, WebCore::ScrollbarOrientation)
4   0x76ac0075c WebCore::ScrollView::setHasScrollbarInternal(WTF::RefPtr<WebCore::Scrollbar, WTF::DumbPtrTraits<WebCore::Scrollbar> >&, WebCore::ScrollbarOrientation, bool, bool*)
5   0x76ac008f0 WebCore::ScrollView::setHasVerticalScrollbar(bool, bool*)
6   0x76ac01005 WebCore::ScrollView::updateScrollbars(WebCore::IntPoint const&)
7   0x76ac00b52 WebCore::ScrollView::setScrollbarModes(WebCore::ScrollbarMode, WebCore::ScrollbarMode, bool, bool)
8   0x76aa36f2d WebCore::ScrollView::setVerticalScrollbarMode(WebCore::ScrollbarMode, bool)
9   0x76aa36d21 WebCore::FrameView::adjustScrollbarsForLayout(bool)
10  0x76aa3713f WebCore::FrameView::willDoLayout(WTF::WeakPtr<WebCore::RenderElement>)
11  0x76aa2cdb0 WebCore::FrameViewLayoutContext::layout()
12  0x76aa251cc WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive()
13  0x10d9e27b5 WebKit::WebPage::layoutIfNeeded()
14  0x10d74f1fe WKBundlePagePostSynchronousMessageForTesting
15  0x780201957 WTR::EventSendingController::mouseMoveTo(int, int)
16  0x78022d4e2 WTR::JSEventSendingController::mouseMoveTo(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSValue*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**)
17  0x779410827 long long JSC::APICallbackFunction::call<JSC::JSCallbackFunction>(JSC::ExecState*)
18  0x210479c0102d
19  0x77938cd06 llint_entry
20  0x779384632 vmEntryToJavaScript
21  0x779f3270a JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*)
22  0x779f32d8b JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&)
23  0x77a1dfe8c JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&)
24  0x77a1dff6c JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&, WTF::NakedPtr<JSC::Exception>&)
25  0x77a1e025e JSC::profiledCall(JSC::ExecState*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&, WTF::NakedPtr<JSC::Exception>&)
26  0x769aeff3b WebCore::JSExecState::profiledCall(JSC::ExecState*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&, WTF::NakedPtr<JSC::Exception>&)
27  0x769b33273 WebCore::JSEventListener::handleEvent(WebCore::ScriptExecutionContext&, WebCore::Event&)
28  0x76a0fd57c WebCore::EventTarget::innerInvokeEventListeners(WebCore::Event&, WTF::Vector<WTF::RefPtr<WebCore::RegisteredEventListener, WTF::DumbPtrTraits<WebCore::RegisteredEventListener> >, 1ul, WTF::CrashOnOverflow, 16ul>, WebCore::EventTarget::EventInvokePhase)
29  0x76a0f8f32 WebCore::EventTarget::fireEventListeners(WebCore::Event&, WebCore::EventTarget::EventInvokePhase)
30  0x76a9c65a1 WebCore::DOMWindow::dispatchEvent(WebCore::Event&, WebCore::EventTarget*)
31  0x76a9d1185 WebCore::DOMWindow::dispatchLoadEvent()
1   0x76af9211d WebCore::ScrollAnimatorMock::didAddVerticalScrollbar(WebCore::Scrollbar*)
2   0x76ac0dbd9 WebCore::ScrollableArea::didAddScrollbar(WebCore::Scrollbar*, WebCore::ScrollbarOrientation)
3   0x76aa4a661 WebCore::FrameView::didAddScrollbar(WebCore::Scrollbar*, WebCore::ScrollbarOrientation)
4   0x76ac0075c WebCore::ScrollView::setHasScrollbarInternal(WTF::RefPtr<WebCore::Scrollbar, WTF::DumbPtrTraits<WebCore::Scrollbar> >&, WebCore::ScrollbarOrientation, bool, bool*)
5   0x76ac008f0 WebCore::ScrollView::setHasVerticalScrollbar(bool, bool*)

Given that those are asynchronous, the timing may change and lines may get logged in a slightly different order.
Comment 2 Chris Dumez 2018-09-27 12:41:27 PDT
I have a local fix for fast/scrolling/scroll-animator-overlay-scrollbars-clicked.html. Working on the other test..
Comment 3 Chris Dumez 2018-09-27 12:44:54 PDT
fast/scrolling/scroll-animator-overlay-scrollbars-clicked.html flakiness should be addressed by <https://trac.webkit.org/changeset/236564>.
Comment 4 Chris Dumez 2018-09-27 12:46:13 PDT
I cannot seems to reproduce the editing/pasteboard/emacs-ctrl-a-k-y.html flakiness locally however :/
Comment 5 Chris Dumez 2018-09-27 13:02:00 PDT
(In reply to Chris Dumez from comment #4)
> I cannot seems to reproduce the editing/pasteboard/emacs-ctrl-a-k-y.html
> flakiness locally however :/

Ok, I found a way to reproduce the flakiness for this test as well. Working on it.
Comment 6 Chris Dumez 2018-09-27 13:11:54 PDT
I suspect the flakiness is due to this Sync IPC:
1   0x103a0ddc6 WebKit::WebEditorClient::respondToChangedSelection(WebCore::Frame*)
2   0x1058286ce WebCore::Editor::respondToChangedSelection(WebCore::VisibleSelection const&, WTF::OptionSet<WebCore::FrameSelection::SetSelectionOption>)
3   0x105834bb5 WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance(WebCore::VisibleSelection const&, WTF::OptionSet<WebCore::FrameSelection::SetSelectionOption>, WebCore::FrameSelection::CursorAlignOnScroll, WebCore::TextGranularity)
4   0x105833081 WebCore::FrameSelection::setSelection(WebCore::VisibleSelection const&, WTF::OptionSet<WebCore::FrameSelection::SetSelectionOption>, WebCore::AXTextStateChangeIntent, WebCore::FrameSelection::CursorAlignOnScroll, WebCore::TextGranularity)
5   0x105832f17 WebCore::FrameSelection::moveTo(WebCore::VisiblePosition const&, WebCore::EUserTriggered, WebCore::FrameSelection::CursorAlignOnScroll)
6   0x10583ab96 WebCore::FrameSelection::modify(WebCore::FrameSelection::EAlteration, WebCore::SelectionDirection, WebCore::TextGranularity, WebCore::EUserTriggered)
7   0x10582df12 WebCore::executeMoveToBeginningOfParagraph(WebCore::Frame&, WebCore::Event*, WebCore::EditorCommandSource, WTF::String const&)
8   0x10582aa9d WebCore::Editor::Command::execute(WebCore::Event*) const
9   0x10399ec97 WebKit::WebPage::executeKeypressCommandsInternal(WTF::Vector<WebCore::KeypressCommand, 0ul, WTF::CrashOnOverflow, 16ul> const&, WebCore::KeyboardEvent*)
10  0x10399f67d WebKit::WebPage::handleEditingKeyboardEvent(WebCore::KeyboardEvent*)
11  0x10396c342 WebKit::WebEditorClient::handleKeyboardEvent(WebCore::KeyboardEvent*)
12  0x105b780fb WebCore::EventHandler::defaultKeyboardEventHandler(WebCore::KeyboardEvent&)
13  0x10576a5c8 WebCore::EventDispatcher::dispatchEvent(WebCore::Node&, WebCore::Event&)
14  0x105b772df WebCore::EventHandler::internalKeyEvent(WebCore::PlatformKeyboardEvent const&)
15  0x105b76d97 WebCore::EventHandler::keyEvent(WebCore::PlatformKeyboardEvent const&)
16  0x103a64d13 WebKit::WebPage::keyEvent(WebKit::WebKeyboardEvent const&)
17  0x103a753d1 WebKit::WebPage::didReceiveWebPageMessage(IPC::Connection&, IPC::Decoder&)
18  0x1036b6d8d IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&)
19  0x1039b3cc2 WebKit::WebProcess::didReceiveMessage(IPC::Connection&, IPC::Decoder&)
20  0x1036a8542 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)
21  0x1036a839a IPC::Connection::SyncMessageState::dispatchMessages(IPC::Connection*)
22  0x1036ab853 IPC::Connection::dispatchSyncMessage(IPC::Decoder&)
23  0x1036a853b IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)
24  0x1036a839a IPC::Connection::SyncMessageState::dispatchMessages(IPC::Connection*)
25  0x1036a9d2f IPC::Connection::waitForSyncReply(unsigned long long, WTF::Seconds, WTF::OptionSet<IPC::SendSyncOption>)
26  0x1036a9655 IPC::Connection::sendSyncMessage(unsigned long long, std::__1::unique_ptr<IPC::Encoder, std::__1::default_delete<IPC::Encoder> >, WTF::Seconds, WTF::OptionSet<IPC::SendSyncOption>)
27  0x103a730ab bool IPC::Connection::sendSync<Messages::WebPageProxy::HandleSynchronousMessage>(Messages::WebPageProxy::HandleSynchronousMessage&&, Messages::WebPageProxy::HandleSynchronousMessage::Reply&&, unsigned long long, WTF::Seconds, WTF::OptionSet<IPC::SendSyncOption>)
28  0x103a6c217 WebKit::WebPage::postSynchronousMessageForTesting(WTF::String const&, API::Object*, WTF::RefPtr<API::Object, WTF::DumbPtrTraits<API::Object> >&)
29  0x1039d954a WKBundlePagePostSynchronousMessageForTesting
30  0x20a7156db WTR::EventSendingController::keyDown(OpaqueJSString*, OpaqueJSValue const*, int)
31  0x20a729758 WTR::JSEventSendingController::keyDown(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSValue*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**)
Comment 7 Truitt Savell 2018-09-27 13:17:28 PDT
Here is another test experiencing the same issue it seems

http/tests/navigation/keyboard-events-during-provisional-navigation.html

Hsitory:
https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=http%2Ftests%2Fnavigation%2Fkeyboard-events-during-provisional-navigation.html

Diff:
--- /Volumes/Data/slave/highsierra-release-tests-wk2/build/layout-test-results/http/tests/navigation/keyboard-events-during-provisional-navigation-expected.txt
+++ /Volumes/Data/slave/highsierra-release-tests-wk2/build/layout-test-results/http/tests/navigation/keyboard-events-during-provisional-navigation-actual.txt
@@ -9,9 +9,9 @@
 CONSOLE MESSAGE: line 52: Inserting text "c".
 CONSOLE MESSAGE: line 55: Pasting text "d".
 CONSOLE MESSAGE: line 58: Input element value after text input events: "".
-CONSOLE MESSAGE: line 20: Pressing "z" with access key modifiers should navigate to resources/keyboard-events-after-navigation.html.
 CONSOLE MESSAGE: line 18: keydownevent dispatched (isTrusted: true).
 CONSOLE MESSAGE: line 18: keyupevent dispatched (isTrusted: true).
+CONSOLE MESSAGE: line 20: Pressing "z" with access key modifiers should navigate to resources/keyboard-events-after-navigation.html.
 CONSOLE MESSAGE: line 6: Finished navigating to resources/keyboard-events-after-navigation.html.
 CONSOLE MESSAGE: line 7: Trusted events should be logged and the input element should have the value "acd".
 CONSOLE MESSAGE: line 34: Dispatching untrusted keypress event.

Reproduced with:
run-webkit-tests --root testbuild-236512 http/tests/navigation/keyboard-events-during-provisional-navigation.html --iterations 500 -f
Comment 8 Chris Dumez 2018-09-27 13:23:37 PDT
Created attachment 350993 [details]
Patch
Comment 9 Chris Dumez 2018-09-27 14:57:18 PDT
Comment on attachment 350993 [details]
Patch

Clearing flags on attachment: 350993

Committed r236573: <https://trac.webkit.org/changeset/236573>
Comment 10 Chris Dumez 2018-09-27 14:57:20 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Radar WebKit Bug Importer 2018-09-27 14:58:29 PDT
<rdar://problem/44844971>