Debian Bug report logs - #217616
libhtml-parser-perl: Segfault triggered by xmltv (still)

version graph

Package: libhtml-parser-perl; Maintainer for libhtml-parser-perl is Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>; Source for libhtml-parser-perl is src:libhtml-parser-perl.

Reported by: Jim Paris <jim@jtan.com>

Date: Sun, 26 Oct 2003 10:18:03 UTC

Severity: important

Tags: sid

Merged with 217873

Found in version 3.33-1

Fixed in version libhtml-parser-perl/3.34-1

Done: pronovic@debian.org (Kenneth J. Pronovici)

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, pronovic@debian.org (Kenneth J. Pronovici):
Bug#217616; Package libhtml-parser-perl. Full text and rfc822 format available.

Acknowledgement sent to Jim Paris <jim@jtan.com>:
New Bug report received and forwarded. Copy sent to pronovic@debian.org (Kenneth J. Pronovici). Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Jim Paris <jim@jtan.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: libhtml-parser-perl: Segfault triggered by xmltv (still)
Date: Sun, 26 Oct 2003 05:03:55 -0500
[Message part 1 (text/plain, inline)]
Package: libhtml-parser-perl
Version: 3.33-1
Severity: important
Tags: sid

Related to an earlier e-mail of mine to xmltv-users mailing list.

Still having the same segfault problems with the latest perl and
libhtml-parser-perl packages.  The commandline I am using is

tv_grab_na --config-file comcast.xmltv --output foo.xml --days 1 --offset 0 > foo.out 2>&1

comcast.xmltv, foo.xml, and foo.out are attached.

Perl segfaults and dumps core.  The backtrace (while admittedly 99%
useless due to lack of debugging info) contains

(gdb) bt
#0  0x080c3a66 in Perl_share_hek ()
#1  0x080c32cc in Perl_hv_fetch ()
#2  0x08068812 in Perl_gv_fetchmeth ()
#3  0x0806b5e5 in Perl_Gv_AMupdate ()
#4  0x08f527c8 in ?? ()
..

which leads me to believe it's related to the hash value problem you
mentioned.

My xmltv version is 0.5.19-2.

-jim

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux papa 2.4.20 #1 Fri Apr 18 04:06:47 EDT 2003 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages libhtml-parser-perl depends on:
ii  libc6                         2.3.2-8    GNU C Library: Shared libraries an
hi  libhtml-tagset-perl           3.03-2     Data tables pertaining to HTML
ii  perl                          5.8.1-4    Larry Wall's Practical Extraction 
ii  perl-base [perlapi-5.8.1]     5.8.1-4    The Pathologically Eclectic Rubbis

-- no debconf information

