Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the XML-Stream CPAN distribution.

Report information
The Basics
Id: 36864
Status: resolved
Priority: 0/
Queue: XML-Stream

People
Owner: dapatrick [...] cpan.org
Requestors: toddr [...] cpanel.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in:
  • 1.21
  • 1.22
Fixed in:
  • 1.23
  • 1.23_01



Subject: strawberry perl install hangs (never finishes)
I have been unsuccessful installing XML::Stream in strawberry perl. It appears to hang on the first test and must be killed to continue. I do not believe a force install will fix things. More data to follow Show quoted text
cpan> install XML::Stream
Database was generated on Thu, 19 Jun 2008 21:48:20 GMT Running install for module 'XML::Stream' Running make for R/RE/REATMON/XML-Stream-1.22.tar.gz Checksum for C:\strawberry\cpan\sources\authors\id\R\RE\REATMON\XML- Stream-1.22.tar.gz ok Scanning cache C:\strawberry\cpan\build for sizes ........................................................................ ....DONE CPAN.pm: Going to build R/RE/REATMON/XML-Stream-1.22.tar.gz Checking if your kit is complete... Looks good Writing Makefile for XML::Stream cp lib/XML/Stream/XPath/Value.pm blib\lib\XML\Stream\XPath\Value.pm cp lib/XML/Stream.pm blib\lib\XML\Stream.pm cp lib/XML/Stream/XPath.pm blib\lib\XML\Stream\XPath.pm cp lib/XML/Stream/XPath/Query.pm blib\lib\XML\Stream\XPath\Query.pm cp lib/XML/Stream/Node.pm blib\lib\XML\Stream\Node.pm cp lib/XML/Stream/XPath/Op.pm blib\lib\XML\Stream\XPath\Op.pm cp lib/XML/Stream/Parser/DTD.pm blib\lib\XML\Stream\Parser\DTD.pm cp lib/XML/Stream/Tree.pm blib\lib\XML\Stream\Tree.pm cp lib/XML/Stream/Namespace.pm blib\lib\XML\Stream\Namespace.pm cp lib/XML/Stream/Parser.pm blib\lib\XML\Stream\Parser.pm REATMON/XML-Stream-1.22.tar.gz C:\strawberry\c\bin\dmake.EXE -- OK Running make test C:\strawberry\perl\bin\perl.exe "- MExtUtils::Command::MM" "e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t t/buildxml.t......1/56
From: todd.e.rinaldo [...] jpmorgan.com
I added diag to t/buildxml.t (see below). I recieved this output. It appears that $stream->OpenFile("t/test.xml") is hanging in some way...? I lack the expertise to go further. Any ideas what could be done to further debug this? C:\strawberry\cpan\build\XML-Stream-1.22-DY4BkA>prove -b -v t\buildxml.t t\buildxml.t.... 1..56 ok 1 - use XML::Stream; # HERE1 # HERE2 # HERE3 # HERE4 ok 2 - new() - tree # HERE5 ok 3 - The object isa XML::Stream# HERE6 ------- t/buildxml.t ------- diag("HERE1"); foreach my $xmlType ("tree","node") { $packetIndex = 0; diag("HERE2"); my $stream = new XML::Stream(style=>$xmlType); diag("HERE3"); ok( defined($stream), "new() - $xmlType" ); diag("HERE4"); isa_ok( $stream, "XML::Stream" ); diag("HERE5"); $stream->SetCallBacks(node=>sub{ &onPacket($xmlType,@_) }); diag("HERE6"); my $sid = $stream->OpenFile("t/test.xml"); diag("HERE7"); my %status;
From: todd.e.rinaldo [...] jpmorgan.com
OpenFile altered with debug info. output to follow: ----- sub OpenFile { my $self = shift; my $file = shift; main::diag("OpenFile01"); $self->debug(1,"OpenFile: file($file)"); main::diag("OpenFile02"); $self->{SIDS}->{newconnection}->{connectiontype} = "file"; main::diag("OpenFile03"); $self->{SIDS}->{newconnection}->{sock} = new FileHandle($file); $self->{SIDS}->{newconnection}->{sock}->autoflush(1); main::diag("OpenFile04"); $self->RegisterPrefix("newconnection",&ConstXMLNS ("stream"),"stream"); main::diag("OpenFile05"); #------------------------------------------------------------------- -------- # Create the XML::Stream::Parser and register our callbacks #------------------------------------------------------------------- -------- $self->{SIDS}->{newconnection}->{parser} = new XML::Stream::Parser(%{$self->{DEBUGARGS}}, nonblocking=>$NONBLOCKING, sid=>"newconnection", style=>$self->{DATASTYLE}, Handlers=>{ startElement=>sub{ $self->_handle_root(@_) }, endElement=>sub{ &{$HANDLERS{$self-> {DATASTYLE}}->{endElement}}($self,@_) }, characters=>sub{ &{$HANDLERS{$self-> {DATASTYLE}}->{characters}}($self,@_) }, } ); main::diag("OpenFile06"); $self->{SIDS}->{newconnection}->{select} = new IO::Select($self->{SIDS}->{newconnection}->{sock}); main::diag("OpenFile07"); $self->{SELECT} = new IO::Select($self->{SIDS}->{newconnection}-> {sock}); main::diag("OpenFile08"); $self->{SIDS}->{newconnection}->{status} = 0; main::diag("OpenFile09"); my $buff = ""; while($self->{SIDS}->{newconnection}->{status} == 0) { main::diag("OpenFile10"); $self->debug(5,"OpenFile: can_read(",join(",",$self->{SIDS}-> {newconnection}->{select}->can_read(0)),")"); if ($self->{SIDS}->{newconnection}->{select}->can_read(0)) { main::diag("OpenFile11"); $self->{SIDS}->{newconnection}->{status} = -1 unless defined($buff = $self->Read("newconnection")); return unless($self->{SIDS}->{newconnection}->{status} == 0); return unless($self->ParseStream("newconnection",$buff) == 1); } main::diag("OpenFile12"); return if($self->{SIDS}->{newconnection}->{select}- Show quoted text
>has_exception(0) &&
$self->{SIDS}->{newconnection}->{sock}->error()); } main::diag("OpenFile13"); return if($self->{SIDS}->{newconnection}->{status} != 1);
From: todd.e.rinaldo [...] jpmorgan.com
C:\strawberry\cpan\build\XML-Stream-1.22-DY4BkA>prove -b -v t\buildxml.t t\buildxml.t.... 1..56 ok 1 - use XML::Stream; # HERE1 # HERE2 # HERE3 # HERE4 ok 2 - new() - tree # HERE5 # HERE6 ok 3 - The object isa XML::Stream # OpenFile01 # OpenFile02 # OpenFile03 # OpenFile04 # OpenFile05 # OpenFile06 # OpenFile07 # OpenFile08 # OpenFile09 # OpenFile10 # OpenFile12 # OpenFile10 # OpenFile12 # OpenFile10 # OpenFile12 # OpenFile10 # OpenFile12 # OpenFile10 # OpenFile12 # OpenFile10 # OpenFile12 # OpenFile10 # OpenFile12 # OpenFile10
From: todd.e.rinaldo [...] jpmorgan.com
At this point, I have no idea where to go. It appears to be failing to connect to something and expecting output which never comes. Any ideas how I can proceed? Thanks,
From: ddascalescu+perl [...] gmail.com
Hangs here too, on Strawberry 5.10.0.6 and 5.10.1.
Database was generated on Tue, 08 Dec 2009 23:28:07 GMT Running install for module 'XML::Stream' Running make for R/RE/REATMON/XML-Stream-1.22.tar.gz Checksum for C:\strawberry\cpan\sources\authors\id\R\RE\REATMON\XML-Stream-1.22.tar.gz ok CPAN.pm: Going to build R/RE/REATMON/XML-Stream-1.22.tar.gz Checking if your kit is complete... Looks good Writing Makefile for XML::Stream cp lib/XML/Stream/XPath/Value.pm blib\lib\XML\Stream\XPath\Value.pm cp lib/XML/Stream.pm blib\lib\XML\Stream.pm cp lib/XML/Stream/XPath.pm blib\lib\XML\Stream\XPath.pm cp lib/XML/Stream/XPath/Query.pm blib\lib\XML\Stream\XPath\Query.pm cp lib/XML/Stream/Node.pm blib\lib\XML\Stream\Node.pm cp lib/XML/Stream/XPath/Op.pm blib\lib\XML\Stream\XPath\Op.pm cp lib/XML/Stream/Parser/DTD.pm blib\lib\XML\Stream\Parser\DTD.pm cp lib/XML/Stream/Tree.pm blib\lib\XML\Stream\Tree.pm cp lib/XML/Stream/Namespace.pm blib\lib\XML\Stream\Namespace.pm cp lib/XML/Stream/Parser.pm blib\lib\XML\Stream\Parser.pm REATMON/XML-Stream-1.22.tar.gz C:\strawberry\c\bin\dmake.EXE -- OK Running make test C:\strawberry\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t t/buildxml.t .... Dubious, test returned 1 (wstat 256, 0x100) Failed 53/56 subtests t/load.t ........ ok t/parse_node.t .. Dubious, test returned 1 (wstat 256, 0x100) No subtests run t/parse_tree.t .. Dubious, test returned 1 (wstat 256, 0x100) No subtests run t/tcpip.t ....... ok t/tcpip2ssl.t ... ok t/xml2config.t .. ok t/xpath.t ....... ok Test Summary Report ------------------- t/buildxml.t (Wstat: 256 Tests: 3 Failed: 0) Non-zero exit status: 1 Parse errors: Bad plan. You planned 56 tests but ran 3. t/parse_node.t (Wstat: 256 Tests: 0 Failed: 0) Non-zero exit status: 1 Parse errors: No plan found in TAP output t/parse_tree.t (Wstat: 256 Tests: 0 Failed: 0) Non-zero exit status: 1 Parse errors: No plan found in TAP output Files=8, Tests=125, 280 wallclock secs ( 0.11 usr + 0.06 sys = 0.17 CPU) Result: FAIL Failed 3/8 test programs. 0/125 subtests failed. dmake.EXE: Error code 255, while making 'test_dynamic' REATMON/XML-Stream-1.22.tar.gz C:\strawberry\c\bin\dmake.EXE test -- NOT OK //hint// to see the cpan-testers results for installing this module, try: reports REATMON/XML-Stream-1.22.tar.gz Running make install make test had returned bad status, won't install without force
This is fixed now. I'll leave the ticket open for comments for one week from today.  From the commit message:

    Tests were failing as a result of lack of support for using select with
    filehandles on win32 (see perlport). Since IO::Select is used
    pervasively in Stream.pm, it was easier to just make can_read return all
    handles known to the object.  This works fine since OpenFile is used
    only by the test suite (for better or worse).