When viewing a Yahoo! Mail message with a ~5 MB text attachment, a debug build of ToT WebKit hangs rendering the page. It seems to be an infinite loop as I waited 5-10 minutes on a Quad G5 for the page to finish, but never did.
* STEPS TO REPRODUCE
1. Launch Safari with debug build of WebKit.
2. Open test case.
WebKit hangs rendering the page.
Unknown. Tested with a local debug build of WebKit r25099 with Safari 3 Public Beta v. 3.0.3 (522.12.1) on Mac OS X 10.4.10 (8R218) on a Quad G5 2.5 Mhz.
Also tested with a local debug build of WebKit r25090 with Safari 3 Public Beta v. 3.0.3 (522.12.1) on Mac OS X 10.4.10 (8R218) on a PowerBook G4 1.5 MHz.
Created attachment 15989 [details]
Test case (.tar.bz2)
This is the test case. Unarchive it and open long-message.html.
$ tar xjvf long-message.tar.bz2
Created attachment 15990 [details]
Sample of the hang
Sample taken of the hang:
$ sample Safari 10 10
I see the same issue on Windows Server 2003 R2. Debug build hangs forever in layout, and Release build doesn't break a sweat.
From the sample, it looks like the hang is in the new RenderFlow::checkConsistency (a debug-only function). This might indicate a problem in the way that function was written, or a real bug in the render tree that just happens to escape crashing in release builds.
(In reply to comment #5)
> From the sample, it looks like the hang is in the new
> RenderFlow::checkConsistency (a debug-only function). This might indicate a
> problem in the way that function was written, or a real bug in the render tree
> that just happens to escape crashing in release builds.
Or the consistency check might just have bad performance. If it has a poorer complexity curve than the real code, then we might get hangs due to the consistency check that don't reflect any real problem at all.
Seems fine to turn off the consistency checks and use a macro to turn them on when needed.
As with the hash table consistency checks, they're valuable, but by their nature can be slow on pages where the real algorithm is still quite fast.
RenderFlow::checkConsistency() just makes this case O(n^2) by iterating over all line boxes for each line box created. Might make debugging some real performance problems with debug build harder, otherwise not a big deal.
I think we should turn off the consistency checks by default and add an easy way to turn them back on.
Committed revision 25319.