tomgracey has asked for the wisdom of the Perl Monks concerning the following question:
Dear Brains,
I have been using the WWW::Mechanize::Firefox module on my local machine with no complaint.
Recently I tried transferring it onto my VPS. So I made sure firefox and the MozRepl extension were installed and started both through x11 (connection speed slow but no problems to speak of). Then I attempted to run the following test script:
#!/usr/bin/perl use WWW::Mechanize::Firefox; my $mech = WWW::Mechanize::Firefox->new(); $mech->get('http://www.google.com');
Not complex! However, the result is:
MozRepl: Accepted Connection. Segmentation fault
At first I thought it might be a simple case of not enough memory, since my VPS only has 256 MB, but free -m gives me
total used free shared buffers cac +hed Mem: 256 226 29 0 20 +131 -/+ buffers/cache: 74 181 Swap: 255 56 199
In fact the used=226 is an illusion here (I think) as that figure includes the cache. I think the 74 is the actual program usage which is not that much. Further analysis with ps supports this idea - I couldn't get actual program usage to add up to more than 100 MB however I calculated it.
Next I tried running the program under gdb
Starting program: /usr/bin/perl ./testone.pl [Thread debugging using libthread_db enabled] MozRepl: Accepted connection. Program received signal SIGSEGV, Segmentation fault. 0x45978062 in ?? () from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/ +CORE/libperl.so (gdb) bt #0 0x45978062 in ?? () from /usr/lib/perl5/5.8.8/i386-linux-thread-mu +lti/CORE/libperl.so #1 0x459791d5 in ?? () from /usr/lib/perl5/5.8.8/i386-linux-thread-mu +lti/CORE/libperl.so #2 0x4597ac29 in Perl_sv_bless () from /usr/lib/perl5/5.8.8/i386-linu +x-thread-multi/CORE/libperl.so #3 0x4599ac3c in Perl_pp_bless () from /usr/lib/perl5/5.8.8/i386-linu +x-thread-multi/CORE/libperl.so #4 0x4596e98f in Perl_runops_standard () from /usr/lib/perl5/5.8.8/i3 +86-linux-thread-multi/CORE/libperl.so #5 0x4590f03e in ?? () from /usr/lib/perl5/5.8.8/i386-linux-thread-mu +lti/CORE/libperl.so #6 0x45913906 in Perl_call_sv () from /usr/lib/perl5/5.8.8/i386-linux +-thread-multi/CORE/libperl.so #7 0x4597a0e4 in Perl_sv_clear () from /usr/lib/perl5/5.8.8/i386-linu +x-thread-multi/CORE/libperl.so #8 0x4597a945 in Perl_sv_free () from /usr/lib/perl5/5.8.8/i386-linux +-thread-multi/CORE/libperl.so #9 0x4597aeee in ?? () from /usr/lib/perl5/5.8.8/i386-linux-thread-mu +lti/CORE/libperl.so #10 0x45977d10 in ?? () from /usr/lib/perl5/5.8.8/i386-linux-thread-mu +lti/CORE/libperl.so #11 0x45977d7a in Perl_sv_clean_objs () from /usr/lib/perl5/5.8.8/i386 +-linux-thread-multi/CORE/libperl.so #12 0x4591593b in perl_destruct () from /usr/lib/perl5/5.8.8/i386-linu +x-thread-multi/CORE/libperl.so #13 0x080491c7 in main () (gdb)
And looking at the core dump:
(gdb) core core.30048 warning: core file may not match specified executable file. Reading symbols from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE +/libperl.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/l +ibperl.so Reading symbols from /lib/libresolv.so.2...(no debugging symbols found +)...done. Loaded symbols for /lib/libresolv.so.2 Reading symbols from /lib/libnsl.so.1...(no debugging symbols found).. +.done. Loaded symbols for /lib/libnsl.so.1 Reading symbols from /lib/libdl.so.2...(no debugging symbols found)... +done. Loaded symbols for /lib/libdl.so.2 Reading symbols from /lib/libm.so.6...(no debugging symbols found)...d +one. Loaded symbols for /lib/libm.so.6 Reading symbols from /lib/libcrypt.so.1...(no debugging symbols found) +...done. Loaded symbols for /lib/libcrypt.so.1 Reading symbols from /lib/libutil.so.1...(no debugging symbols found). +..done. Loaded symbols for /lib/libutil.so.1 Reading symbols from /lib/libpthread.so.0...(no debugging symbols foun +d)...done. Loaded symbols for /lib/libpthread.so.0 Reading symbols from /lib/libc.so.6...(no debugging symbols found)...d +one. Loaded symbols for /lib/libc.so.6 Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found) +...done. Loaded symbols for /lib/ld-linux.so.2 Reading symbols from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto +/Time/HiRes/HiRes.so...done. Loaded symbols for /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/T +ime/HiRes/HiRes.so Reading symbols from /lib/i686/nosegneg/librt.so.1...(no debugging sym +bols found)...done. Loaded symbols for /lib/i686/nosegneg/librt.so.1 Reading symbols from /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread- +multi/auto/JSON/XS/XS.so...done. Loaded symbols for /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-mu +lti/auto/JSON/XS/XS.so Reading symbols from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto +/List/Util/Util.so...done. Loaded symbols for /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/L +ist/Util/Util.so Reading symbols from /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread- +multi/auto/Params/Util/Util.so...done. Loaded symbols for /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-mu +lti/auto/Params/Util/Util.so Reading symbols from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto +/Cwd/Cwd.so...done. Loaded symbols for /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/C +wd/Cwd.so Reading symbols from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto +/IO/IO.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/I +O/IO.so Reading symbols from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto +/Fcntl/Fcntl.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/F +cntl/Fcntl.so Reading symbols from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto +/Storable/Storable.so...done. Loaded symbols for /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/S +torable/Storable.so Reading symbols from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto +/MIME/Base64/Base64.so...done. Loaded symbols for /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/M +IME/Base64/Base64.so Reading symbols from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto +/Encode/Encode.so...done. Loaded symbols for /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/E +ncode/Encode.so Reading symbols from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto +/Socket/Socket.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/S +ocket/Socket.so Reading symbols from /lib/libnss_files.so.2...(no debugging symbols fo +und)...done. Loaded symbols for /lib/libnss_files.so.2 Reading symbols from /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread- +multi/auto/Template/Stash/XS/XS.so...done. Loaded symbols for /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-mu +lti/auto/Template/Stash/XS/XS.so Core was generated by `/usr/bin/perl ./testone.pl'. Program terminated with signal 11, Segmentation fault. #0 0x45978062 in ?? () from /usr/lib/perl5/5.8.8/i386-linux-thread-mu +lti/CORE/libperl.so
But this is really not meaning much to me! So does anyone have any suggestions about interpreting this/what the problem might be/what to try next?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
really no-one has any suggestions?
by tomgracey (Scribe) on Nov 24, 2010 at 05:37 UTC | |
by roboticus (Chancellor) on Nov 24, 2010 at 12:47 UTC | |
by tomgracey (Scribe) on Nov 25, 2010 at 12:07 UTC |