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
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1162230189-9919-6"
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 1146
Download (untitled) / with headers
text/plain 1.1k
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
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1162230189-9919-5"
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Type: application/x-perl; name="devel-cover-hang.pl"
Content-Disposition: inline; filename="devel-cover-hang.pl"
Content-Transfer-Encoding: base64
Content-Length: 486
Download devel-cover-hang.pl
text/x-perl 486b
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";
X-Source:
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.5 required=8.0 tests=BAYES_00,FORGED_RCVD_HELO
In-Reply-To: <rt-3.6.HEAD-9919-1162230191-622.22701-4-0 [...] rt.cpan.org>
X-Source-Args:
Content-Disposition: inline
X-Source-Dir:
Received-SPF: neutral (x1.develooper.com: local policy)
References: <RT-Ticket-22701 [...] rt.cpan.org> <rt-3.6.HEAD-9919-1162230191-622.22701-4-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
X-Antiabuse: This header was added to track abuse, please include it with any abuse report
X-Antiabuse: Primary Hostname - tiger.phpweb.biz
X-Antiabuse: Original Domain - rt.cpan.org
X-Antiabuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-Antiabuse: Sender Address Domain - pjcj.net
X-RT-Original-Encoding: us-ascii
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 076814D806E for <bug-Devel-Cover [...] rt.cpan.org>; Fri, 29 Dec 2006 17:54:54 -0500 (EST)
Received: (qmail 20353 invoked by alias); 29 Dec 2006 22:54:54 -0000
Received: from tiger.phpweb.biz (HELO tiger.phpweb.biz) (64.246.62.13) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Fri, 29 Dec 2006 14:54:48 -0800
Received: from 84-73-176-38.dclient.hispeed.ch ([84.73.176.38] helo=wesley.pjcj.net) by tiger.phpweb.biz with esmtpa (Exim 4.63) (envelope-from <paul [...] pjcj.net>) id 1H0Qc6-0004ev-7Y for bug-Devel-Cover [...] rt.cpan.org; Fri, 29 Dec 2006 16:54:10 -0600
Received: from pjcj by wesley.pjcj.net with local (Exim 3.36 #1 (Debian)) id 1H0Qcb-0002St-00 for <bug-Devel-Cover [...] rt.cpan.org>; Fri, 29 Dec 2006 23:54:41 +0100
Delivered-To: cpan-bug+devel-cover [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #22701] A program that gets stuck when running under Devel-Cover
User-Agent: Mutt/1.5.13 (2006-08-11)
Return-Path: <paul [...] pjcj.net>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: bug-Devel-Cover [...] rt.cpan.org
Date: Fri, 29 Dec 2006 23:54:41 +0100
Sender: Paul Johnson <paul [...] pjcj.net>
Message-Id: <20061229225441.GI2517 [...] pjcj.net>
To: Gisle_Aas via RT <bug-Devel-Cover [...] rt.cpan.org>
From: Paul Johnson <paul [...] pjcj.net>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.6.HEAD-1924-1167432901-1424.22701-0-0 [...] rt.cpan.org>
Content-Length: 1134
Download (untitled) / with headers
text/plain 1.1k
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


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.