Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pod2html crash on Linux #14132

Closed
p5pRT opened this issue Oct 4, 2014 · 9 comments
Closed

pod2html crash on Linux #14132

p5pRT opened this issue Oct 4, 2014 · 9 comments

Comments

@p5pRT
Copy link

@p5pRT p5pRT commented Oct 4, 2014

Migrated from rt.perl.org#122905 (status was 'rejected')

Searchable as RT122905$

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 4, 2014

From @slackwarecn

Created by ispeller@foxmail.com

It seems that pod2html can not work well with HTML​::Parser on Linux.

# pod2html
[1] 11085 segmentation fault (core dumped) pod2html

# perl -d $(which pod2html)
Loading DB routines from perl5db.pl version 1.44
Editor support available.

Enter h or 'h h' for help, or 'man perldebug' for more help.

Signal SEGV at /usr/lib/perl5/site_perl/HTML/Parser.pm line 17.
  require HTML/Parser.pm called at /usr/lib/perl5/site_perl/HTML/Entities.pm line 152
  require HTML/Entities.pm called at (eval 5)[/usr/share/perl5/core_perl/Pod/Simple/XHTML.pm​:53] line 1
  eval 'require HTML​::Entities; 1' called at /usr/share/perl5/core_perl/Pod/Simple/XHTML.pm line 53
  Pod​::Simple​::XHTML​::BEGIN() called at /usr/lib/perl5/site_perl/HTML/Parser.pm line 0
  eval {...} called at /usr/lib/perl5/site_perl/HTML/Parser.pm line 0
  require Pod/Simple/XHTML.pm called at /usr/share/perl5/core_perl/parent.pm line 20
  parent​::import("parent", "Pod​::Simple​::XHTML") called at /usr/share/perl5/core_perl/Pod/Html.pm line 712
  Pod​::Simple​::XHTML​::LocalPodLinks​::BEGIN() called at /usr/lib/perl5/site_perl/HTML/Parser.pm line 0
  eval {...} called at /usr/lib/perl5/site_perl/HTML/Parser.pm line 0
  require Pod/Html.pm called at /usr/bin/core_perl/pod2html line 222
  main​::BEGIN() called at /usr/lib/perl5/site_perl/HTML/Parser.pm line 0
  eval {...} called at /usr/lib/perl5/site_perl/HTML/Parser.pm line 0
[1] 11156 abort (core dumped) perl -d $(which pod2html)

Perl Info
---
Flags:
    category=utilities
    severity=high
---
Site configuration information for perl 5.20.1:

Configured by nobody at Mon Sep 15 14:11:02 CEST 2014.

Summary of my perl5 (revision 5 version 20 subversion 1) configuration:
   
  Platform:
    osname=linux, osvers=3.16.2-1-arch, archname=x86_64-linux-thread-multi
    uname='linux mnt-chroots-arch-extra-x86_64-flo-64 3.16.2-1-arch #1 smp preempt sat sep 6 13:12:51 cest 2014 x86_64 gnulinux '
    config_args='-des -Dusethreads -Duseshrplib -Doptimize=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -Dprefix=/usr -Dvendorprefix=/usr -Dprivlib=/usr/share/perl5/core_perl -Darchlib=/usr/lib/perl5/core_perl -Dsitelib=/usr/share/perl5/site_perl -Dsitearch=/usr/lib/perl5/site_perl -Dvendorlib=/usr/share/perl5/vendor_perl -Dvendorarch=/usr/lib/perl5/vendor_perl -Dscriptdir=/usr/bin/core_perl -Dsitescript=/usr/bin/site_perl -Dvendorscript=/usr/bin/vendor_perl -Dinc_version_list=none -Dman1ext=1perl -Dman3ext=3perl -Dcccdlflags='-fPIC' -Dlddlflags=-shared -Wl,-O1,--sort-common,--as-needed,-z,relro -Dldflags=-Wl,-O1,--sort-common,--as-needed,-z,relro'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.9.1', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags ='-Wl,-O1,--sort-common,--as-needed,-z,relro -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/include-fixed /usr/lib /lib/../lib /usr/lib/../lib /lib /lib64 /usr/lib64
    libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc -lgdbm_compat
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=libc-2.19.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.19'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE'
    cccdlflags='-fPIC', lddlflags='-shared -Wl,-O1,--sort-common,--as-needed,-z,relro -L/usr/local/lib -fstack-protector'


---
@INC for perl 5.20.1:
    /usr/lib/perl5/site_perl
    /usr/share/perl5/site_perl
    /usr/lib/perl5/vendor_perl
    /usr/share/perl5/vendor_perl
    /usr/lib/perl5/core_perl
    /usr/share/perl5/core_perl
    .

---
Environment for perl 5.20.1:
    HOME=/home/ispeller
    LANG=zh_CN.UTF-8
    LANGUAGE (unset)
    LC_CTYPE=zh_CN.UTF-8
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/ispeller/bin:/usr/local/bin:/home/ispeller/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:.:.
    PERL_BADLANG (unset)
    SHELL=/bin/zsh
�

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 5, 2014

From @jkeenan

