Mojo::IOLoop::Client bugreport

23 views
Skip to first unread message

s...@bykov.odessa.ua

unread,
Feb 10, 2012, 10:37:31 PM2/10/12
to mojol...@googlegroups.com
Hello. Maybe this is a bug. When i run this script (included) I see from time to time one or more warnings (depends on number of iterations, try to increase it if you don't):
'Write failed: Can't call method "_connecting" on an undefined value at /home/papa/projects/Cpan-patches/Mojolicious/client/lib/Mojo/IOLoop/Client.pm line 110.'

I don't know, what it does, but this patch helps me (also included)

usage:
ls client_conn.patch
git clone https://github.com/kraih/mojo.git original
cd original/lib/Mojo/IOLoop/
patch  < ../../../../client_conn.patch

client_warn.pl
client_conn.patch

sri

unread,
Feb 11, 2012, 2:40:39 AM2/11/12
to Mojolicious
Works for me, you should try replicating it with a self contained unit
test that doesn't depend on outside factors.

--
sebastian

s...@bykov.odessa.ua

unread,
Feb 11, 2012, 11:02:03 AM2/11/12
to mojol...@googlegroups.com
Еще домен flashman.od.ua скоро заканчивается. И хостинг stroy-nauka с
доменом тоже. Ну скоро это около месяца)

s...@bykov.odessa.ua

unread,
Feb 11, 2012, 11:26:42 AM2/11/12
to mojol...@googlegroups.com
It's hard, I don't know where is the bug, but I suppose this example
from the source and prev. patch is a trivial mistake

#Wrong, $self may be undef here
$watcher->io($handle => sub{ $self->_connecting });

Sebastian Riedel

unread,
Feb 11, 2012, 11:36:57 AM2/11/12
to mojol...@googlegroups.com
> #Wrong, $self may be undef here
> $watcher->io($handle => sub{ $self->_connecting });


Not true as far as i can see. I'm afraid we will have to assume that it's a bug in a 3rd party module, until there's a sensible unit test that allows us to replicate the issue.

--
Sebastian Riedel
http://twitter.com/kraih
http://mojolicio.us

s...@bykov.odessa.ua

unread,
Feb 11, 2012, 9:07:41 PM2/11/12
to mojol...@googlegroups.com
May be the bug depends on OS(I use Ubuntu, as I know it depends on perfomance too).

Ok, i've made one more sensible example (client_eof.pl), got it up as a test (client_eof.t). And I've wrote more clear patch (client_eof.patch), but I think the problem lives deeper.

Take a look, please.

patch usage:
git clone https://github.com/kraih/mojo.git
cd mojo/
patch -p1 < ../client_eof.patch
client_eof.patch
client_eof.pl
client_eof.t

sri

unread,
Feb 12, 2012, 1:26:55 AM2/12/12
to Mojolicious
Ok, i was able to replicate the issue. But as far as i can see it only
happens when IO::Socket::IP is used instead of IO::Socket::INET, which
hints at a IO::Socket::IP bug.

--
sebastian

sri

unread,
Feb 12, 2012, 1:32:36 AM2/12/12
to Mojolicious
More specifically, it only appears when EV and IO::Socket::IP are used
together, the IO::Poll backend causes no problems either.

--
sebastian

sri

unread,
Feb 12, 2012, 1:57:55 AM2/12/12
to Mojolicious

s...@bykov.odessa.ua

unread,
Feb 12, 2012, 11:08:02 AM2/12/12
to mojol...@googlegroups.com

Yes, looks like working, but I've already written another test (included).
Mojo::IOLoop::Client lost all data on fast connections (comments).

Take a look, please.


> But as far as i can see it only
> happens when IO::Socket::IP

Sorry, but not true, I have not IO::Socket::IP installed. I can suppose
that it happened when EV is used, but it not actually depends on EV
backend, it depends only on IOWather perfomance (on very-very fast
computers (x20) I think this happens without EV).


P.S.: May be there is there more prefered way to send bugs? Or google
groups is the prefered way?

client_eof2.t
Reply all
Reply to author
Forward
0 new messages