Skip Menu |

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

Report information
The Basics
Id: 124932
Status: rejected
Priority: 0/
Queue: Net-DNS-Native

People
Owner: Nobody in particular
Requestors: DBOOK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in:
  • 0.16
  • 0.17
  • 0.18
Fixed in: (no value)



Subject: Conflict with epoll since 0.16
I'm not able to diagnose or reduce further at the moment, but installing Net::DNS::Native 0.16 or above causes test failures in Mojo::Reactor::Epoll. I've disabled its use in the test in 0.007, but you can test with version 0.006 which is functionally the same. The error occurs during this section of the test: https://metacpan.org/source/DBOOK/Mojo-Reactor-Epoll-0.006/t/reactor_epoll.t#L258-284 and looks like (line referenced is when either ->add or ->modify is called on the Linux::Epoll object): Couldn't add filehandle from epoll set: Bad file descriptor at lib/Mojo/Reactor/Epoll.pm line 151.
This also seems to be the same issue, triggered when IO::Async::Loop::Epoll and Net::DNS::Native >= 0.16 are installed: https://github.com/Grinnz/Mojo-Reactor-IOAsync/issues/1
Since 0.16 Net::DNS::Native uses tied handle instead of real one. But looks like Linux::Epoll doesn't handle tied handles correctly. Problem is here: https://metacpan.org/source/LEONT/Linux-Epoll-0.012/lib/Linux/Epoll.xs#L19 . This function returns -1 for tied handle. And here is minimal script to reproduce the issue: use strict; use Linux::Epoll; use Symbol; my $epoll = Linux::Epoll->new(); my $fh = Symbol::gensym(); # \*STDIN; tie *$fh, 'TiedHandle', 0; $epoll->add($fh, 'in', sub { my $events = shift; }); print "Ok\n"; package TiedHandle; sub TIEHANDLE { my ($class, $fd) = @_; bless { fd => $fd }, $class; } sub FILENO { return $_[0]->{fd}; }
On Tue Mar 27 00:24:09 2018, OLEG wrote: Show quoted text
> Since 0.16 Net::DNS::Native uses tied handle instead of real one. But > looks like Linux::Epoll doesn't handle tied handles correctly. Problem > is here: https://metacpan.org/source/LEONT/Linux-Epoll- > 0.012/lib/Linux/Epoll.xs#L19 . This function returns -1 for tied > handle. And here is minimal script to reproduce the issue:
Thank you, I have reported this to Linux::Epoll at https://rt.cpan.org/Ticket/Display.html?id=124934