[zeromq-dev] Open file leak during DNS resolution while network is down (regression in libzmq-4.1.0 and libzmq-master) #1302

Thomas Rodgers rodgert at twrodgers.com
Tue Jan 20 17:55:48 CET 2015


I'm running your sample against current libzmq trunk, Ubuntu 14.04 and I am
unable to reproduce any leak.

On Tue, Jan 20, 2015 at 2:08 AM, Pieter Hintjens <ph at imatix.com> wrote:

> OK, thanks for the simple test case.
>
> I'm not familiar enough with the internals of libzmq to debug this. I
> see that tcp_connecter.cpp is closing the socket if it can't resolve
> the hostname. However it's possible some error handling isn't right
> here.
>
>
> On Tue, Jan 20, 2015 at 5:04 AM, Tomas Krajca <tomas at repositpower.com>
> wrote:
> > Hi Peter,
> >
> > It's actually really simple, I have posted example C code to github at
> > https://github.com/zeromq/libzmq/issues/1302. Am I doing something wrong
> > or is it that obvious?
> >
> > There is no need for a poller or anything like that. It seems that DNS
> > resolution during zmq_connect() somehow does not release the file handle
> > if network is down.
> >
> > Cheers,
> > Tomas
> >
> >> Message: 19
> >> Date: Mon, 19 Jan 2015 10:32:47 +0100
> >> From: Pieter Hintjens <ph at imatix.com>
> >> Subject: Re: [zeromq-dev] Open file leak during DNS resolution while
> >>       network is down (regression in libzmq-4.1.0 and libzmq-master)
> #1302
> >> To: ZeroMQ development list <zeromq-dev at lists.zeromq.org>
> >> Cc: Mark Burgess <mark at repositpower.com>
> >> Message-ID:
> >>       <CADL5_shw3B+0YN4MYVCROEwufeH6_ThvxDKcw5c=
> vkfo4Dw5ew at mail.gmail.com>
> >> Content-Type: text/plain; charset=UTF-8
> >>
> >> Can your C++ programmer make a minimal test case in C that reproduces
> >> the problem?
> >>
> >> On Mon, Jan 19, 2015 at 1:55 AM, Tomas Krajca <tomas at repositpower.com>
> wrote:
> >>> Hi,
> >>>
> >>> I've reported this weird bug
> https://github.com/zeromq/libzmq/issues/1302
> >>> that we hit last week, I wonder if anybody experienced the same thing
> or can
> >>> reproduce it. Basically, we saw a progressive file handle leak that
> crashed
> >>> our application after about an hour of network outage.
> >>>
> >>> Any thoughts of which part of the code could the bug be in? We've got
> a C++
> >>> programmer in our team but don't know enough about libzmq internals to
> try
> >>> to fix this.
> >>>
> >>> Thanks,
> >>> Tomas
> > _______________________________________________
> > zeromq-dev mailing list
> > zeromq-dev at lists.zeromq.org
> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20150120/1e092d1f/attachment.htm>


More information about the zeromq-dev mailing list