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, [email protected] 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<[email protected]>  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<[email protected]>
>> >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<[email protected]>
>>>> > >>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<[email protected]>
>>>> > >>Cc: Mark Burgess<[email protected]>
>>>> > >>Message-ID:
>>>> > >>       <CADL5_shw3B+0YN4MYVCROEwufeH6_ThvxDKcw5c=
>> >[email protected]>
>>>> > >>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<[email protected]>
>> >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
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to