On Sat Oct 04 06​:47​:16 2014, shell_way@​foxmail.com wrote​:

This is a bug report for perl from ispeller@​foxmail.com,
generated with the help of perlbug 1.40 running under perl 5.20.1.

-----------------------------------------------------------------
[Please describe your issue here]

It seems that pod2html can not work well with HTML​::Parser on Linux.

# pod2html
[1] 11085 segmentation fault (core dumped) pod2html

# perl -d $(which pod2html)
Loading DB routines from perl5db.pl version 1.44
Editor support available.

Enter h or 'h h' for help, or 'man perldebug' for more help.

Signal SEGV at /usr/lib/perl5/site_perl/HTML/Parser.pm line 17.
require HTML/Parser.pm called at
/usr/lib/perl5/site_perl/HTML/Entities.pm line 152
require HTML/Entities.pm called at (eval
5)[/usr/share/perl5/core_perl/Pod/Simple/XHTML.pm​:53] line 1
eval 'require HTML​::Entities; 1' called at
/usr/share/perl5/core_perl/Pod/Simple/XHTML.pm line 53
Pod​::Simple​::XHTML​::BEGIN() called at
/usr/lib/perl5/site_perl/HTML/Parser.pm line 0
eval {...} called at /usr/lib/perl5/site_perl/HTML/Parser.pm line
0
require Pod/Simple/XHTML.pm called at
/usr/share/perl5/core_perl/parent.pm line 20
parent​::import("parent", "Pod​::Simple​::XHTML") called at
/usr/share/perl5/core_perl/Pod/Html.pm line 712
Pod​::Simple​::XHTML​::LocalPodLinks​::BEGIN() called at
/usr/lib/perl5/site_perl/HTML/Parser.pm line 0
eval {...} called at /usr/lib/perl5/site_perl/HTML/Parser.pm line
0
require Pod/Html.pm called at /usr/bin/core_perl/pod2html line 222
main​::BEGIN() called at /usr/lib/perl5/site_perl/HTML/Parser.pm
line 0
eval {...} called at /usr/lib/perl5/site_perl/HTML/Parser.pm line
0
[1] 11156 abort (core dumped) perl -d $(which pod2html)

1. I'm not very clear on what you were trying to do when you encountered this problem. When you called​:

#####
$ perl -d $(which pod2html)
#####

... was that your attenpt to debug a problem? Why do you have no command-line arguments to 'pod2html'? Were you expecting to get input from STDIN?

2. Do you have HTML​::Parser and HTML​::Entities installed on this system?

'pod2html' relies on Pod​::Simple​::XHTML. The latter package has provisions in it for both having and *not* having HTML​::Entities on your system. (HTML​::Parser is a dependency for HTML​::Entities.)

If, for example, you were to install HTML​::Entities on this system, would you still encounter the problem described in this story?

Thank you very much.
--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 5, 2014

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 5, 2014

From @ap

* James E Keenan via RT <perlbug-followup@​perl.org> [2014-10-05 16​:50]​:

On Sat Oct 04 06​:47​:16 2014, shell_way@​foxmail.com wrote​:

Signal SEGV at /usr/lib/perl5/site_perl/HTML/Parser.pm line 17.
require HTML/Parser.pm called at
[�snip�]
[1] 11156 abort (core dumped) perl -d $(which pod2html)

[â�¦] If, for example, you were to install HTML​::Entities on this
system, would you still encounter the problem described in this story?

Does it matter? Perl should not react to missing modules by segfaulting.

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 6, 2014

From @iabyn

On Sun, Oct 05, 2014 at 07​:48​:27PM +0200, Aristotle Pagaltzis wrote​:

* James E Keenan via RT <perlbug-followup@​perl.org> [2014-10-05 16​:50]​:

On Sat Oct 04 06​:47​:16 2014, shell_way@​foxmail.com wrote​:

Signal SEGV at /usr/lib/perl5/site_perl/HTML/Parser.pm line 17.
require HTML/Parser.pm called at
[�snip�]
[1] 11156 abort (core dumped) perl -d $(which pod2html)

[â�¦] If, for example, you were to install HTML​::Entities on this
system, would you still encounter the problem described in this story?

Does it matter? Perl should not react to missing modules by segfaulting.

