EV (epoll) and Mojo::IOLoop::Client bug?

Andrey Khozov avkhozov at googlemail.com
Tue Sep 15 16:36:16 CEST 2015


Thanks for the ideas. It seems the bug was localized in mojo google group.
The problem in IO::Socket::IP module.

https://groups.google.com/forum/#!msg/mojolicious/RetqP4QsyHU/Tmo81yzkCgAJ
https://rt.cpan.org/Public/Bug/Display.html?id=107103

On Sat, Sep 12, 2015 at 6:48 PM, Marc Lehmann <schmorp at schmorp.de> wrote:

> On Fri, Sep 11, 2015 at 08:46:15PM +0500, Andrey Khozov <
> avkhozov at googlemail.com> wrote:
> > > If you are good with a debugger (e.g. gdb), an easy way is to set a
> > > breaskpoint on the dup2 call, and when it triggers (and you amde sure
> it is
> > > that call), you can get a perl backtrace via e.g. Perl_eval ("use
> > > Carp;Carp::confess",1)
> >
> > ​Not sure what I can do is just make. But I will try, thanks.​
>
> Primarily, you should find out which code registers the watcher and
> connects.  The hint you have is that the code tries to connect to
> [::1]:27017 and then 127.0.0.1:27017 - whats running on port 27017 on that
> box?
>
> Normally the bug is then in the perl module that interfaces with that, in
> the caller, or in some lower level library. However, in this case, this
> really looks like a connection made with AnyEvent::Socket::tcp_connect,
> which doesn't call dup2.
>
> However, there is a complicating factor:
>
>    socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 4
>    ...
>    dup2(4, 3)                              = 3
>
> What happens here is that something createa a tcp socket and then
> (seemingly) ovewrwrites the socket created earlier.
>
> I don't know what happens in the "..." part, but if that doesn't close the
> socket, then it looks as if some unrelated part in the program closes a
> socket by another part. That's why it is important to find out what causes
> the dup2 call.
>
> Again, I don't know what happens in the "..." part, but if nothing funny
> goes
> on, the code that does the dup2 is likely the culprit, and that is where
> you
> would need to report this to.
>
> --
>                 The choice of a       Deliantra, the free code+content
> MORPG
>       -----==-     _GNU_              http://www.deliantra.net
>       ----==-- _       generation
>       ---==---(_)__  __ ____  __      Marc Lehmann
>       --==---/ / _ \/ // /\ \/ /      schmorp at schmorp.de
>       -=====/_/_//_/\_,_/ /_/\_\
>



-- 
Andrey Khozov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schmorp.de/pipermail/anyevent/attachments/20150915/4bd26b7a/attachment.html>


More information about the anyevent mailing list