Bug 88064

Summary: [Qt][WK2] REGRESSION(r119127): resetting window.internals settings between tests doesn't work properly
Product: WebKit Reporter: Csaba Osztrogonác <ossy>
Component: Tools / TestsAssignee: Csaba Osztrogonác <ossy>
Status: RESOLVED FIXED    
Severity: Critical CC: ap, jbadics, kbalazs, mihai, ossy, zherczeg
Priority: P1 Keywords: Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 79666, 79668, 87783    
Attachments:
Description Flags
Patch none

Description Csaba Osztrogonác 2012-06-01 01:53:46 PDT
- fast/multicol/pagination-h-vertical-rl.html
- fast/multicol/pagination-v-horizontal-tb.html

On themselves they don't crash, but you can easily reproduce
crashes if you run all fast/multicol tests.

crash log for WebProcess (pid <unknown>):
STDOUT: <empty>
STDERR: 1   0x7fd47d4b7e98 /home/webkitbuildbot/slaves/release64bitWebKit2_EC2/buildslave/qt-linux-64-release-webkit2/build/WebKitBuild/Release/lib/libWTRInjectedBundle.so(+0x35e98) [0x7fd47d4b7e98]
STDERR: 2   0x7fd4c9f76420 /lib/x86_64-linux-gnu/libc.so.6(+0x36420) [0x7fd4c9f76420]
STDERR: 3   0x7fd4ccd04d53 /home/webkitbuildbot/slaves/release64bitWebKit2_EC2/buildslave/qt-linux-64-release-webkit2/build/WebKitBuild/Release/lib/libQtWebKit.so.5(WebCore::RenderLayerCompositor::updateCompositingLayers(WebCore::CompositingUpdateType, WebCore::RenderLayer*)+0x483) [0x7fd4ccd04d53]
STDERR: 4   0x7fd4ccb3466f /home/webkitbuildbot/slaves/release64bitWebKit2_EC2/buildslave/qt-linux-64-release-webkit2/build/WebKitBuild/Release/lib/libQtWebKit.so.5(WebCore::FrameView::layout(bool)+0x4ff) [0x7fd4ccb3466f]
STDERR: 5   0x7fd4ccc11f52 /home/webkitbuildbot/slaves/release64bitWebKit2_EC2/buildslave/qt-linux-64-release-webkit2/build/WebKitBuild/Release/lib/libQtWebKit.so.5(WebCore::ThreadTimers::sharedTimerFiredInternal()+0xa2) [0x7fd4ccc11f52]
STDERR: 6   0x7fd4caa350b9 /usr/local/Trolltech/Qt5/Qt-5.0.0-r32/lib/libQtCore.so.5(QObject::event(QEvent*)+0x69) [0x7fd4caa350b9]
STDERR: 7   0x7fd4cafd5914 /usr/local/Trolltech/Qt5/Qt-5.0.0-r32/lib/libQtWidgets.so.5(QApplicationPrivate::notify_helper(QObject*, QEvent*)+0xb4) [0x7fd4cafd5914]
STDERR: 8   0x7fd4cafd897d /usr/local/Trolltech/Qt5/Qt-5.0.0-r32/lib/libQtWidgets.so.5(QApplication::notify(QObject*, QEvent*)+0x3ad) [0x7fd4cafd897d]
STDERR: 9   0x7fd4caa0e3c4 /usr/local/Trolltech/Qt5/Qt-5.0.0-r32/lib/libQtCore.so.5(QCoreApplication::notifyInternal(QObject*, QEvent*)+0x84) [0x7fd4caa0e3c4]
STDERR: 10  0x7fd4caa549dc /usr/local/Trolltech/Qt5/Qt-5.0.0-r32/lib/libQtCore.so.5(QTimerInfoList::activateTimers()+0x47c) [0x7fd4caa549dc]
STDERR: 11  0x7fd4caa5525d /usr/local/Trolltech/Qt5/Qt-5.0.0-r32/lib/libQtCore.so.5(+0x25725d) [0x7fd4caa5525d]
STDERR: 12  0x7fd4c508da5d /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x1dd) [0x7fd4c508da5d]
STDERR: 13  0x7fd4c508e258 /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x45258) [0x7fd4c508e258]
STDERR: 14  0x7fd4c508e429 /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x69) [0x7fd4c508e429]
STDERR: 15  0x7fd4caa55a24 /usr/local/Trolltech/Qt5/Qt-5.0.0-r32/lib/libQtCore.so.5(QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x64) [0x7fd4caa55a24]
STDERR: 16  0x7fd4caa0d2fb /usr/local/Trolltech/Qt5/Qt-5.0.0-r32/lib/libQtCore.so.5(QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)+0xdb) [0x7fd4caa0d2fb]
STDERR: 17  0x7fd4caa10c50 /usr/local/Trolltech/Qt5/Qt-5.0.0-r32/lib/libQtCore.so.5(QCoreApplication::exec()+0x80) [0x7fd4caa10c50]
STDERR: 18  0x7fd4cce03e8c /home/webkitbuildbot/slaves/release64bitWebKit2_EC2/buildslave/qt-linux-64-release-webkit2/build/WebKitBuild/Release/lib/libQtWebKit.so.5(WebCore::RunLoop::run()+0x5c) [0x7fd4cce03e8c]
STDERR: 19  0x7fd4cc4c101d /home/webkitbuildbot/slaves/release64bitWebKit2_EC2/buildslave/qt-linux-64-release-webkit2/build/WebKitBuild/Release/lib/libQtWebKit.so.5(WebKit::WebProcessMainQt(QGuiApplication*)+0x37d) [0x7fd4cc4c101d]
STDERR: 20  0x400b19 /home/webkitbuildbot/slaves/release64bitWebKit2_EC2/buildslave/qt-linux-64-release-webkit2/build/WebKitBuild/Release/bin/QtWebProcess() [0x400b19]
STDERR: 21  0x7fd4c9f6130d /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7fd4c9f6130d]
STDERR: 22  0x400ba1 /home/webkitbuildbot/slaves/release64bitWebKit2_EC2/buildslave/qt-linux-64-release-webkit2/build/WebKitBuild/Release/bin/QtWebProcess() [0x400ba1]


