Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Devel-Cover CPAN distribution.

Report information
The Basics
Id: 22701
Status: resolved
Priority: 0/
Queue: Devel-Cover

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

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: A program that gets stuck when running under Devel-Cover
The attached program is what I managed to distill from a bigger program that got stuck and ate all my memory when running under Devel-Cover. This programs hangs in the last call to parse_xml(); and any further tweaks to this program make it run to completion. I'm using perl-5.8.8, Devel-Cover-0.59 and XML-Parser-2.34, on a Linux system. By tweaking the internal debug printouts in Cover.xs I have found that the run-loop gets stuck running the same 'leavesub' op over and over. I also found that commenting out the call to cover_logop() in runops_cover() avoids the problem. Any idea what's going on? $ perl devel-cover-hang.pl before at devel-cover-hang.pl line 26. after at devel-cover-hang.pl line 28. $ perl -MDevel::Cover devel-cover-hang.pl Devel::Cover 0.59: Collecting coverage data for branch, condition, statement, subroutine and time. Pod coverage is unvailable. Please install Pod::Coverage from CPAN. Selecting packages matching: Ignoring packages matching: /Devel/Cover[./] Ignoring packages in: . /opt/perl/debug1/lib /opt/perl/debug1/site/lib before at devel-cover-hang.pl line 26.
Subject: devel-cover-hang.pl
sub parse_xml { require XML::Parser::Expat; my $p = XML::Parser::ExpatNB->new; my $handler = sub {}; $p->setHandlers( Start => sub { $_[0]->xpcroak("Unrecognized tag") if $_[1] eq "CROAK"; }, End => sub { if ($_[1] eq "FOO") { $handler->(); return; } }, ); eval { $p->parse_more($_[0]); $p->parse_done; }; } parse_xml("<FOO/>"); parse_xml("<CROAK>"); parse_xml("<FOO/>"); warn "before"; parse_xml("<FOO><X/></FOO>"); warn "after";
Subject: Re: [rt.cpan.org #22701] A program that gets stuck when running under Devel-Cover
Date: Fri, 29 Dec 2006 23:54:41 +0100
To: Gisle_Aas via RT <bug-Devel-Cover [...] rt.cpan.org>
From: Paul Johnson <paul [...] pjcj.net>
On Mon, Oct 30, 2006 at 12:43:11PM -0500, Gisle_Aas via RT wrote: Show quoted text
> The attached program is what I managed to distill from a bigger > program that got stuck and ate all my memory when running under > Devel-Cover. This programs hangs in the last call to parse_xml(); and > any further tweaks to this program make it run to completion. > > I'm using perl-5.8.8, Devel-Cover-0.59 and XML-Parser-2.34, on a Linux > system. > > By tweaking the internal debug printouts in Cover.xs I have found that > the run-loop gets stuck running the same 'leavesub' op over and over. > I also found that commenting out the call to cover_logop() in > runops_cover() avoids the problem. Any idea what's going on?
Thanks for the test case. It took a little work, but I think I've tracked it down, and applied a one line fix - http://pjcj.sytes.net/svnweb/Devel::Cover/revision/?rev=186 The problem was that I was using op_targ as part of the key for an op, and this code was causing it to change, so that looking for the data attached to that op failed. It'll be in the next release. -- Paul Johnson - paul@pjcj.net http://www.pjcj.net