New issue
Advanced search Search tips

Issue 644031 link

Starred by 6 users

Issue metadata

Status: WontFix
Owner:
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

CDN Fetch Requests Fail

Reported by j...@cyph.com, Sep 5 2016

Issue description

Chrome Version       : 55.0.2849.0 (Official Build) canary (64-bit)
URLs (if applicable) : cyph.ws, na.cdn.cyph.com
Other browsers tested: Chrome 52.0.2743.116 (Official Build) (64-bit)
  Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
     Safari: OK
    Firefox: OK
         IE: OK

What steps will reproduce the problem?
(1) Navigate to cyph.ws with console/inspector toolkit open

OR

(1) Run the following code in the console: fetch('https://na.cdn.cyph.com/cyph/pkg').then(o => o.text()).then(s => console.log(s)).catch(err => console.log(err))


What is the expected result?
Cyph application loads without error

What happens instead?
Application fails to load, and the following error is in the console: "Uncaught (in promise) TypeError: Failed to fetch"

Please provide any additional information below. Attach a screenshot if
possible.

For whatever reason, all network requests to na.cdn.cyph.com fail with the status "(canceled)"

For comparison, fetch('https://api.cyph.com/continent').then(o => o.text()).then(s => console.log(s)).catch(err => console.log(err)), works.

Possibly relevant details:

* server is running Node.js

* server is using HTTP/2 implementation from https://www.npmjs.com/package/spdy

* server is configured with HSTS and HPKP

* responses are gzip-compressed using zopfli, with `Content-Encoding: gzip` explicitly set

* explicitly passing `{headers: new Headers({'Accept-Encoding': 'gzip'})}` to fetch makes no difference

* issue is reproducible whether we test with `fetch` or `XMLHttpRequest`

* requests are cross-domain

* CORS header in use is `Access-Control-Allow-Origin: *`

* passing `mode: 'cors'` or `mode: 'no-cors'` makes no difference

* if helpful for further investigation, source code of server (118 LoC) is here: https://github.com/cyph/cyph/blob/master/serverconfig/cdn.sh#L42

 
Screen Shot 2016-09-04 at 6.56.05 PM.png
65.5 KB View Download
Screen Shot 2016-09-04 at 6.57.55 pm.png
76.0 KB View Download
Screen Shot 2016-09-04 at 6.58.12 pm.png
48.9 KB View Download
Screen Shot 2016-09-04 at 6.58.20 pm.png
116 KB View Download
Screen Shot 2016-09-04 at 7.19.23 pm.png
226 KB View Download
Chrome Stable Comparison.png
410 KB View Download
I wasn't able to reproduce an error. Can you repro this in Incognito or in a clean profile without any potential interference from browser extensions (ad blockers, etc)?
Cc: mmenke@chromium.org
Components: Internals>Network>HTTP2 Internals>Network>SSL
Status: Untriaged (was: Unconfirmed)
It's working for me on M53 beta, but I'm getting ERR_CONNECTION_RESET on Canary  (rather than the ERR_FAILED you're getting).  We're negotiating an SSL connection, send a request, and then the server resets the connection.

Could you provide a log, instructions here:  https://sites.google.com/a/chromium.org/dev/for-testers/providing-network-details.

SSL/HTTP2 folks:  Any big change in SSL negotiation, or HTTP features between M53 and M55 that might make a server sad?
We added RSA-PSS, but this does not appear to be one of the servers that fails against it. Might be worth doing a bisect.
Labels: Needs-Bisect
A bisect sounds like a great idea to me.
Cc: davidben@chromium.org
Components: -Internals>Network>SSL
Owner: b...@chromium.org
Status: Assigned (was: Untriaged)
https://chromium.googlesource.com/chromium/src/+log/4c361942b436b45ddcaab02d6829921b8f3c9e81..bf03b6136f729384110523754d4ee57ed8ba9356

I'm guessing it's https://chromium.googlesource.com/chromium/src/+/b3cafaaea4c3c0c1cf553d8ec9999f83a8c1c7f4. Assigning to bnc@ to look at.

Comment 6 by j...@cyph.com, Sep 6 2016

Requested log is attached. Let me know if you need anything else.
What software are you all using for HTTP/2? If the bisect is correct, it does not like the larger SETTINGS_HEADER_TABLE_SIZE advertisement? I'm not familiar with HTTP/2 and will defer to bnc@ as to whether it is legal for a server to reject such a thing. (I would think there'd be some negotiation mechanism to pick a smaller value without breaking the connection?)
Labels: -Needs-Bisect

Comment 9 by j...@cyph.com, Sep 6 2016

Mentioned in the original submission. HTTP/2 is being handled by:
https://www.npmjs.com/package/spdy
Ah, my bad, I missed that. Thanks!

Looks like this is coming from here:
https://github.com/indutny/hpack.js/blob/7338b7ec5c2fc3c234bbf56d1e570925c15d32a1/lib/hpack/table.js#L82

Which gets set by way of here:
https://github.com/indutny/spdy-transport/blob/aa2d889f7b49d6f6b52ed6979fcb236f6662eb39/lib/spdy-transport/protocol/http2/hpack-pool.js#L19

And defined here:
https://github.com/indutny/spdy-transport/blob/aa2d889f7b49d6f6b52ed6979fcb236f6662eb39/lib/spdy-transport/protocol/http2/constants.js#L18

bnc: Is this correct behavior for an h2 implementation, or is it supposed to do something else in response to a larger value from the client?
Receipt of SETTINGS_HEADER_TABLE_SIZE should not cause a server to throw a protocol error. If the client sets this value to X, the server is free to use any value <= X.

http://httpwg.org/specs/rfc7540.html#SettingValues
"SETTINGS_HEADER_TABLE_SIZE (0x1):
Allows the sender to inform the remote endpoint of the maximum size of the header compression table used to decode header blocks, in octets. The encoder can select any size equal to or less than this value by using signaling specific to the header compression format inside a header block (see [COMPRESSION]). The initial value is 4,096 octets."

Assuming davidben@'s links point to the right code, this definitely looks like a server bug:
https://github.com/indutny/hpack.js/blob/7338b7ec5c2fc3c234bbf56d1e570925c15d32a1/lib/hpack/table.js#L82
https://github.com/indutny/spdy-transport/blob/8bb0b80dbef87da21a40a88f642259528638daff/lib/spdy-transport/connection.js#L514

Comment 12 by b...@chromium.org, Sep 16 2016

Cc: b...@chromium.org
 Issue 647245  has been merged into this issue.

Comment 13 by b...@chromium.org, Sep 16 2016

Status: WontFix (was: Assigned)
Re #7 and #11: indeed the issue seems to be the server choking on valid HTTP/2 SETTINGS.  Since Chrome is behaving in compliance with the specs, closing this as WontFix.
bnc: Since you understand the protocol (I don't) and we know which project is choking, could you file a ticket with them to explain the issue? Also, do we have appropriate UMA metrics to check before and after the change to make sure this bug isn't too widespread? E.g. on the TLS side, we try to avoid making changes without a probe of top million sites just because of how widespread latent implementation bugs tend to be.

Comment 15 by b...@chromium.org, Sep 19 2016

Bug has been fixed in Node.js HTTP/2 server, see https://github.com/indutny/spdy-transport/issues/29.  I was able to reproduce bug locally with a server checkout before the fix, and I confirmed that the issue is resolved by updating the server.

Comment 16 by ryan@cyph.com, Sep 25 2016

Nice, thanks!

Sign in to add a comment