Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Websocket hangs when >64 KiB packet is sent across it [Windows only] #10

Closed
perlun opened this issue May 29, 2013 · 1 comment
Closed

Comments

@perlun
Copy link
Contributor

perlun commented May 29, 2013

Hi,

Unsure if this is a problem with celluloid-websocket-client, celluloid-io or reel, so posting both to the first and last one in this list for now... (will add corresponding issue ref here shortly)

As the subject says, I'm seeing really, really weird behavior with the celluloid-websocket-client. It seems like a "big packet" (bigger than 64 KiB) somehow breaks the socket, making is malfunction and not receive any more packets.

This is with JRuby on Windows. On OSX, everything works as it should, both with small and big packets.

More specifically, these are the exact scenarios (quoting https://github.com/perlun/celluloid-websocket-client/blob/big_packets_bug/examples/roundtrip_client.rb#L19):

if ARGV[0] == 'small'
  # Packets less than 64 KiB, using 16-bit payload length.
  #
  # Works, both on Windows (client + server) and OSX (client + server). No problems encountered with this packet size.
  msg = '123456' * 10000
elsif ARGV[0] == 'big'
  # Packets bigger than 64 KiB, triggering a 64-bit payload length (RFC 6455, section 5.2, "Payload length")
  #
  # Works on OSX client + server
  # Fails on Windows client + server (crashes the websocket so that we never get any response on the second packet either).
  # Fails on Windows client + OSX server (likewise).
  # Fails on Windows server + OSX client (likewise).
  msg = '123456' * 100000
end

To be able to properly isolate the issue, I've made a small test suite which reproduces it. You can find it here: https://github.com/perlun/celluloid-websocket-client/tree/big_packets_bug

(clone my repo and checkout the big_packets_bug branch.)

Run the server like this (after bundle install --standalone etc), in two different windows:

jruby --1.9 -Ilib examples/roundtrip.rb # this starts the server
jruby --1.9 -Ilib examples/roundtrip_client.rb # surprisingly enough, this starts the client...

I'm amazed and really don't have any clues as to what's happening. I've looked a bit at both ends, trying to insert puts statements here and there but any constructive feedback would be incredibly helpful here. Naturally, I'll gladly help out with the debugging of this issue..

Many thanks in advance.

@perlun
Copy link
Contributor Author

perlun commented Mar 9, 2018

Age old, problem is not relevant any more. Closing.

@perlun perlun closed this as completed Mar 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant