Skip Menu |

This queue is for tickets about the Net-DNS CPAN distribution.

Report information
The Basics
Id: 18713
Status: resolved
Priority: 0/
Queue: Net-DNS

People
Owner: OLAF [...] cpan.org
Requestors: michael.schlagmueller [...] gmx.de
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.57
Fixed in: (no value)



Subject: Net::DNS::Resolver::Base.pm: Cannot determin peer address
I have a little problem with Net::DNS::Resolver::Base.pm (Net:DNS V0.57) I do lots of DNS queries (tcp/udp persistant) and after about 200.000 queries my script dies with this message: send: Cannot determine peer address at /usr/lib/perl5/site_perl/5.8.5/i586-linux-thread-multi/Net/DNS/Resolver/Ba se.pm line 597 Is there any error handling missing ?
Hello... This is to acknowledge receipt of your query. I want to try and reproduce this and see if I can make the code more resilient against this. That may take a while. --Olaf
I can try to create a small code-example producing the error... You will hear of me... On Di. 18. Apr. 2006, 05:04:40, OLAF wrote: Show quoted text
> Hello... > > This is to acknowledge receipt of your query. I want to try and > reproduce this and see if I can > make the code more resilient against this. > > That may take a while. > > --Olaf
Subject: Re: [rt.cpan.org #18713] Net::DNS::Resolver::Base.pm: Cannot determin peer address
Date: Tue, 18 Apr 2006 15:02:53 +0200
To: bug-Net-DNS [...] rt.cpan.org
From: "Olaf M. Kolkman" <olaf [...] dacht.net>
On Apr 18, 2006, at 12:32 PM, Guest via RT wrote: Show quoted text
> > Queue: Net-DNS > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=18713 > > > I can try to create a small code-example producing the error... > You will hear of me...
No worries... I've got the bug reproducing code :-). This happens when you've connected over TCP once and then try to connect again while the server stopped listening. Obviously this kind of thing does not happen in connectionless UDP world... Now comes the part where I need fix the bug :-).... --Olaf ------------------------------------------------------ Ik dacht net... heel even maar.
Download PGP.sig
application/pgp-signature 227b

Message body not shown because it is not plain text.

CC: michael.schlagmueller [...] gmx.de
Subject: Re: [rt.cpan.org #18713] Net::DNS::Resolver::Base.pm: Cannot determin peer address
Date: Tue, 18 Apr 2006 15:43:21 +0200
To: bug-Net-DNS [...] rt.cpan.org
From: "Olaf M. Kolkman" <olaf [...] dacht.net>
Could you try if this patch solves your misery? --Olaf --- lib/Net/DNS/Resolver/Base.pm (revision 578) +++ lib/Net/DNS/Resolver/Base.pm (working copy) @@ -574,7 +574,16 @@ if ($self->persistent_tcp && $self->{'sockets'} [AF_UNSPEC]{$sock_key}) { $sock = $self->{'sockets'}[AF_UNSPEC]{$sock_key}; print ";; using persistent socket\n" + if $self->{'debug'}; + unless ($sock->connected){ + print ";; persistent socket disconnected (trying to reconnect)" if $self->{'debug'}; + undef($sock); + $sock= $self->_create_tcp_socket($ns); + next NAMESERVER unless $sock; + $self->{'sockets'}[AF_UNSPEC]{$sock_key} = $sock; + } + } else { $sock= $self->_create_tcp_socket($ns); next NAMESERVER unless $sock; ------------------------------------------------------ Ik dacht net... heel even maar.
Download PGP.sig
application/pgp-signature 227b

Message body not shown because it is not plain text.

CC: bug-Net-DNS [...] rt.cpan.org
Subject: Re: [rt.cpan.org #18713] Net::DNS::Resolver::Base.pm: Cannot determin peer address
Date: Tue, 18 Apr 2006 17:16:59 +0200
To: Michael Schlagmueller <michael.schlagmueller [...] gmx.de>
From: "Olaf M. Kolkman" <olaf [...] dacht.net>
On Apr 18, 2006, at 4:26 PM, Michael Schlagmueller wrote: Show quoted text
> Wow, that was fast :-)
I hope the patch is as easy as it seems. There might be another cornercase, where you try to read from the closed socket. But that will not cause a croak. Show quoted text
> I just patched my library and restarted the script. But I'm on > holidays > now until Saturday - so I won't be able to tell you the results before > that date.
That is OK... Show quoted text
> Anyways, what you have changed seems to me that it solves to > problem but > I will tell you more when I will be back.
Yes... please, do CC bug-Net-DNS@rt.cpan.org. --Olaf ------------------------------------------------------ Ik dacht net... heel even maar.
Download PGP.sig
application/pgp-signature 227b

Message body not shown because it is not plain text.

CC: bug-Net-DNS [...] rt.cpan.org
Subject: Re: [rt.cpan.org #18713] Net::DNS::Resolver::Base.pm: Cannot determin peer address
Date: Sat, 22 Apr 2006 00:25:40 +0200
To: "Olaf M. Kolkman" <olaf [...] dacht.net>
From: Michael Schlagmueller <michael.schlagmueller [...] gmx.de>
Hi Olaf, the patch is working great. My script is still running - it is now working for three days and 3.500.000 dns queries, that's much more it ever did - and I guess it will never stop :-) Thank you very much Michael