Bug 72694 - [Qt] fast/canvas/canvas-lineWidth.html timeouts intermittently on 64 bit
Summary: [Qt] fast/canvas/canvas-lineWidth.html timeouts intermittently on 64 bit
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P1 Major
Assignee: Rafael Brandao
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks: 79668
  Show dependency treegraph
 
Reported: 2011-11-18 00:26 PST by Csaba Osztrogonác
Modified: 2012-05-22 10:27 PDT (History)
9 users (show)

See Also:


Attachments
test modified to debug why length has such a big value (or negative) (1.61 KB, application/javascript)
2011-11-23 13:15 PST, Rafael Brandao
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Csaba Osztrogonác 2011-11-18 00:26:33 PST
$ Tools/Scripts/old-run-webkit-tests fast/canvas/canvas-lineWidth.html --iterations 100 --singly
54 test cases (54%) succeeded
46 test cases (46%) timed out

But it works fine on 32 bit.
Comment 1 Rafael Brandao 2011-11-23 13:15:25 PST
Created attachment 116405 [details]
test modified to debug why length has such a big value (or negative)
Comment 2 Rafael Brandao 2011-11-23 13:16:38 PST
I've spent a bit of time on this, so I'll share my findings - but I didn't find a solution yet.

Timeouts on this test happens because the length of an image data is returning a very large number (random)... when it returns a negative value (I suppose it is because of some overflow), then the for inside compareRows that will check every pixel at the image will just not run.

Now trying to understand why this length is getting this strange value, I've decided to stop this for inside the function and not execute it at all. Then I've printed out the length in both calls of compareRows and they're being printed correctly. Then instead of doing that for, I've decided to put a for that does nothing, just iterate N times. And for my surprise, the length get corrupted in the second call when N >= 985. Even more weird, if I print the length before using compareRows in the second time then it'll show the correct length... it just happens when it goes inside the function.

I've also attached the modified version of this test that I was using to debug. My output for this debug:

typeof(ctx) = object
# comparing data... size1=240000
# comparing data... size2=240000
comparing data... size0=240000
comparing data... size1=240000
## typeof(ctx) = object
## comparing data... size1=240000
## comparing data... size2=240000
# comparing data... size1=623014176
# comparing data... size2=623014176
comparing data... size0=623014176
comparing data... size1=623014176
Comment 3 Eric Seidel (no email) 2011-12-02 14:01:20 PST
This appears to time out on all platforms.  The test should be skipped/disabled.
Comment 4 Rafael Brandao 2011-12-04 19:20:01 PST
(In reply to comment #3)
> This appears to time out on all platforms.  The test should be skipped/disabled.

I've imagined that... the issue would just disappear depending on what context (inside a function or not) the data comparison is done, this bothers me.

It could be slightly modified to pass... instead of creating a function to avoid code repetition and compare the image data, we could avoid creating that function. This approach would probably solve it but would also hide this issue that is potentially something big... I'm sorry I couldn't investigate more about it.
Comment 5 Caio Marcelo de Oliveira Filho 2012-05-19 10:09:03 PDT
(In reply to comment #0)
> $ Tools/Scripts/old-run-webkit-tests fast/canvas/canvas-lineWidth.html --iterations 100 --singly

For the record: this doesn't timeout for me neither in Qt on Mac Lion (64 bits) and Apple port on Mac Lion.
Comment 6 Csaba Osztrogonác 2012-05-21 03:14:28 PDT
(In reply to comment #5)
> (In reply to comment #0)
> > $ Tools/Scripts/old-run-webkit-tests fast/canvas/canvas-lineWidth.html --iterations 100 --singly
> 
> For the record: this doesn't timeout for me neither in Qt on Mac Lion (64 bits) and Apple port on Mac Lion.

It passes on Qt Linux now ...
Comment 7 Rafael Brandao 2012-05-22 10:27:29 PDT
It looks like someone has unskipped it already, then I will close this bug.