Bug 36703 - Timer restart loop during page loading
Summary: Timer restart loop during page loading
Status: CLOSED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Other
: P1 Normal
Assignee: QtWebKit Unassigned
URL: http://www.cnnturk.com
Keywords:
Depends on:
Blocks: 35784
  Show dependency treegraph
 
Reported: 2010-03-27 07:48 PDT by Ismail Donmez
Modified: 2018-03-29 08:50 PDT (History)
9 users (show)

See Also:


Attachments
Backtrace (2.24 KB, text/plain)
2010-03-27 07:49 PDT, Ismail Donmez
no flags Details
Patch (1.75 KB, patch)
2010-03-29 02:38 PDT, Antti Koivisto
kenneth: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ismail Donmez 2010-03-27 07:48:08 PDT
This is on Windows CE 5.0 with ARM9 CPU (400mhz fwiw), WebKit from git as of today. I see 100% cpu usage while loading cnnturk.com and the site takes ages to load if it ever does. Enabling REQUEST_DEBUG reveals something like

HOST cdn1.cnnturk.com COUNT 1 LOADING http:// 
HOST cdn1.cnnturk.com COUNT 2 LOADING http:// 
HOST cdn1.cnnturk.com COUNT 3 LOADING http:// 
HOST cdn1.cnnturk.com COUNT 4 LOADING http:// 
HOST cdn1.cnnturk.com COUNT 5 LOADING http:// 
HOST cdn1.cnnturk.com COUNT 6 LOADING http:// 
HOST cdn1.cnnturk.com COUNT 7 LOADING http:// 
HOST cdn1.cnnturk.com COUNT 8 LOADING http://

looks like its hammering the cpu with requests, if I break the operation the backtrace is

>	qtwebkit4.dll!WebCore::Loader::scheduleServePendingRequests(void) Line: 156, Byte Offsets: 0x18	C++
 	qtwebkit4.dll!WebCore::Loader::Host::servePendingRequests(WTF::Deque<WebCore::Request *>& requestsPending = {...}, bool& serveLowerPriority = false) Line: 372, Byte Offsets: 0x514	C++
 	qtwebkit4.dll!WebCore::Loader::Host::servePendingRequests(WebCore::Loader::Priority minimumPriority = 0) Line: 310, Byte Offsets: 0x50	C++
 	qtwebkit4.dll!WebCore::Loader::servePendingRequests(WebCore::Loader::Priority minimumPriority = 0) Line: 183, Byte Offsets: 0x104	C++
 	qtwebkit4.dll!WebCore::Timer<WebCore::Loader>::fired(void) Line: 98, Byte Offsets: 0x14	C++
 	qtwebkit4.dll!WebCore::ThreadTimers::sharedTimerFiredInternal(void) Line: 115, Byte Offsets: 0x114	C++
 	qtwebkit4.dll!WebCore::SharedTimerQt::timerEvent(QTimerEvent* ev = 0x00000000) Line: 106, Byte Offsets: 0x3c	C++
 	qtcore4.dll!QObject::event(QEvent* e = 0x00000000) Line: 1276, Byte Offsets: 0x33c	C++
 	qtgui4.dll!QApplicationPrivate::notify_helper(QObject* receiver = 0x00000000, QEvent* e = 0x00000000) Line: 4303, Byte Offsets: 0x8c	C++
 	qtgui4.dll!QApplication::notify(QObject* receiver = 0x00000000, QEvent* e = 0x00000000) Line: 4262, Byte Offsets: 0xec8	C++
 	qtcore4.dll!QCoreApplication::notifyInternal(QObject* receiver = 0x00000000, QEvent* event = 0x00000000) Line: 717, Byte Offsets: 0x74	C++
 	qtcore4.dll!QEventDispatcherWin32::event(QEvent* e = 0x00000000) Line: 1109, Byte Offsets: 0x88	C++
 	qtgui4.dll!QApplicationPrivate::notify_helper(QObject* receiver = 0x00000000, QEvent* e = 0x00000000) Line: 4303, Byte Offsets: 0x8c	C++
 	qtgui4.dll!QApplication::notify(QObject* receiver = 0x00000000, QEvent* e = 0x00000000) Line: 4262, Byte Offsets: 0xec8	C++
 	qtcore4.dll!QCoreApplication::notifyInternal(QObject* receiver = 0x00000000, QEvent* event = 0x00000000) Line: 717, Byte Offsets: 0x74	C++
 	qtcore4.dll!QCoreApplicationPrivate::sendPostedEvents(QObject* receiver = 0x00000000, int event_type = 0, QThreadData* data = 0x00000000) Line: 1361, Byte Offsets: 0x244	C++
 	qtcore4.dll!qt_internal_proc(HWND__* hwnd = 0x00000000, unsigned int message = 0, unsigned int wp = 0, long int lp = 0) Line: 492, Byte Offsets: 0x1e0	C++
 	0x03f85c04	

This is also discussed in the thread over @ https://lists.webkit.org/pipermail/webkit-qt/2010-March/000273.html
Comment 1 Ismail Donmez 2010-03-27 07:49:46 PDT
Created attachment 51829 [details]
Backtrace

Backtrace file, easier to read this way
Comment 2 Benjamin Poulain 2010-03-27 12:27:34 PDT
Any other URLs having the same issue?
Comment 3 Ismail Donmez 2010-03-27 12:31:20 PDT
http://haberturk.com exhibits the same behaviour.
Comment 4 Antti Koivisto 2010-03-29 02:03:58 PDT
This looks like a regression from http://trac.webkit.org/changeset/54526 and I believe affects all platforms, not just Qt.

That change introduces a timer repeat loop that will peak CPU during page loading.
Comment 5 Ismail Donmez 2010-03-29 02:14:41 PDT
(In reply to comment #4)
> This looks like a regression from http://trac.webkit.org/changeset/54526 and I
> believe affects all platforms, not just Qt.
> 
> That change introduces a timer repeat loop that will peak CPU during page
> loading.

Reverting that change fixes cnnturk.com & haberturk.com for me. Thanks for
hunting this down!
Comment 6 Antti Koivisto 2010-03-29 02:38:37 PDT
Created attachment 51892 [details]
Patch
Comment 7 Ismail Donmez 2010-03-29 02:50:31 PDT
Patch fixes the problem for me, also http://www.parentsdanslesparages.com/ page works fine.
Comment 8 Antti Koivisto 2010-03-29 03:39:26 PDT
Comment on attachment 51892 [details]
Patch

Tests look good too.
Comment 9 Antti Koivisto 2010-03-29 09:05:57 PDT
Sending        WebCore/ChangeLog
Sending        WebCore/loader/loader.cpp
Transmitting file data ..
Committed revision 56723.
Comment 10 Simon Hausmann 2010-03-30 04:51:40 PDT
Revision r56723 cherry-picked into qtwebkit-2.0 with commit fe2de805222c2bf698244473e5d160305403f357
Comment 11 murat 2018-03-29 06:50:23 PDT
(In reply to Ismail Donmez from comment #7)
> Patch fixes the problem for me, also http://www.guvenlikonline.com/
> page works fine.
Comment 12 murat 2018-03-29 08:50:17 PDT
(In reply to murat from comment #11)
> (In reply to Ismail Donmez from comment #7) 
> > Patch fixes the problem for me, also http://www.guvenlikonline.com/ And http://www.akinprefabrik.com
> > page works fine.