Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upWPT cookies/http_state tests are slow #25606
Comments
|
@CYBAI and I did some more investigation - the domain_state tests have test cases that include a Location header but no 3xx redirect code. Our fetch code (and the spec) handles this by ignoring the header, but the code in the constellation for handling redirects for navigations only looks for the presence of the header and gets confused: https://github.com/servo/servo/blob/master/components/constellation/network_listener.rs |
Initiate redirect fetching iff the request has a location Without this checking, we will run into a TIMEOUT request because http_redirect_fetch will return immediately when location doesn't exist. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #25606 - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Initiate redirect fetching iff the request has a location Without this checking, we will run into a TIMEOUT request because http_redirect_fetch will return immediately when location doesn't exist. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #25606 - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
#26475 will fix most of TIMEOUT tests but there's still a TIMEOUT test case in |
|
Is this supposed to be closed? |
|
@atouchet Thanks! This gets better now but I will expect it's closed when we fix the |
|
Just did some investigation. The last TIMEOUT test is While running the page directly with $ RUST_LOG=net ./mach run http://wpt.live/cookies/http-state/resources/cookie-setter.py\?file\=disabled-chromium0022then, I will see above error page without any response log because we've failed to request.
Due to the error message and also the test case contains a new-line character, I suspect if this is an issue related to But, with more investigation to spec (whatwg/xhr#165) and wpt tests (web-platform-tests/wpt#13663, web-platform-tests/wpt#10424), looks like it's correct to reject the request when a header contains a 0x00 value Also, we don't TIMEOUT in the I wonder if it's related to how we treat network error for navigate request instead |
|
From what I'm remembering about the issue I originally saw, it wasn't just that some tests were getting an inevitable TIMEOUT, it was also that there were just plain slow ones that'd time out for me under usual CPU load but could eventually pass if allowed enough extra time to do it. What you're talking about here is mostly what I had posted as #25604. |
|
@pshaughn oh, thanks! and what I investigated at #25606 (comment) is basically #25605. |

Running on a machine that's much slower than taskcluster, I find that I have to set --timeout-multiplier as high as 4 to get through some tests consistently. This problem is not necessarily about cookies, as the tests are doing entire HTTP roundtrips against the cookie-setter.py.
If it is actually the cookies slowing us down, it may be that the cookie jar is getting deserialized and re-serialized too often; I get the impression from the code that we are passing around the entire cookie store even when we already know which one URL we want to look up.