KhronosGroup / KhronosGroup/WebGL
Race condition in test texImage2DHTML.html?
- Dominant language
- HTML
- Stars
- 2.9k
- Forks
- 703
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 4
Description
I'm seeing `FAIL` results in Servo in test https://github.com/KhronosGroup/WebGL/blob/master/conformance-suites/2.0.0/conformance/more/functions/texImage2DHTML.html which I think may be caused by a race condition in the test.
The `FAIL` is caused by the `testTexImage2DNonSOP` test running before the `` has loaded, causing the `ctx.drawImage(img,0,0)` to throw an `InvalidState` exception. This happens when the test runs before the `img` is initialized at https://github.com/KhronosGroup/WebGL/blob/master/conformance-suites/2.0.0/conformance/more/functions/texImage2DHTML.html#L117
This seems to be a race condition between the `document.load` event which initializes the img, and the test running.
Contributor guide
Research direction
Start with conformance-suites/2.0.0/conformance/more/functions/texImage2DHTML.html, especially the initialization near line 117 and the testTexImage2DNonSOP test. Reproduce the failure in Servo and determine whether the test can run before the img element has loaded. Done means the test no longer throws InvalidState because of that ordering race.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100