[/home/mythtv/.mythtv/Comcast.xmltv (text/plain, attachment)]
[/tmp/foo.xml (text/xml, attachment)]
[/tmp/foo.out (text/x-c, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, pronovic@debian.org (Kenneth J. Pronovici):
Bug#217616; Package libhtml-parser-perl. Full text and rfc822 format available.

Acknowledgement sent to Kenneth Pronovici <pronovic@debian.org>:
Extra info received and forwarded to list. Copy sent to pronovic@debian.org (Kenneth J. Pronovici). Full text and rfc822 format available.

Message #10 received at 217616@bugs.debian.org (full text, mbox):

From: Kenneth Pronovici <pronovic@debian.org>
To: Jim Paris <jim@jtan.com>, 217616@bugs.debian.org
Cc: Ed Avis <ed@membled.com>
Subject: Re: Bug#217616: libhtml-parser-perl: Segfault triggered by xmltv (still)
Date: Sun, 26 Oct 2003 15:38:42 -0600
[Message part 1 (text/plain, inline)]
> Still having the same segfault problems with the latest perl and
> libhtml-parser-perl packages.  The commandline I am using is
> 
> tv_grab_na --config-file comcast.xmltv --output foo.xml --days 1 --offset 0 > foo.out 2>&1
> 
> comcast.xmltv, foo.xml, and foo.out are attached.
> 
> Perl segfaults and dumps core.  The backtrace (while admittedly 99%
> useless due to lack of debugging info) contains

Well, unfortuntely, I can't reproduce this at all on my test machine, so
we're back to square 1.  I don't know if the data changed or if there's
something different on my machine.

At this point, we can go forward in one of two ways.  First, if you're
comfortable with Perl, you can try to come up with a minimal test case
yourself.  Or, if you're willing to give me an account on your machine,
I can do some experimenting myself.  I've done this a few times in the
past for a few other XMLTV bugs.  Either way works fine for me.
Otherwise, if neither of those will work, then we'll probably just leave
this open in the BTS until someone else can reproduce it.

Sorry I don't have a better answer for you.

KEN

-- 
Kenneth J. Pronovici <pronovic@debian.org>
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, pronovic@debian.org (Kenneth J. Pronovici):
Bug#217616; Package libhtml-parser-perl. Full text and rfc822 format available.

Acknowledgement sent to Jim Paris <jim@jtan.com>:
Extra info received and forwarded to list. Copy sent to pronovic@debian.org (Kenneth J. Pronovici). Full text and rfc822 format available.

Message #15 received at 217616@bugs.debian.org (full text, mbox):

From: Jim Paris <jim@jtan.com>
To: Kenneth Pronovici <pronovic@debian.org>
Cc: 217616@bugs.debian.org, Ed Avis <ed@membled.com>
Subject: Re: Bug#217616: libhtml-parser-perl: Segfault triggered by xmltv (still)
Date: Sun, 26 Oct 2003 22:05:28 -0500
> At this point, we can go forward in one of two ways.  First, if
> you're comfortable with Perl, you can try to come up with a minimal
> test case yourself.  Or, if you're willing to give me an account on
> your machine, I can do some experimenting myself.

I didn't have much luck coming up with a minimal testcase, but I've
reproduced the problem on another machine that has a decent network
connection, so if you have the time and are willing, I can just let
you play there.  I will send the relative info privately.

Thanks.

-jim




Information forwarded to debian-bugs-dist@lists.debian.org, pronovic@debian.org (Kenneth J. Pronovici):
Bug#217616; Package libhtml-parser-perl. Full text and rfc822 format available.

Acknowledgement sent to Kenneth Pronovici <pronovic@debian.org>:
Extra info received and forwarded to list. Copy sent to pronovic@debian.org (Kenneth J. Pronovici). Full text and rfc822 format available.

Message #20 received at 217616@bugs.debian.org (full text, mbox):

From: Kenneth Pronovici <pronovic@debian.org>
To: Jim Paris <jim@jtan.com>
Cc: 217616@bugs.debian.org, Ed Avis <ed@membled.com>
Subject: Re: Bug#217616: libhtml-parser-perl: Segfault triggered by xmltv (still)
Date: Mon, 27 Oct 2003 00:25:43 -0600
[Message part 1 (text/plain, inline)]
> > At this point, we can go forward in one of two ways.  First, if
> > you're comfortable with Perl, you can try to come up with a minimal
> > test case yourself.  Or, if you're willing to give me an account on
> > your machine, I can do some experimenting myself.
> 
> I didn't have much luck coming up with a minimal testcase, but I've
> reproduced the problem on another machine that has a decent network
> connection, so if you have the time and are willing, I can just let
> you play there.  I will send the relative info privately.

All righty... I've gotten this down to a minimal test case, which is
attached.  I think that this is probably a Perl bug, not an HTML::Parser
bug, because if you comment out the 'new Segfault()' call in test.pl and
use the 'new HTML::Parser' call instead, things seem to work fine.

I don't right now have a non-Debian Perl 5.8.1 environment, so I can't
test whether this is Debian-specific.  I did, however, test that the
problem still occurs even when HTML::Parser is built against the current
Debian 5.8.1-4 Perl package.  That at least says this isn't a binary
incompatibility problem in quite the same way as #213529.

I'm going to toss this out to the debian-perl mailing list and see what
they think.  

KEN

-- 
Kenneth J. Pronovici <pronovic@debian.org>
[test.pl (application/x-perl, attachment)]
[Segfault.pm (application/x-perl, attachment)]
[html.segfault (text/plain, attachment)]
[Message part 5 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, pronovic@debian.org (Kenneth J. Pronovici):
Bug#217616; Package libhtml-parser-perl. Full text and rfc822 format available.

Acknowledgement sent to Gisle Aas <gisle@ActiveState.com>:
Extra info received and forwarded to list. Copy sent to pronovic@debian.org (Kenneth J. Pronovici). Full text and rfc822 format available.

Message #25 received at 217616@bugs.debian.org (full text, mbox):

From: Gisle Aas <gisle@ActiveState.com>
To: 217616@bugs.debian.org
Subject: HTML-Parser-3.34
Date: 27 Oct 2003 13:25:25 -0800
I just upload HTML-Parser-3.34 to CPAN.  I believe it will fix this
problem.

Regards,
Gisle



Information forwarded to debian-bugs-dist@lists.debian.org, pronovic@debian.org (Kenneth J. Pronovici):
Bug#217616; Package libhtml-parser-perl. Full text and rfc822 format available.

Acknowledgement sent to Kenneth Pronovici <pronovic@debian.org>:
Extra info received and forwarded to list. Copy sent to pronovic@debian.org (Kenneth J. Pronovici). Full text and rfc822 format available.

Message #30 received at 217616@bugs.debian.org (full text, mbox):

From: Kenneth Pronovici <pronovic@debian.org>
To: 217616@bugs.debian.org
Cc: Ed Avis <ed@membled.com>, Jim Paris <jim@jtan.com>
Subject: [gisle@activestate.com: Re: Seg fault with HTML::Parser]
Date: Mon, 27 Oct 2003 15:53:36 -0600
[Message part 1 (text/plain, inline)]
Fortunately, Gisle Aas was watching perl5-porters or debian-perl last
night my time and I had mail in my inbox this morning.  Over the course
of today, he's narrowed down my test case to something much smaller:

   use HTML::Parser;
   my $x = HTML::Parser->new(api_version => 3);
   $x->handler(end => sub { push(@row, (1) x 505); 1 },   "");
   $x->parse("</TD>");

It turns out to be not hash related after all.

Gisle has also come up with a patch to fix the problem.  I've tested
this against my minimal test case and using tv_grab_na and ZapListings
on Jim's test box and it seems to fix the problem in both cases.

> This is the one that forgot to refresh the stack pointer.  This patch
> to HTML-Parser make the problem go away:
> 
> Index: Parser.xs
> ===================================================================
> RCS file: /cvsroot/libwww-perl/html-parser/Parser.xs,v
> retrieving revision 2.118
> diff -u -p -u -r2.118 Parser.xs
> --- Parser.xs	15 Aug 2003 16:56:20 -0000	2.118
> +++ Parser.xs	27 Oct 2003 20:58:08 -0000
> @@ -258,11 +258,13 @@ parse(self, chunk)
>  		    len = 0;
>                  }
>  		parse(aTHX_ p_state, len ? chunk : 0, self);
> +	        SPAGAIN;
>  
>              } while (len && !p_state->eof);
>          }
>  	else {
>  	    parse(aTHX_ p_state, chunk, self);
> +            SPAGAIN;
>          }
>          p_state->parsing = 0;
>  	if (p_state->eof) {

It sounds like Gisle will have a new HTML::Parser out soon; if for some
reason it doesn't hit CPAN right away, I'll patch it myself and release
a Debian-only version after work tonite.

KEN

-- 
Kenneth J. Pronovici <pronovic@debian.org>
[Message part 2 (application/pgp-signature, inline)]

Merged 217616 217873. Request was from Kenneth Pronovici <pronovic@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Reply sent to pronovic@debian.org (Kenneth J. Pronovici):
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Jim Paris <jim@jtan.com>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #37 received at 217616-close@bugs.debian.org (full text, mbox):

From: pronovic@debian.org (Kenneth J. Pronovici)
To: 217616-close@bugs.debian.org
Subject: Bug#217616: fixed in libhtml-parser-perl 3.34-1
Date: Mon, 27 Oct 2003 19:02:43 -0500
Source: libhtml-parser-perl
Source-Version: 3.34-1

We believe that the bug you reported is fixed in the latest version of
libhtml-parser-perl, which is due to be installed in the Debian FTP archive:

libhtml-parser-perl_3.34-1.diff.gz
  to pool/main/libh/libhtml-parser-perl/libhtml-parser-perl_3.34-1.diff.gz
libhtml-parser-perl_3.34-1.dsc
  to pool/main/libh/libhtml-parser-perl/libhtml-parser-perl_3.34-1.dsc
libhtml-parser-perl_3.34-1_i386.deb
  to pool/main/libh/libhtml-parser-perl/libhtml-parser-perl_3.34-1_i386.deb
libhtml-parser-perl_3.34.orig.tar.gz
  to pool/main/libh/libhtml-parser-perl/libhtml-parser-perl_3.34.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 217616@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Kenneth J. Pronovici <pronovic@debian.org> (supplier of updated libhtml-parser-perl package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Mon, 27 Oct 2003 17:48:36 -0600
Source: libhtml-parser-perl
Binary: libhtml-parser-perl
Architecture: source i386
Version: 3.34-1
Distribution: unstable
Urgency: low
Maintainer: Kenneth J. Pronovici <pronovic@debian.org>
Changed-By: Kenneth J. Pronovici <pronovic@debian.org>
Description: 
 libhtml-parser-perl - A collection of modules that parse HTML text documents
Closes: 217616
Changes: 
 libhtml-parser-perl (3.34-1) unstable; urgency=low
 .
   * New upstream release.
     - Includes fix to segfault problem exposed by XMLTV (closes: #217616).
Files: 
 b8817b2f8c749b2602b2a90d9dddc3e4 652 perl optional libhtml-parser-perl_3.34-1.dsc
 3a835024acce73f3b6133c2e4762f6f9 75193 perl optional libhtml-parser-perl_3.34.orig.tar.gz
 de55b14ed2a682f4e98f7f1a97db1a48 4671 perl optional libhtml-parser-perl_3.34-1.diff.gz
 bf496bd350f43a8420ff41fcae58c451 96274 perl optional libhtml-parser-perl_3.34-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/na/08On2ujzZUQQRAus6AKDDrocEJqEhRM/rstgH/xS0jFg6eQCg1D6O
th2xSa4RwGBoaERIuuwxTeI=
=9aVm
-----END PGP SIGNATURE-----




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Apr 18 14:29:15 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.