New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 876732 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

fast/dom/HTMLImageElement/image-srcset-w-onerror.html appears to be flaky

Project Member Reported by richard....@arm.com, Aug 22

Issue description

Exposed as part of https://crbug.com/742413, I've noticed that this test seems to suffer from timing issues. The console output disappears and the test fails. 

When building master (7e5581fb2aabac5970f6bf8ea1012ad2487a4b15), strace -f third_party/blink/tools/run_web_tests.py -t Release fast/dom/HTMLImageElement/image-srcset-w-onerror.html --timing fails around 90% of the time (18/20 runs). It also seems to occur regularly when my system is under relatively heavy load (e.g. when running other layout tests), and in some binaries (even when they shouldn't contain any relevant changes). 

Analysis of the strace when the test does succeed, indicates that the renderer process is printing to stderr as expected, whereas it is not in the original:

rtownsend@e105622-lin:/ssd/skip-styling-upstream/chromium_build/src$ grep -Rn "CONSOLE" log
106750:[pid 13547] read(5, "CONSOLE MESSAGE: line 14: Error "..., 4096) = 44
106797:[pid 13547] write(5, "CONSOLE MESSAGE: line 14: Error "..., 44) = 44
rtownsend@e105622-lin:/ssd/skip-styling-upstream/chromium_build/src$ grep -Rn "CONSOLE" ok_log
106743:[pid 14195] write(1, "CONSOLE MESSAGE: line 14: Error "..., 74 <unfinished ...>
108161:[pid 14127] read(5, "CONSOLE MESSAGE: line 14: Error "..., 4096) = 44

 
Components: Blink>Layout
Digging around with the printing code in blink_test_runner.cc, seems like it actually occurs at a deeper layer.

https://jsfiddle.net/mx7ek024/6/

When you first load the page, it looks fine, but when you hit the Run button in the corner, it doesn't run onerror (see screenshot). Firefox looks correct.
onerror.png
250 KB View Download
That's under content_shell (Release mode) 7e5581fb2aabac5970f6bf8ea1012ad2487a4b15 (without strace), but the jsfiddle's also broken in Chrome 68 (release build). Firefox 61 displays correctly, iOS 11 Safari displays correctly too.
With this reproducer:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<script>
function displayError() {
  document.getElementById("result").innerHTML = "Errored.";
}
</script>
<div id="stage">
   <img srcset="thisimagedoesnotexist.gif 96w" onerror="displayError()" />
</div>
<div id="result">Not loaded yet.</div>
</body>
</html>

Results in either "Not loaded yet." or "Errored.". When you see "Not loaded yet.", there's only one network request in the developer tools. When you see "Errored.", there are two requests on the developer tools, one of which has an unknown origin (see screenshot). I also haven't had much success replicating it under rr.




network.png
58.1 KB View Download
Does seem that if you removed the "96w" from the end of the srcset from the previous reproducer, you end up with a stable result. So it may be that the load is being dispatched without the implicit width being available... but idk.
Labels: Needs-Milestone
Components: -Blink>Layout Blink>Image
A guess would be that the "regular" image load is racing with a load request due to "changes to the environment". The latter type suppresses 'error' events.
Could you clarify "changes to the environment"? Could that be something like a change or recalculation to the document's implicit size?
Any media query change in theory, but probably most likely a change in the viewport size.
Status: Available (was: Unconfirmed)
Project Member

Comment 12 by bugdroid1@chromium.org, Aug 30

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ac5b58adffd2f01738aa272a2492069829811fa2

commit ac5b58adffd2f01738aa272a2492069829811fa2
Author: Fredrik Söderquist <fs@opera.com>
Date: Thu Aug 30 10:28:48 2018

Update expectation for fast/dom/HTMLImageElement/image-srcset-w-onerror.html

Re-routing to newer bug which contains more analysis of the issue.

TBR=schenney@chromium.org

Bug:  636207 , 876732
Change-Id: Ic857feff265217a0244fd0bd25999d0db354b0b2
Reviewed-on: https://chromium-review.googlesource.com/1196343
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#587507}
[modify] https://crrev.com/ac5b58adffd2f01738aa272a2492069829811fa2/third_party/WebKit/LayoutTests/TestExpectations

Cc: arv@chromium.org
 Issue 636207  has been merged into this issue.
Hi dear team,
Any news on this issue?

I have encountered it myself and it seems to happen only in chrome.

Thank you.

Sign in to add a comment