Hi Rocco,
Show quoted text> Can you reproduce the error at will?
well, yes of course, whenever I run t/59_incomplete_b.t from
poe-component-client-http... What I was meaning to say is that as a
Debian packager, I don't really know your module or the one where the
test is from, so wouldn't know how come the file handle has become
undef, but it struck me as odd that FileHandles.pm's
_data_handle_remove() both checks for a defined $fd in its first block
and forgets to do so in its second block. Perhaps it should start with
something like
return unless defined $fd;
or add "defined $fd and" on line 577?
Show quoted text> If you set the POE_ASSERT_USAGE
> environment variable, they'll all be enabled at compile time. If that doesn't give you a better
> failure message, I'll eat my hat. Or fix a bug. My choice.
$ POE_ASSERT_USAGE=1 perl -w t/59_incomplete_b.t
1..4
ok 1 - got expected content-length request
ok 2 - got expected no-content-length request
(in cleanup) (9488) <us> invalid filehandle in select_read() at /usr/share/perl5/POE/Kernel.pm line 2143
POE::Kernel::select_read('POE::Kernel=ARRAY(0xed83b8)', 'GLOB(0x17365d8)') called at /usr/share/perl5/POE/Wheel/ReadWrite.pm line 392
POE::Wheel::ReadWrite::DESTROY('POE::Wheel::ReadWrite=ARRAY(0x1718960)') called at /usr/share/perl5/POE/Component/Client/HTTP.pm line 818
eval {...} called at /usr/share/perl5/POE/Component/Client/HTTP.pm line 818
POE::Component::Client::HTTP::_poco_weeble_io_read(undef, 'POE::Session=ARRAY(0x968ca8)', 'POE::Kernel=ARRAY(0xed83b8)', 'HASH(0x968ac8)', 'got_socket_input', 'POE::Session=ARRAY(0x968ca8)', undef, '/usr/share/perl5/POE/Wheel/ReadWrite.pm', 283, ...) called at /usr/share/perl5/POE/Session.pm line 464
POE::Session::_invoke_state('POE::Session=ARRAY(0x968ca8)', 'POE::Session=ARRAY(0x968ca8)', 'got_socket_input', 'ARRAY(0xe69280)', '/usr/share/perl5/POE/Wheel/ReadWrite.pm', 283, 'POE::Wheel::ReadWrite(13) -> select read') called at /usr/share/perl5/POE/Kok 3 - length(content) triggered 406
ernel.pm line 1731
POE::Kernel::call('POE::Kernel=ARRAY(0xed83b8)', 'POE::Session=ARRAY(0x968ca8)', 'got_socket_input', 'HTTP::Response=HASH(0x1740338)', 13) called at /usr/share/perl5/POE/Wheel/ReadWrite.pm line 283
POE::Wheel::ReadWrite::__ANON__(undef, 'POE::Session=ARRAY(0x968ca8)', 'POE::Kernel=ARRAY(0xed83b8)', 'HASH(0x968ac8)', 'POE::Wheel::ReadWrite(13) -> select read', 'POE::Session=ARRAY(0x968ca8)', undef, '/usr/share/perl5/POE/Resource/FileHandles.pm', 240,ok 4 - content-length triggered 406
...) called at /usr/share/perl5/POE/Session.pm line 464
POE::Session::_invoke_state('POE::Session=ARRAY(0x968ca8)', 'POE::Session=ARRAY(0x968ca8)', 'POE::Wheel::ReadWrite(13) -> select read', 'ARRAY(0x171e6a8)', '/usr/share/perl5/POE/Resource/FileHandles.pm', 240, undef) called at /usr/share/perl5/POE/Kernel.pm line 1049
eval {...} called at /usr/share/perl5/POE/Kernel.pm line 1048
POE::Kernel::_dispatch_event('POE::Kernel=ARRAY(0xed83b8)', 'POE::Session=ARRAY(0x968ca8)', 'POE::Session=ARRAY(0x968ca8)', 'POE::Wheel::ReadWrite(13) -> select read', 1024, 'ARRAY(0x171e6a8)', '/usr/share/perl5/POE/Resource/FileHandles.pm', 240, undef, ...) called at /usr/share/perl5/POE/Resource/FileHandles.pm line 238
POE::Kernel::_data_handle_enqueue_ready(undef, undef, 30, 4) called at /usr/share/perl5/POE/Loop/Select.pm line 288
POE::Kernel::loop_do_timeslice('POE::Kernel=ARRAY(0xed83b8)') called at /usr/share/perl5/POE/Loop/Select.pm line 317
POE::Kernel::loop_run('POE::Kernel=ARRAY(0xed83b8)') called at /usr/share/perl5/POE/Kernel.pm line 1235
POE::Kernel::run('POE::Kernel') called at t/59_incomplete_b.t line 34
nice backtrace. "invalid filehandle" is correct, it's undef. Whether
that's a bug I cannot say. What I opened this ticket about is that
/usr/share/perl5/POE/Resource/FileHandles.pm:_data_handle_remove() goes
on regardless, and uses that undef $fd as a hash key on line 579.
Florian