You are not logged in.

#1 2014-08-31 04:51:16

TheAmigo
Member
Registered: 2008-04-08
Posts: 68

Loading perl module LWP::Simple causes seg fault

I just ran pacman -Syu (upgraded 400 packages and the kernel went from 3.12.9-2 to 3.16.1-1 to give an idea of the last time I updated this system).

Now when I run:

perl -e 'use LWP::Simple'

It seg faults and dumps core.

pacman says: /usr/share/perl5/vendor_perl/LWP/Simple.pm is owned by perl-libwww 6.08-1 Which is the current version.  I tried reverting to 6.05-1 (the version I had previously) but it give the same result.

Checking pacman.log, I see two errors:

[2014-08-30 21:31] [PACMAN] installed perl-xml-sax-base (1.08-3)
[2014-08-30 21:31] [ALPM-SCRIPTLET] /tmp/alpm_TUIVDd/.INSTALL: line 1: 21528 Segmentation fault      (core dumped) perl -MXML::SAX -e "XML::SAX->add_parser(q(XML::SAX::PurePerl))->save_parsers()" &> /dev/null
[2014-08-30 21:31] [PACMAN] installed perl-xml-sax (0.99-4)
[2014-08-30 21:31] [ALPM-SCRIPTLET] could not find ParserDetails.ini in /usr/share/perl5/vendor_perl/XML/SAX

So I uninstalled those packages and when I reinstalled, there were no errors... that didn't help.

Any ideas?

Offline

#2 2014-08-31 05:06:06

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,694

Re: Loading perl module LWP::Simple causes seg fault

Offline

#3 2014-08-31 05:17:53

TheAmigo
Member
Registered: 2008-04-08
Posts: 68

Re: Loading perl module LWP::Simple causes seg fault

Yes, the script linked from there outputs:

error: no targets specified (use -h for help)
./find-broken-perl-packages.sh: line 28: module-to-dist.pl: command not found
results are in "/tmp/find-broken-perl-package.1qVGNURk"

and all four files it put in its temp dir are empty.

The LWP::Simple module that dies on me is part of perl-libwww, an official Arch package.

Offline

#4 2014-08-31 05:24:34

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,694

Re: Loading perl module LWP::Simple causes seg fault

When you have a module installed that's built for the old version, it will segfault even when you use a different module. Running

perl -e 'use LWP::Simple'

works just fine here, suggesting you have something else installed that's causing a problem.

What do you have in /usr/lib/perl5/site_perl?

Last edited by Scimmia (2014-08-31 05:26:13)

Offline

#5 2014-08-31 05:27:02

anatolik
Developer
Registered: 2012-09-27
Posts: 458

Re: Loading perl module LWP::Simple causes seg fault

Some people report that find-broken-perl-packages.sh does not find all the broken packages.

Most likely perl loads broken files from /usr/share/perl5/site_perl. It is where CPAN installs packages and this location has priority over path where Arch installs packages (/usr/share/perl5/vendor_perl/). Check /usr/share/perl5/site_perl, ideally  it should be clean.


Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster

Offline

#6 2014-08-31 16:22:21

TheAmigo
Member
Registered: 2008-04-08
Posts: 68

Re: Loading perl module LWP::Simple causes seg fault

I found what's causing it, but still don't know how it got there.  For anyone else who has similar problems, here's how I found which module was the problem:

strace perl -e 'use LWP::Simple' |& grep '^open' | tail -1

In my case, it shows:

open("/usr/lib/perl5/site_perl/auto/Storable/Storable.so", O_RDONLY|O_CLOEXEC) = 5

I'm not sure why I have that file when I also have the proper /usr/lib/perl5/core_perl/auto/Storable/Storable.so.  Perhaps I was installing stuff from CPAN and it did that to fulfill a dependency?

And it's far from the only one:  I found 27 other .so duplicates in site_perl that are also in core_perl:

cd /usr/lib/perl5/site_perl
find . -name "*.so" | xargs -n1 pacman -Qo  |& grep "No package owns" | cut -c24- | xargs -n1 -I{} ls -l ../core_perl/{} |& grep -v "cannot access"

Cleaning this up isn't going to be fun... I have 12 more .so's in site_perl that do NOT exist in core_perl or vendor_perl... so I can't just delete all unowned files in site_perl.

Offline

Board footer

Powered by FluxBB