Closed Bug 1128038 Opened 11 years ago Closed 11 years ago

HTTP PATCH requests over SSL fail 40% of the time in FF 35 with HTTP2.0 flag set

Categories

(Core :: Networking: HTTP, defect)

35 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla38
Tracking Status
firefox35 --- affected
firefox36 + fixed
firefox37 + fixed
firefox38 --- fixed

People

(Reporter: pamela, Assigned: mcmanus)

References

Details

(Whiteboard: [spdy])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.91 Safari/537.36 Steps to reproduce: (Note: We are going to move PATCH to PUT to fix this soon, so this may not work for you soon) 1. Visit https://www.khanacademy.org/computing/computer-programming/programming/drawing-basics/p/challenge-crazy-face 2. Open your network monitor. 3. Type a /. Wait 3 seconds. See PATCH request. 4. Repeat until you see a 400. It will look like it sent the request payload, but actually, it is turned into an empty string by the time it arrives at our server. We did some experimentation and found that: 1) It does not happen over HTTP, just HTTPS 2) It does not happen if we set network.http.spdy.enabled.http2draft to false. 3) It does not happen if we proxy through Charles: SSL connection from FF 35.0.1 to khanacademy.org: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, 128 bit keys SSL connection when proxying through Charles: TLS_DHE_RSA_WITH_AES_128_CBC_SHA, 128 bit keys We now see 50,000 incidents of these a day, and they have been steadily increasing since the release of Firefox 35. You can see that graph here: https://twitter.com/pamelafox/status/560885009758687232 Actual results: Server received an empty request payload. Expected results: Server should have received the full JSON payload.
Component: Untriaged → Networking: HTTP
Product: Firefox → Core
hi Pamela, thanks for taking the time for the bug report. It seems this may be the same issue as bug 1072525 which we haven't been able to build a good repro for - so I'm actually glad to see this report. It seems your testcase has already been transitioned off PATCH - I don't see a PATCH request when I load the resource. Do you think you could make a failing version of the resource (that uses PATCH) available under a different URL so it doesn't interfere with your production traffic? Oh - and can you be clear which subresource is being carried with the PATH method? Those things would really help. Lastly, and I know this is asking a lot - so if you can't do this part but can do the above things please don't think you have to do it all - an http log would help a lot if you can reproduce the issue. To generate the log see the directions here: https://developer.mozilla.org/en-US/docs/Mozilla/Debugging/HTTP_logging
Blocks: 1072525
Whiteboard: [spdy]
interesting - I see that you're using the google front end just as in 1072525 .. its possible (but unclear) the error is on their side (I presume they are gatewaying to http/1 to your service).. so the information in comment 1 would be very useful in getting whatever implementation that is having trouble up to speed.
Flags: needinfo?(pamela)
Okay, I've deployed the PATCH version to a non-default version (that's an App Engine thing where it shares same datastore but different code): https://znd-deleteme-dot-khan-academy.appspot.com/computing/computer-programming/programming/drawing-basics/p/challenge-crazy-face I was able to get a 400 after 20 tries, so it can take a few minutes, since you have to wait a few seconds after typing before we send off the PATCH (it's debounced). Hopefully you can get the 400 as well, otherwise I can try to set up the logging.
Flags: needinfo?(pamela)
Pamela - this is my bug, thank you I was able to find it thanks to your test case. with DAV methods sometimes we would put the END_STREAM bit on both the HEADERS frame and the DATA frame that carries the payload (in this case the json). fix forthcoming
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #8558020 - Flags: review?(hurley)
Assignee: nobody → mcmanus
Status: NEW → ASSIGNED
Comment on attachment 8558020 [details] [diff] [review] h2 DAV methods set end_stream bit twice Review of attachment 8558020 [details] [diff] [review]: ----------------------------------------------------------------- Removing effectively duplicate code *and* fixing a semi-long-standing bug? NICE
Attachment #8558020 - Flags: review?(hurley) → review+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Comment on attachment 8558020 [details] [diff] [review] h2 DAV methods set end_stream bit twice Approval Request Comment [Feature/regressing bug #]:http2 original [User impact if declined]: problem with http2 based DAV services.. h2 is also disabled on b2g due to this bug and fixing it means we can enable it there. new h2 services are being rolled out every day as http/2 finishes standardization [Describe test coverage new/current, TreeHerder]: new tbpl test [Risks and why]: very low risk [String/UUID change made/needed]: none
Attachment #8558020 - Flags: approval-mozilla-beta?
Attachment #8558020 - Flags: approval-mozilla-aurora?
Attachment #8558020 - Flags: approval-mozilla-beta?
Attachment #8558020 - Flags: approval-mozilla-beta+
Attachment #8558020 - Flags: approval-mozilla-aurora?
Attachment #8558020 - Flags: approval-mozilla-aurora+
Blocks: 1081613
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: