Last Comment Bug 663096 - websockets - deflate stream and pywebsockets-07 unclean closes
: websockets - deflate stream and pywebsockets-07 unclean closes
Status: RESOLVED FIXED
[inbound]
:
Product: Core
Classification: Components
Component: Networking: WebSockets (show other bugs)
: unspecified
: x86_64 Linux
: -- normal (vote)
: mozilla7
Assigned To: Patrick McManus [:mcmanus] PTO until Sep 6
:
Mentors:
Depends on: 687295
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-09 06:15 PDT by Patrick McManus [:mcmanus] PTO until Sep 6
Modified: 2011-09-20 07:47 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
update pywebsockets to 489 v1 (81.13 KB, patch)
2011-06-09 06:28 PDT, Patrick McManus [:mcmanus] PTO until Sep 6
cbiesinger: review+
Details | Diff | Splinter Review
make pywebsockets avoid RST v1 (4.79 KB, patch)
2011-06-09 06:28 PDT, Patrick McManus [:mcmanus] PTO until Sep 6
cbiesinger: review+
Details | Diff | Splinter Review
turn deflate-stream on v1 (1.12 KB, patch)
2011-06-09 06:35 PDT, Patrick McManus [:mcmanus] PTO until Sep 6
cbiesinger: review+
Details | Diff | Splinter Review

Description Patrick McManus [:mcmanus] PTO until Sep 6 2011-06-09 06:15:54 PDT
pywebsockets version 470 can generate TCP RSTs when using the deflate-stream extension, or in certain other error cases. These manifest as unclean close errors in some of the websocket tests (often test-8 of test_Websocket.html, but they can be anywhere), depending on the test case this pops up a random orange. Due to this issue with the tests the deflate-stream extension was preffed off when checked in (see bug 658546).

The issue has been resolved entirely in things NPOTB.

I am going to attach 3 patches here:

* update our test code to rev 489 of pywebsockets. This fixes a different compression bug in the server and to avoid forking the code, it is what I based the next patch on (NPOTB)

* a patch to drain the input buffers in pywebsockets before doing a socket level close, to remove the cause of the RST. I have sent this to the pywebsockets author. (NPOTB)

* a patch to re-enable the deflate-stream extension which should now run without orange.

once this is landed I'll ask for aurora approval as no code in firefox has changed.
Comment 1 Patrick McManus [:mcmanus] PTO until Sep 6 2011-06-09 06:28:03 PDT
Created attachment 538246 [details] [diff] [review]
update pywebsockets to 489 v1
Comment 2 Patrick McManus [:mcmanus] PTO until Sep 6 2011-06-09 06:28:53 PDT
Created attachment 538247 [details] [diff] [review]
make pywebsockets avoid RST v1
Comment 3 Patrick McManus [:mcmanus] PTO until Sep 6 2011-06-09 06:35:35 PDT
Created attachment 538249 [details] [diff] [review]
turn deflate-stream on v1
Comment 4 Christian :Biesinger (don't email me, ping me on IRC) 2011-06-10 13:12:29 PDT
Comment on attachment 538247 [details] [diff] [review]
make pywebsockets avoid RST v1

+              data = self._connection.read(1)

why do this byte-by-byte? why not read larger chunks?
Comment 5 Patrick McManus [:mcmanus] PTO until Sep 6 2011-06-10 13:52:06 PDT
(In reply to comment #4)
> Comment on attachment 538247 [details] [diff] [review] [review]
> make pywebsockets avoid RST v1
> 
> +              data = self._connection.read(1)
> 
> why do this byte-by-byte? why not read larger chunks?

mostly just because that's what pywebsockets already does for data of undetermined length.. and realistically I know it is just 3 to 5 bytes.

Note You need to log in before you can comment on or make changes to this bug.