crash log for WebProcess (pid <unknown>):
STDOUT: <empty>
STDERR: 1   0x7f5dff08ee98 /home/webkitbuildbot/slaves/release64bitWebKit2_EC2/buildslave/qt-linux-64-release-webkit2/build/WebKitBuild/Release/lib/libWTRInjectedBundle.so(+0x35e98) [0x7f5dff08ee98]
STDERR: 2   0x7f5e4bb4d420 /lib/x86_64-linux-gnu/libc.so.6(+0x36420) [0x7f5e4bb4d420]
STDERR: 3   0x7f5e4e8dbd53 /home/webkitbuildbot/slaves/release64bitWebKit2_EC2/buildslave/qt-linux-64-release-webkit2/build/WebKitBuild/Release/lib/libQtWebKit.so.5(WebCore::RenderLayerCompositor::updateCompositingLayers(WebCore::CompositingUpdateType, WebCore::RenderLayer*)+0x483) [0x7f5e4e8dbd53]
STDERR: 4   0x7f5e4e70b66f /home/webkitbuildbot/slaves/release64bitWebKit2_EC2/buildslave/qt-linux-64-release-webkit2/build/WebKitBuild/Release/lib/libQtWebKit.so.5(WebCore::FrameView::layout(bool)+0x4ff) [0x7f5e4e70b66f]
STDERR: 5   0x7f5e4e7e8f52 /home/webkitbuildbot/slaves/release64bitWebKit2_EC2/buildslave/qt-linux-64-release-webkit2/build/WebKitBuild/Release/lib/libQtWebKit.so.5(WebCore::ThreadTimers::sharedTimerFiredInternal()+0xa2) [0x7f5e4e7e8f52]
STDERR: 6   0x7f5e4c60c0b9 /usr/local/Trolltech/Qt5/Qt-5.0.0-r32/lib/libQtCore.so.5(QObject::event(QEvent*)+0x69) [0x7f5e4c60c0b9]
STDERR: 7   0x7f5e4cbac914 /usr/local/Trolltech/Qt5/Qt-5.0.0-r32/lib/libQtWidgets.so.5(QApplicationPrivate::notify_helper(QObject*, QEvent*)+0xb4) [0x7f5e4cbac914]
STDERR: 8   0x7f5e4cbaf97d /usr/local/Trolltech/Qt5/Qt-5.0.0-r32/lib/libQtWidgets.so.5(QApplication::notify(QObject*, QEvent*)+0x3ad) [0x7f5e4cbaf97d]
STDERR: 9   0x7f5e4c5e53c4 /usr/local/Trolltech/Qt5/Qt-5.0.0-r32/lib/libQtCore.so.5(QCoreApplication::notifyInternal(QObject*, QEvent*)+0x84) [0x7f5e4c5e53c4]
STDERR: 10  0x7f5e4c62b9dc /usr/local/Trolltech/Qt5/Qt-5.0.0-r32/lib/libQtCore.so.5(QTimerInfoList::activateTimers()+0x47c) [0x7f5e4c62b9dc]
STDERR: 11  0x7f5e4c62c25d /usr/local/Trolltech/Qt5/Qt-5.0.0-r32/lib/libQtCore.so.5(+0x25725d) [0x7f5e4c62c25d]
STDERR: 12  0x7f5e46c64a5d /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x1dd) [0x7f5e46c64a5d]
STDERR: 13  0x7f5e46c65258 /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x45258) [0x7f5e46c65258]
STDERR: 14  0x7f5e46c65429 /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x69) [0x7f5e46c65429]
STDERR: 15  0x7f5e4c62ca24 /usr/local/Trolltech/Qt5/Qt-5.0.0-r32/lib/libQtCore.so.5(QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x64) [0x7f5e4c62ca24]
STDERR: 16  0x7f5e4c5e42fb /usr/local/Trolltech/Qt5/Qt-5.0.0-r32/lib/libQtCore.so.5(QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)+0xdb) [0x7f5e4c5e42fb]
STDERR: 17  0x7f5e4c5e7c50 /usr/local/Trolltech/Qt5/Qt-5.0.0-r32/lib/libQtCore.so.5(QCoreApplication::exec()+0x80) [0x7f5e4c5e7c50]
STDERR: 18  0x7f5e4e9dae8c /home/webkitbuildbot/slaves/release64bitWebKit2_EC2/buildslave/qt-linux-64-release-webkit2/build/WebKitBuild/Release/lib/libQtWebKit.so.5(WebCore::RunLoop::run()+0x5c) [0x7f5e4e9dae8c]
STDERR: 19  0x7f5e4e09801d /home/webkitbuildbot/slaves/release64bitWebKit2_EC2/buildslave/qt-linux-64-release-webkit2/build/WebKitBuild/Release/lib/libQtWebKit.so.5(WebKit::WebProcessMainQt(QGuiApplication*)+0x37d) [0x7f5e4e09801d]
STDERR: 20  0x400b19 /home/webkitbuildbot/slaves/release64bitWebKit2_EC2/buildslave/qt-linux-64-release-webkit2/build/WebKitBuild/Release/bin/QtWebProcess() [0x400b19]
STDERR: 21  0x7f5e4bb3830d /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f5e4bb3830d]
STDERR: 22  0x400ba1 /home/webkitbuildbot/slaves/release64bitWebKit2_EC2/buildslave/qt-linux-64-release-webkit2/build/WebKitBuild/Release/bin/QtWebProcess() [0x400ba1]
Comment 1 Csaba Osztrogonác 2012-06-01 05:52:25 PDT
I skipped tests to paint the bot green - r119221

