[zeromq-dev] Open file leak during DNS resolution while network is down (regression in libzmq-4.1.0 and libzmq-master) #1302
Tomas Krajca
tomas at repositpower.com
Thu Jan 29 00:28:59 CET 2015
Hi,
Sorry, I didn't have time to retest it properly. Just close it and I
will reopen it if I can reproduce it against the latest master.
Thanks,
Tomas
On 01/28/2015 10:00 PM, zeromq-dev-request at lists.zeromq.org wrote:
> Date: Tue, 27 Jan 2015 11:46:19 -0600
> From: Thomas Rodgers<rodgert at twrodgers.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>
> Message-ID:
> <CAAB_aXtZqB7D=ABWXALr0ydS4Z=wq8qeW5hf1ghbbemwVop1-Q at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Is it safe to close issue #1302
> <https://github.com/zeromq/libzmq/issues/1302> now?
>
> On Wed, Jan 21, 2015 at 8:13 PM, Tomas Krajca<tomas at repositpower.com>
> wrote:
>
>> >Hi Thomas,
>> >
>> >I can't reproduce the error against the latest libzmq trunk either. It
>> >must have been fixed fairly recently because we tested this with the
>> >latest libzmq trunk as of Friday last week or whenever it was. I would
>> >be curious to see how it got fixed but I can't quite find the right commit.
>> >
>> >I'll do some more testing on this one but it seems good.
>> >
>> >Cheers,
>> >Tomas
>> >
>> >On 01/21/2015 10:00 PM,zeromq-dev-request at lists.zeromq.org wrote:
>>> > >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
>> >
More information about the zeromq-dev
mailing list