Assuming that differnt versions of HTML​::Parser haven't changed much
(the OP hasnt' said which version unles I missed something), then its
segfaulting at this line in Parser.pm​:

XSLoader​::load('HTML​::Parser', $VERSION);

so I guess something's going wrong either loading the XS object, or
executing its BOOT section. My initial suspicion would be .so file that
hasn't been built or installed correctly.

To the OP​:

are you using the vendor's perl, and how was HTML​::Parser installed?

--
Nothing ventured, nothing lost.

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 6, 2014

From @slackwarecn

Thanks for your reply very much. I already installed modules you mention�ed. In my Arch, site_perl/HTML/Parser.pm�, site_perl/HTML/Entities.pm� and core_perl/Pod/Simple/XHTML.pm� is already exsist.

I tryed to make sure if I installed them​:
$ sudo perl -MCPAN -e 'install HTML​::Parser; install HTML​::Entities; install Pod​::Simple​::XHTML'â��
Then got the message​:
Reading '/root/.cpan/Metadata'
  Database was generated on Mon, 06 Oct 2014 00​:17​:02 GMT
HTML​::Parser is up to date (3.71).
HTML​::Entities is up to date (3.69).
Pod​::Simple​::XHTML is up to date (3.28).â��

But, when I run this command in Arch with perl version v5.20.1​:
$ perl -MHTML​::Parser -MHTML​::Entities -MPod​::Simple​::XHTMLâ��
perl has crashed with message​:
[1] 5308 segmentation fault (core dumped) perl -MHTML​::Parser -MHTML​::Entities -MPod​::Simple​::XHTMLâ��
Becase of this, pod2html can not work in my Arch.� And, very strange, it is all ok in my Slackware 14.1 with perl version v5.18.1�, it is work well to order input from STDIN.
The version of these modules are same in my Slackware and Arch.

I run perl debuger, then got the message​:
Signal SEGV at /usr/lib/perl5/site_perl/HTML�/Parser.pm line 17.�
Line 17 of Parser.pm is​:
XSLoader​::load('HTML​::Parser', $VERSION);â��
But neither XSLoader or HTML​::Parseâ��r has up to date.

So I think it not the bug of pod2html but a bug for something other. I am not sure about that.

------------------ ���件 ------------------
å��件人​: "Aristotle Pagaltzis via RT";;
å��é��æ�¶é�´​: 2014å¹´10æ��6æ�¥(æ��æ��ä¸�) å��æ�¨1​:48
æ�¶ä»¶äºº​: "EXå��å�±æ£�";

主é¢�​: Re​: [perl #122905] pod2html crash on Linux

* James E Keenan via RT [2014-10-05 16​:50]​:

On Sat Oct 04 06​:47​:16 2014, shell_way@​foxmail.com wrote​:

Signal SEGV at /usr/lib/perl5/site_perl/HTML/Parser.pm line 17.
require HTML/Parser.pm called at
[�snip�]
[1] 11156 abort (core dumped) perl -d $(which pod2html)

[â�¦] If, for example, you were to install HTML​::Entities on this
system, would you still encounter the problem described in this story?

Does it matter? Perl should not react to missing modules by segfaulting.

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 11, 2014

From @jkeenan

On Mon Oct 06 06​:13​:42 2014, shell_way@​foxmail.com wrote​:

Thanks for your reply very much. I already installed modules you
mention�ed. In my Arch, site_perl/HTML/Parser.pm�,
site_perl/HTML/Entities.pm� and core_perl/Pod/Simple/XHTML.pm� is
already exsist.

I tryed to make sure if I installed them​:
$ sudo perl -MCPAN -e 'install HTML​::Parser; install HTML​::Entities;
install Pod​::Simple​::XHTML'â��
Then got the message​:
Reading '/root/.cpan/Metadata'
Database was generated on Mon, 06 Oct 2014 00​:17​:02 GMT
HTML​::Parser is up to date (3.71).
HTML​::Entities is up to date (3.69).
Pod​::Simple​::XHTML is up to date (3.28).â��

But, when I run this command in Arch with perl version v5.20.1​:
$ perl -MHTML​::Parser -MHTML​::Entities -MPod​::Simple​::XHTMLâ��
perl has crashed with message​:
[1] 5308 segmentation fault (core dumped) perl -MHTML​::Parser
-MHTML​::Entities -MPod​::Simple​::XHTMLâ��
Becase of this, pod2html can not work in my Arch.� And, very strange,
it is all ok in my Slackware 14.1 with perl version v5.18.1�, it is
work well to order input from STDIN.
The version of these modules are same in my Slackware and Arch.

I run perl debuger, then got the message​:
Signal SEGV at /usr/lib/perl5/site_perl/HTML�/Parser.pm line 17.�
Line 17 of Parser.pm is​:
XSLoader​::load('HTML​::Parser', $VERSION);â��
But neither XSLoader or HTML​::Parseâ��r has up to date.

So I think it not the bug of pod2html but a bug for something other.
I am not sure about that.

As Dave Mitchell commented above​:
####
"so I guess something's going wrong either loading the XS object, or executing its BOOT section. My initial suspicion would be .so file that hasn't been built or installed correctly. To the OP​: are you using the vendor's perl, and how was HTML​::Parser installed?
#####

Since I suspect you're using CPAN.pm to install modules, see if forcing a re-installation of the HTML-Parser distribution will resolve the problem.

In the 'cpan' shell, say​:
#####
force install HTML-Parser
#####

Hope that helps! Thank you very much.
--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Dec 16, 2017

From zefram@fysh.org

OP hasn't responded with more information in the past three years.
We can presume that eir problem was resolved; there's no evidence of a
problem beyond the OP's own system. This ticket can be closed.

-zefram

@p5pRT p5pRT closed this as completed Dec 18, 2017
@p5pRT
Copy link
Author

@p5pRT p5pRT commented Dec 18, 2017

@iabyn - Status changed from 'open' to 'rejected'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant