Skip Menu |

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

Report information
The Basics
Id: 98003
Status: rejected
Worked: 1 min
Priority: 0/
Queue: Net-DNS

People
Owner: Nobody in particular
Requestors: entwicklung [...] noris.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in:
  • 0.77_1
  • 0.77_2
  • 0.78
  • 0.78_1
  • 0.78_2
Fixed in: (no value)



Subject: Net::DNS::Resolver stops working when multiple instances are created
Date: Wed, 13 Aug 2014 19:55:44 +0200
To: bug-Net-DNS [...] rt.cpan.org
From: Moritz Lenz <moritz.lenz [...] noris.de>
Net::DNS::Resolver doesn't seem to tolerate multiple instances anymore: $ cat test.pl use 5.014; use Net::DNS; my $dummy = Net::DNS::Resolver->new(nameservers => ['dns.adidas.noris.de']); my $resolv = Net::DNS::Resolver->new(nameservers => ["dns3.noris.net"]); my $packet = Net::DNS::Packet->new("adidas.com", "NS"); my $result = $resolv->send($packet); say $result ? 'yes' : 'no'; On version 0.78 of Net::DNS, this says always "no", but when I remove the line my $dummy = Net::DNS::Resolver->new(nameservers => ['dns.adidas.noris.de']); then it says "yes". In the error case, $resolve->errorstring is "no nameservers". (Background: dns.adidas.noris.de is the hidden primary, and dns3.noris.net one of the hosts behind the loadbalancer that acts as the public primary; from where I test it, dns.adidas.noris.de is reachable. I have no idea if this matters, since the program doesn't actually *do* anything with that dummy object). The last working version seems to be 0.77: $ PERL5LIB=$HOME/net-dns/Net-DNS-0.77/blib/lib perl test.pl yes $ PERL5LIB=$HOME/net-dns/Net-DNS-0.78/blib/lib perl test.pl no $ PERL5LIB=$HOME/net-dns/Net-DNS-0.78_2/blib/lib perl test.pl no $ PERL5LIB=$HOME/net-dns/Net-DNS-0.77_2/blib/lib perl test.pl no $ PERL5LIB=$HOME/net-dns/Net-DNS-0.77_1/blib/lib perl test.pl no This is a bug, because Net::DNS::Resolver intances should be independent from each other. A fix would be greatly appreciated :-) Cheers, Moritz Lenz
I don't this is related to the new Recurse caching functionality in trunk.
Subject: Re: [noris #16717611] [rt.cpan.org #98003] Net::DNS::Resolver stops working when multiple instances are created
Date: Wed, 13 Aug 2014 21:13:09 +0200
To: bug-Net-DNS [...] rt.cpan.org
From: Moritz Lenz <moritz.lenz [...] noris.de>
Oh, I forgot: if you have a public git repo of the sources somewhere, I'll be happy to bisect it for you, and find the actual commit that broke it. Cheers, Moritz
From: rwfranks [...] acm.org
On Wed Aug 13 13:57:02 2014, entwicklung@noris.de wrote: Show quoted text
> Net::DNS::Resolver doesn't seem to tolerate multiple instances > anymore:
Show quoted text
> A fix would be greatly appreciated :-) >
Same issue as RT#97736, which was fixed in 0.78_2. This is only exposed if you specify a dead nameserver for the first instance of Net::DNS::Resolver. $ dig @dns.adidas.noris.de dns3.noris.net ; <<>> DiG 9.9.4-P2-RedHat-9.9.4-15.P2.fc20 <<>> @dns.adidas.noris.de dns3.noris.net ; (1 server found) ;; global options: +cmd ;; connection timed out; no servers could be reached Note also that the published API does not offer any support for domain names as parameters to resolver->nameservers() nameservers @nameservers = $res->nameservers; $res->nameservers('192.168.1.1', '192.168.2.2', '192.168.3.3'); Gets or sets the nameservers to be queried.
Already fixed.