Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the AnyEvent-WebSocket-Server CPAN distribution.

Report information
The Basics
Id: 91158
Status: open
Priority: 0/
Queue: AnyEvent-WebSocket-Server

People
Owner: Nobody in particular
Requestors: CHORNY [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 0.03
  • 0.04
  • 0.05
  • 0.06
Fixed in: (no value)



Subject: hangs on Windows
perl 5.18.0 # empty port: 50485 # --- normal echo (hangs) -- Alexandr Ciornii, http://chorny.net
Thanks for the report. I don't use Windows, so I'm afraid it may take time to fix this bug. Please let me know - What Windows do you use? Win XP, Vista, 7, 8 or 8.1? Is it 32bit or 64bit? - What perl do you use? ActivePerl, strawberry perl or cygwin perl? It looks like the test in t/testlib/PSGI.pm hangs, and it stems from AnyEvent or the way we use it. - Which did you execute, t/psgi_corona.t or t/twiggy.t? Or do they both hang? - Is EV installed in your system? If not, please try installing it and run the test again.
On Wed Dec 04 05:20:00 2013, TOSHIOITO wrote: Show quoted text
> Thanks for the report. > I don't use Windows, so I'm afraid it may take time to fix this bug. > > Please let me know > > - What Windows do you use? Win XP, Vista, 7, 8 or 8.1? Is it 32bit or > 64bit?
XP 32-bit Show quoted text
> - What perl do you use? ActivePerl, strawberry perl or cygwin perl?
Strawberry Show quoted text
> It looks like the test in t/testlib/PSGI.pm hangs, > and it stems from AnyEvent or the way we use it. > > - Which did you execute, t/psgi_corona.t or t/twiggy.t? Or do they > both hang?
psgi_corona.t 1..0 # SKIP Test requires module 'Corona::Server' but it's not found psgi_twiggy.t # empty port: 50717 # --- normal echo (hangs) Show quoted text
> - Is EV installed in your system?
EV 4.15 -- Alexandr Ciornii, http://chorny.net
OK, I was able to reproduce the bug. My environment is. - Windows 7 32bit - Strawberry perl 5.18.2.1 - AnyEvent 7.07 - EV 4.15 - Twiggy 0.1023 Summary: it was probably AnyEvent::Socket's bug, not AnyEvent::WebSocket::Server's. So I can't fix it. Detail: psgi_twiggy.t hang while other tests were OK. I didn't test psgi_corona.t, though. I ran the test while capturing packets by RawCap. ( http://www.netresec.com/?page=RawCap ) It seems the TCP handshake was complete, but the client never sent the request. So the server waited forever. In the test, I use AnyEvent::WebSocket::Client as the client. The client uses AnyEvent::Socket::tcp_connect() function to connect to the server. Although the TCP handshake looked OK in packet capture, the callback function for tcp_connect() was never executed. That's why the test hang. There are some weird things I can't understand: - Other tests use tcp_server() function just like Twiggy does. Why are they ok while psgi_twiggy.t is not? - In psgi_twiggy.t, I use AnyEvent->timer() to abort the test in case it takes too long time. However, the test just hangs instead of time-out. Maybe AnyEvent was in a very weird situation.