+# [Qt][WK2] REGRESSION(r119127): It made 2 fast/multicol tests crash
+# https://bugs.webkit.org/show_bug.cgi?id=88064
+fast/multicol/pagination-v-horizontal-bt.html
+fast/multicol/pagination-h-vertical-lr.html
+fast/multicol/pagination-h-vertical-rl.html
+fast/multicol/pagination-v-horizontal-tb.html
Comment 2 Alexey Proskuryakov 2012-06-01 09:01:35 PDT
(In reply to comment #0)
> - fast/multicol/pagination-h-vertical-rl.html
> - fast/multicol/pagination-v-horizontal-tb.html
> 
> On themselves they don't crash, but you can easily reproduce
> crashes if you run all fast/multicol tests.

This is confusing. These are consecutive tests, so if the second crashes when running all tests (when it's the first test in a newly launched instance), then why doesn't it crash when run individually?

fast/multicol/pagination* tests have been already skipped on Qt-mac as "new failing tests", which is also surprising because there is not much platform specific there. Do they crash on Qt-mac WK1 too (that would mean that the patch just brought WTR closer to DRT)?
Comment 3 Alexey Proskuryakov 2012-06-01 09:04:54 PDT
It is also possible that r119127 actually caused badness through some kind of memory corruption, although I find it unlikely due to it being isolated to two tests. Qt's model for injecting the internals object is different from other WK2 ports, which further complicates things.
Comment 4 Csaba Osztrogonác 2012-07-25 04:42:02 PDT
It seems resetting window.internals settings between 
tests doesn't work properly on Qt-WK2. I'm on fixing it.
Comment 5 Csaba Osztrogonác 2012-07-25 04:42:44 PDT
*** Bug 91490 has been marked as a duplicate of this bug. ***
Comment 6 Csaba Osztrogonác 2012-07-25 04:43:23 PDT
*** Bug 91063 has been marked as a duplicate of this bug. ***
Comment 7 Csaba Osztrogonác 2012-07-25 05:44:33 PDT
Created attachment 154330 [details]
Patch

multicol tests still crash as I mentioned in the description (need more investigation), but it solves all flakiness related to this bug.
Comment 8 Balazs Kelemen 2012-07-25 07:07:22 PDT
(In reply to comment #7)
> Created an attachment (id=154330) [details]
> Patch
> 
> multicol tests still crash as I mentioned in the description (need more investigation), but it solves all flakiness related to this bug.

This is not a bad workaround for the resetting problem but in long term I believe we should fix it as suggested in bug 90978. We should build a libWebCoreTestSupport static helper lib so we can use the same path as other platforms instead of going through DRTSupportQt.
Comment 9 Alexey Proskuryakov 2012-07-25 08:29:41 PDT
Comment on attachment 154330 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=154330&action=review

> Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:367
>  #if PLATFORM(QT)
> -    DumpRenderTreeSupportQt::injectInternalsObject(context);
> +    DumpRenderTreeSupportQt::resetInternalsObject(context);
>  #else
>      WebCoreTestSupport::resetInternalsObject(context);
>  #endif

Hmm, I think that there was a patch removing Qt special case altogether, but I can't find it now. Or am I day dreaming?
Comment 10 Balazs Kelemen 2012-07-25 08:47:04 PDT
(In reply to comment #9)
> (From update of attachment 154330 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=154330&action=review
> 
> > Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:367
> >  #if PLATFORM(QT)
> > -    DumpRenderTreeSupportQt::injectInternalsObject(context);
> > +    DumpRenderTreeSupportQt::resetInternalsObject(context);
> >  #else
> >      WebCoreTestSupport::resetInternalsObject(context);
> >  #endif
> 
> Hmm, I think that there was a patch removing Qt special case altogether, but I can't find it now. Or am I day dreaming?

Unfortunately it had to be rollouted because it caused link errors. I'm going for the task of setting this up.
Comment 11 Csaba Osztrogonác 2012-07-25 08:51:05 PDT
https://bugs.webkit.org/show_bug.cgi?id=90262 is the bug to remove Qt specific code
Comment 12 Csaba Osztrogonác 2012-07-25 08:52:25 PDT
But using injectInternalsObject instead of resetInternalsObject is absolutely incorrect and causes thousands of flakiness ... it should be removed as soon as possible ...
Comment 13 Balazs Kelemen 2012-07-25 09:13:34 PDT
(In reply to comment #12)
> But using injectInternalsObject instead of resetInternalsObject is absolutely incorrect and causes thousands of flakiness ... it should be removed as soon as possible ...

Ops, I misunderstood you patch, sorry. Than we can push this immediately.
Comment 14 Balazs Kelemen 2012-07-25 11:54:41 PDT
(In reply to comment #13)
> (In reply to comment #12)
> > But using injectInternalsObject instead of resetInternalsObject is absolutely incorrect and causes thousands of flakiness ... it should be removed as soon as possible ...
> 
> Ops, I misunderstood you patch, sorry. Than we can push this immediately.

I uploaded a new patch in bug 90262, I think it is slightly better so we should go with that.
Comment 15 Balazs Kelemen 2012-07-26 01:49:16 PDT
(In reply to comment #14)
> (In reply to comment #13)
> > (In reply to comment #12)
> > > But using injectInternalsObject instead of resetInternalsObject is absolutely incorrect and causes thousands of flakiness ... it should be removed as soon as possible ...
> > 
> > Ops, I misunderstood you patch, sorry. Than we can push this immediately.
> 
> I uploaded a new patch in bug 90262, I think it is slightly better so we should go with that.

My fix still doesn't pass on the ews's (although it built for me locally), so let's go ahead with this patch.
Comment 16 Zoltan Herczeg 2012-07-26 04:31:06 PDT
rs=me
Comment 17 Csaba Osztrogonác 2012-07-27 00:10:43 PDT
Comment on attachment 154330 [details]
Patch

landed in r123841