[29695] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 939 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Oct 16 09:09:40 2007

Date: Tue, 16 Oct 2007 06:09:06 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 16 Oct 2007     Volume: 11 Number: 939

Today's topics:
        "copy" from File::Copy fails but returns success <news@lawshouse.org>
    Re: "copy" from File::Copy fails but returns success <elvis-85473@notatla.org.uk>
    Re: "copy" from File::Copy fails but returns success <josef.moellers@fujitsu-siemens.com>
    Re: "copy" from File::Copy fails but returns success <josef.moellers@fujitsu-siemens.com>
    Re: "copy" from File::Copy fails but returns success <no@email.com>
    Re: "copy" from File::Copy fails but returns success <mritty@gmail.com>
    Re: Auction Software <tadmc@seesig.invalid>
        new CPAN modules on Tue Oct 16 2007 (Randal Schwartz)
    Re: Perl 5.8 and MD5 <rkb@i.frys.com>
    Re: Perl threads + HTTPS = Crash :( <danett18@yahoo.com.br>
    Re: Perl threads + HTTPS = Crash :( <no@email.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Tue, 16 Oct 2007 09:43:49 +0100
From: Henry Law <news@lawshouse.org>
Subject: "copy" from File::Copy fails but returns success
Message-Id: <1192524253.887.0@damia.uk.clara.net>

The CGI program, running under Apache, supports download of a file from 
a Linux server running Perl 5.8.6.  The files are stored compressed, so 
the download program first copies the compressed file to a temporary 
directory, then uncompresses it and handles the HTTP for the download. 
My problem is that the use of "copy" from File::Copy appears to succeed 
(with a TRUE return code) but then when I go to uncompress the file it's 
not there.

Because of the CGI environment it's hard to give a fully-runnable 
fragment, but here's the core of it.

   $rc = copy ("/home/nfb/temp.txt", "/tmp/nfb");
   my $output = "Return code:$rc<br>" . `ls -l /tmp/nfb`;
   print "Content-type: 
text/html\n\n<html><body><p>$output</p></body></html>\n";
   exit 0;

The source file exists and is chmod 777.  The result from the code above is

   Return code:1
   -rw-r--r-- 1 apache apache 5 Oct 16 09:34 /tmp/nfb

 ... which shows that the copy succeeded (return code 1) but the file is 
nevertheless not in the target directory /tmp/nfb.  I'm baffled.

Any ideas?  If you think it's a Linux or Apache configuration problem 
then please say so and I'll take this to the relevant group; but this 
code worked a few weeks ago and I've not touched the Apache 
configuration since.

-- 

Henry Law            Manchester, England


------------------------------

Date: 16 Oct 2007 10:14:51 GMT
From: all mail refused <elvis-85473@notatla.org.uk>
Subject: Re: "copy" from File::Copy fails but returns success
Message-Id: <slrnfh93hd.a29.elvis-85473@notatla.org.uk>

On 2007-10-16, Henry Law <news@lawshouse.org> wrote:
> The CGI program, running under Apache, supports download of a file from 
> a Linux server running Perl 5.8.6.  The files are stored compressed, so 
> the download program first copies the compressed file to a temporary 
> directory, then uncompresses it and handles the HTTP for the download. 
> My problem is that the use of "copy" from File::Copy appears to succeed 
> (with a TRUE return code) but then when I go to uncompress the file it's 
> not there.

Are you sure it's not a 0 return code that indicates success?
What is in $! afterward?

http://thinkexist.com/quotation/one_of_the_main_causes_of_the_fall_of_the_roman/165395.html

-- 
Elvis Notargiacomo  master AT barefaced DOT cheek
http://www.notatla.org.uk/goen/


------------------------------

Date: Tue, 16 Oct 2007 12:47:03 +0200
From: Josef Moellers <josef.moellers@fujitsu-siemens.com>
Subject: Re: "copy" from File::Copy fails but returns success
Message-Id: <ff24ra$3q0$1@nntp.fujitsu-siemens.com>

all mail refused wrote:
> On 2007-10-16, Henry Law <news@lawshouse.org> wrote:
>=20
>>The CGI program, running under Apache, supports download of a file from=
=20
>>a Linux server running Perl 5.8.6.  The files are stored compressed, so=
=20
>>the download program first copies the compressed file to a temporary=20
>>directory, then uncompresses it and handles the HTTP for the download. =

>>My problem is that the use of "copy" from File::Copy appears to succeed=
=20
>>(with a TRUE return code) but then when I go to uncompress the file it'=
s=20
>>not there.
>=20
>=20
> Are you sure it's not a 0 return code that indicates success?

 From man File::Copy:

RETURN
        All functions return 1 on success, 0 on failure.  $! will
        be set if an error was encountered.

--=20
These are my personal views and not those of Fujitsu Siemens Computers!
Josef M=F6llers (Pinguinpfleger bei FSC)
	If failure had no penalty success would not be a prize (T.  Pratchett)
Company Details: http://www.fujitsu-siemens.com/imprint.html



------------------------------

Date: Tue, 16 Oct 2007 12:49:06 +0200
From: Josef Moellers <josef.moellers@fujitsu-siemens.com>
Subject: Re: "copy" from File::Copy fails but returns success
Message-Id: <ff24v6$3q0$2@nntp.fujitsu-siemens.com>

Henry Law wrote:
> The CGI program, running under Apache, supports download of a file from=
=20
> a Linux server running Perl 5.8.6.  The files are stored compressed, so=
=20
> the download program first copies the compressed file to a temporary=20
> directory, then uncompresses it and handles the HTTP for the download. =

> My problem is that the use of "copy" from File::Copy appears to succeed=
=20
> (with a TRUE return code) but then when I go to uncompress the file it'=
s=20
> not there.
>=20
> Because of the CGI environment it's hard to give a fully-runnable=20
> fragment, but here's the core of it.
>=20
>   $rc =3D copy ("/home/nfb/temp.txt", "/tmp/nfb");
>   my $output =3D "Return code:$rc<br>" . `ls -l /tmp/nfb`;
>   print "Content-type:=20
> text/html\n\n<html><body><p>$output</p></body></html>\n";
>   exit 0;
>=20
> The source file exists and is chmod 777.  The result from the code abov=
e is
>=20
>   Return code:1
>   -rw-r--r-- 1 apache apache 5 Oct 16 09:34 /tmp/nfb
>=20
> ... which shows that the copy succeeded (return code 1) but the file is=
=20
> nevertheless not in the target directory /tmp/nfb.

Obviously, /tmp/nfb isn't a directory.

> Any ideas?  If you think it's a Linux or Apache configuration problem=20
> then please say so and I'll take this to the relevant group; but this=20
> code worked a few weeks ago and I've not touched the Apache=20
> configuration since.

That's what they always say ;-)

--=20
These are my personal views and not those of Fujitsu Siemens Computers!
Josef M=F6llers (Pinguinpfleger bei FSC)
	If failure had no penalty success would not be a prize (T.  Pratchett)
Company Details: http://www.fujitsu-siemens.com/imprint.html



------------------------------

Date: Tue, 16 Oct 2007 12:55:40 +0100
From: Brian Wakem <no@email.com>
Subject: Re: "copy" from File::Copy fails but returns success
Message-Id: <5njn5sFikddcU2@mid.individual.net>

Henry Law wrote:

> The CGI program, running under Apache, supports download of a file from
> a Linux server running Perl 5.8.6.  The files are stored compressed, so
> the download program first copies the compressed file to a temporary
> directory, then uncompresses it and handles the HTTP for the download.
> My problem is that the use of "copy" from File::Copy appears to succeed
> (with a TRUE return code) but then when I go to uncompress the file it's
> not there.
> 
> Because of the CGI environment it's hard to give a fully-runnable
> fragment, but here's the core of it.
> 
>    $rc = copy ("/home/nfb/temp.txt", "/tmp/nfb");
>    my $output = "Return code:$rc<br>" . `ls -l /tmp/nfb`;
>    print "Content-type:
> text/html\n\n<html><body><p>$output</p></body></html>\n";
>    exit 0;
> 
> The source file exists and is chmod 777.  The result from the code above
> is
> 
>    Return code:1
>    -rw-r--r-- 1 apache apache 5 Oct 16 09:34 /tmp/nfb
> 
> ... which shows that the copy succeeded (return code 1) but the file is
> nevertheless not in the target directory /tmp/nfb.  I'm baffled.


The file *is* /tmp/nfb


-- 
Brian Wakem


------------------------------

Date: Tue, 16 Oct 2007 05:28:44 -0700
From:  Paul Lalli <mritty@gmail.com>
Subject: Re: "copy" from File::Copy fails but returns success
Message-Id: <1192537724.224586.254540@i38g2000prf.googlegroups.com>

On Oct 16, 4:43 am, Henry Law <n...@lawshouse.org> wrote:

> My problem is that the use of "copy" from File::Copy appears to
> succeed (with a TRUE return code) but then when I go to
> uncompress the file it's not there.
>
> Because of the CGI environment it's hard to give a fully-runnable
> fragment, but here's the core of it.
>
>    $rc = copy ("/home/nfb/temp.txt", "/tmp/nfb");
>    my $output = "Return code:$rc<br>" . `ls -l /tmp/nfb`;
>    print "Content-type:
> text/html\n\n<html><body><p>$output</p></body></html>\n";
>    exit 0;
>
> The source file exists and is chmod 777.  The result from the
> code above is
>
>    Return code:1
>    -rw-r--r-- 1 apache apache 5 Oct 16 09:34 /tmp/nfb
>
> ... which shows that the copy succeeded (return code 1) but the
> file is nevertheless not in the target directory /tmp/nfb.  I'm
> baffled.

Look at that ls output again.  See that first dash?  That means that /
tmp/nfb is a file, not a directory.   You copied the file /home/nfb/
temp.txt to the *file* /tmp/nfb.

If a directory named /tmp/nfb does not already exist, then you need to
create it first:
unless (-e "/tmp/nfb") {
   mkdir "/tmp/nfb" or die $!;
}

(Yes, yes, this is a race condition, and that's potentially bad.  Only
you know the internals of your system to know whether or not it's
worth caring about - is /tmp/nfb something that gets repeatedly
created and deleted?)

Paul Lalli



------------------------------

Date: Mon, 15 Oct 2007 20:36:27 -0500
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: Auction Software
Message-Id: <slrnfh85cr.348.tadmc@tadmc30.sbcglobal.net>

Aaron <swasaaron@gmail.com> wrote:

>  AJ Auction Pro is 


marketed by spammers.


> It provides full fledged auction
> software solutions for the demanding auction sites.


Sell your scam elsewhere.


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


------------------------------

Date: Tue, 16 Oct 2007 04:42:15 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Tue Oct 16 2007
Message-Id: <JpzMEF.FE2@zorch.sf-bay.org>

The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN).  You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.

Acme-ComeFrom-0.11
http://search.cpan.org/~audreyt/Acme-ComeFrom-0.11/
Parallel Goto-in-reverse 
----
Apache-ImgIndex-0.02
http://search.cpan.org/~jpavlick/Apache-ImgIndex-0.02/
----
Cache-FastMmap-1.21
http://search.cpan.org/~robm/Cache-FastMmap-1.21/
Uses an mmap'ed file to act as a shared memory interprocess cache 
----
Catalyst-Plugin-DoCoMoUID-0.01
http://search.cpan.org/~miyazaki/Catalyst-Plugin-DoCoMoUID-0.01/
Add i-mode terminal's uid to HTTP Request Header 
----
Catalyst-Plugin-MobileAgent-0.03
http://search.cpan.org/~kurihara/Catalyst-Plugin-MobileAgent-0.03/
HTTP mobile user agent string parser plugin for Catalyst 
----
Catalyst-View-Mason-0.14
http://search.cpan.org/~flora/Catalyst-View-Mason-0.14/
Mason View Class 
----
Catalyst-View-TT-Alloy-0.00002
http://search.cpan.org/~cfranks/Catalyst-View-TT-Alloy-0.00002/
Template::Alloy (TT) View Class 
----
Chart-Clicker-1.3.0
http://search.cpan.org/~gphat/Chart-Clicker-1.3.0/
Powerful, extensible charting. 
----
Clone-0.28
http://search.cpan.org/~rdf/Clone-0.28/
recursively copy Perl datatypes 
----
Config-General-2.34
http://search.cpan.org/~tlinden/Config-General-2.34/
Generic Config Module 
----
Convert-EastAsianWidth-0.10
http://search.cpan.org/~audreyt/Convert-EastAsianWidth-0.10/
Convert between full- and half-width characters 
----
Crypt-Rijndael-1.04_03
http://search.cpan.org/~bdfoy/Crypt-Rijndael-1.04_03/
Crypt::CBC compliant Rijndael encryption module 
----
DBIx-Safe-1.2.5
http://search.cpan.org/~turnstep/DBIx-Safe-1.2.5/
Safer access to your database through a DBI database handle 
----
Data-PerlSurvey2007-1.00
http://search.cpan.org/~petdance/Data-PerlSurvey2007-1.00/
Data results and simple code for the results of Perl Survey 2007 
----
EasyMail-2.4.4
http://search.cpan.org/~foolfish/EasyMail-2.4.4/
Perl Send Mail Interface 
----
File-DirList-0.02
http://search.cpan.org/~tpaba/File-DirList-0.02/
provide a sorted list of directory content 
----
File-DirList-0.03
http://search.cpan.org/~tpaba/File-DirList-0.03/
provide a sorted list of directory content 
----
File-Fetch-0.12
http://search.cpan.org/~kane/File-Fetch-0.12/
A generic file fetching mechanism 
----
IPC-Run-SafeHandles-0.01
http://search.cpan.org/~clkao/IPC-Run-SafeHandles-0.01/
Use IPC::Run and IPC::Run3 safely 
----
Lemonldap-NG-Portal-0.8
http://search.cpan.org/~guimard/Lemonldap-NG-Portal-0.8/
The authentication portal part of Lemonldap::NG Web-SSO system. 
----
Lingua-CollinsParser-0.05
http://search.cpan.org/~kwilliams/Lingua-CollinsParser-0.05/
Head-driven syntactic sentence parser 
----
Log-Report-0.10
http://search.cpan.org/~markov/Log-Report-0.10/
report a problem, pluggable handlers and language support 
----
Logfile-EPrints-1.15
http://search.cpan.org/~timbrody/Logfile-EPrints-1.15/
Process Web log files for institutional repositories 
----
Mail-Convert-Mbox-ToEml-0.04
http://search.cpan.org/~rpagitsch/Mail-Convert-Mbox-ToEml-0.04/
Perl extension to convert Mbox files (from Mozilla and Co) to Outlook Express eml files. 
----
Module-Load-Conditional-0.22
http://search.cpan.org/~kane/Module-Load-Conditional-0.22/
Looking up module information / loading at runtime 
----
Net-LDAP-Server-Test-0.01
http://search.cpan.org/~karman/Net-LDAP-Server-Test-0.01/
test Net::LDAP code 
----
NetSNMP-LogParser-1.0481
http://search.cpan.org/~nito/NetSNMP-LogParser-1.0481/
An incremental logparser to be used with Net-SNMP 
----
NetSNMP-MibProxy-1.0481
http://search.cpan.org/~nito/NetSNMP-MibProxy-1.0481/
Simple pass_persist script for Net-SNMP 
----
PAR-Repository-Client-0.16
http://search.cpan.org/~smueller/PAR-Repository-Client-0.16/
Access PAR repositories 
----
POE-Component-Client-Stomp-0.04
http://search.cpan.org/~kesteb/POE-Component-Client-Stomp-0.04/
Perl extension for the POE Environment 
----
POE-Declarative-0.08
http://search.cpan.org/~hanenkamp/POE-Declarative-0.08/
write POE applications without the mess 
----
Parse-Marpa-0.001_015
http://search.cpan.org/~jkegl/Parse-Marpa-0.001_015/
Earley's Algorithm, with improvements 
----
Path-Class-File-Lockable-0.01
http://search.cpan.org/~karman/Path-Class-File-Lockable-0.01/
lock your files with Path::Class::File 
----
Rose-DBx-TestDB-0.03
http://search.cpan.org/~karman/Rose-DBx-TestDB-0.03/
test Rose::DB::Object modules 
----
Rose-DBx-TestDB-0.04
http://search.cpan.org/~karman/Rose-DBx-TestDB-0.04/
test Rose::DB::Object modules 
----
Rose-DBx-TestDBagain-0.03
http://search.cpan.org/~karman/Rose-DBx-TestDBagain-0.03/
----
SOAP-WSDL-2.00_19
http://search.cpan.org/~mkutter/SOAP-WSDL-2.00_19/
SOAP with WSDL support 
----
SQL-DB-0.09
http://search.cpan.org/~mlawren/SQL-DB-0.09/
Perl interface to SQL Databases 
----
SQL-Script-0.04
http://search.cpan.org/~adamk/SQL-Script-0.04/
An object representing a series of SQL statements, normally stored in a file 
----
SVN-Class-0.01
http://search.cpan.org/~karman/SVN-Class-0.01/
manipulate Subversion workspaces with Perl objects 
----
Sys-Statistics-Linux-0.21
http://search.cpan.org/~bloonix/Sys-Statistics-Linux-0.21/
Front-end module to collect system statistics 
----
Template-Extract-0.41
http://search.cpan.org/~audreyt/Template-Extract-0.41/
Use TT2 syntax to extract data from documents 
----
Test-Dynamic-1.3.3
http://search.cpan.org/~turnstep/Test-Dynamic-1.3.3/
Automatic test counting for Test::More 
----
Test-Environment-0.01
http://search.cpan.org/~jkutej/Test-Environment-0.01/
Base module for loading Test::Environment::Plugin::* 
----
Test-Signature-1.10
http://search.cpan.org/~audreyt/Test-Signature-1.10/
Automated SIGNATURE testing 
----
Test-Simple-0.73_01
http://search.cpan.org/~mschwern/Test-Simple-0.73_01/
Basic utilities for writing tests. 
----
VFSsimple-0.03
http://search.cpan.org/~nanardon/VFSsimple-0.03/
----
VFSsimple-Drv-File-0.03
http://search.cpan.org/~nanardon/VFSsimple-Drv-File-0.03/
A VFSsimple implementation over real fs 
----
VFSsimple-Drv-Ftp-0.03
http://search.cpan.org/~nanardon/VFSsimple-Drv-Ftp-0.03/
A VFSsimple implementation over ftp protocol 
----
VFSsimple-Drv-Http-0.03
http://search.cpan.org/~nanardon/VFSsimple-Drv-Http-0.03/
A VFSsimple implementation over http protocol 
----
VFSsimple-Drv-Iso-0.03
http://search.cpan.org/~nanardon/VFSsimple-Drv-Iso-0.03/
A VFSsimple implementation over ISO9660 fs 
----
VFSsimple-Drv-Rsync-0.03
http://search.cpan.org/~nanardon/VFSsimple-Drv-Rsync-0.03/
A VFSsimple implementation over rsync protocol 
----
WWW-Anonymouse-0.02
http://search.cpan.org/~gray/WWW-Anonymouse-0.02/
interface to Anonymouse.org Email and News posting 
----
WWW-Bugzilla-1.3
http://search.cpan.org/~bmc/WWW-Bugzilla-1.3/
Handles submission/update of bugzilla bugs via WWW::Mechanize. 
----
WebService-Google-Reader-0.03
http://search.cpan.org/~gray/WebService-Google-Reader-0.03/
Perl interface to Google Reader 
----
Wx-0.78
http://search.cpan.org/~mbarbon/Wx-0.78/
interface to the wxWidgets cross-platform GUI toolkit 
----
o2sms-3.26
http://search.cpan.org/~mackers/o2sms-3.26/
A module to send SMS messages using the website of O2 Ireland 


If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.

This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
  http://www.stonehenge.com/merlyn/LinuxMag/col82.html

print "Just another Perl hacker," # the original

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


------------------------------

Date: 15 Oct 2007 20:35:05 -0700
From: Ron Bergin <rkb@i.frys.com>
Subject: Re: Perl 5.8 and MD5
Message-Id: <1192489549.623088.164840@i13g2000prf.googlegroups.com>

On Oct 15, 3:27 pm, Joe <jruff...@gailborden.info> wrote:
> If anyone knows a way for me to explain how to reconfigure Perl to
> work with MD5, I'm all eyes and ears.  I am told not to touch Servers,
> it is not my job.  I just write and maintain programs on them.

Paul already provided info that points to the documentation on how
find out what modules are installed, buts here's an example on how to
test if the Digest::MD5 module is installed.

Executed from the command line:

perl -MDigest::MD5 -e 1

If you don't receive any output, then that means that the module is
installed.

If you receive an error message telling you that it can't find the
module, then either it's not installed, or it may have been
incorrectly installed.



------------------------------

Date: Tue, 16 Oct 2007 04:26:13 -0700
From:  Dan <danett18@yahoo.com.br>
Subject: Re: Perl threads + HTTPS = Crash :(
Message-Id: <1192533973.748495.212290@v23g2000prn.googlegroups.com>


no one? :(

On 15 out, 00:27, Dan <danet...@yahoo.com.br> wrote:
> Hi,
>
> I have a program in perl which do several HTTP requests, so I
> implemented some threads to get it running more fast, in general I use
> 5 threads at the same time.
>
> The program work perfectly when i'm requesting only HTTP pages with
> multiple threads, however when I change HTTP to HTTPS with multiple
> threads the program crash (segmentation fault / access violation). If
> I use HTTPS and only one thread the program work perfectly. :(
>
> That's looks like really strange for me, which come to my mind is that
> HTTPS is not thread safe in perl?
>
> Some extra informations...
>
> $ perl -v
>
> This is perl, v5.8.8 built for i486-linux-gnu-thread-multi
>
> I have SSL modules instaled...
>
> libcrypt-ssleay-perl            0.51-5
> libio-socket-ssl-perl           1.01-1
> libnet-ssleay-perl              1.30-1
>
> Module versions....
>
> 'AutoLoader.pm' => '5.63 from /usr/local/share/perl/5.8.8/
> AutoLoader.pm'
> 'Carp.pm' => '1.04 from /usr/share/perl/5.8/Carp.pm'
> 'Carp/Heavy.pm' => '/usr/share/perl/5.8/Carp/Heavy.pm'
> 'Config.pm' => '/usr/lib/perl/5.8/Config.pm'
> 'Config_heavy.pl' => '/usr/lib/perl/5.8/Config_heavy.pl'
> 'DynaLoader.pm' => '1.04 from /usr/lib/perl/5.8/DynaLoader.pm'
> 'Exporter.pm' => '5.58 from /usr/share/perl/5.8/Exporter.pm'
> 'Exporter/Heavy.pm' => '5.58 from /usr/share/perl/5.8/Exporter/
> Heavy.pm'
> 'Getopt/Long.pm' => '2.35 from /usr/share/perl/5.8/Getopt/Long.pm'
> 'HTTP/Cookies.pm' => '1.39 from /usr/share/perl5/HTTP/Cookies.pm'
> 'HTTP/Cookies/Netscape.pm' => '1.26 from /usr/share/perl5/HTTP/Cookies/
> Netscape.pm'
> 'HTTP/Date.pm' => '1.47 from /usr/share/perl5/HTTP/Date.pm'
> 'HTTP/Headers.pm' => '1.64 from /usr/share/perl5/HTTP/Headers.pm'
> 'HTTP/Headers/Util.pm' => '1.13 from /usr/share/perl5/HTTP/Headers/
> Util.pm'
> 'HTTP/Message.pm' => '1.57 from /usr/share/perl5/HTTP/Message.pm'
> 'HTTP/Request.pm' => '1.40 from /usr/share/perl5/HTTP/Request.pm'
> 'HTTP/Response.pm' => '1.53 from /usr/share/perl5/HTTP/Response.pm'
> 'HTTP/Status.pm' => '1.28 from /usr/share/perl5/HTTP/Status.pm'
> 'IO.pm' => '1.22 from /usr/lib/perl/5.8/IO.pm'
> 'IO/Handle.pm' => '1.25 from /usr/lib/perl/5.8/IO/Handle.pm'
> 'LWP.pm' => '5.805 from /usr/share/perl5/LWP.pm'
> 'LWP/Debug.pm' => '/usr/share/perl5/LWP/Debug.pm'
> 'LWP/MemberMixin.pm' => '/usr/share/perl5/LWP/MemberMixin.pm'
> 'LWP/Protocol.pm' => '1.43 from /usr/share/perl5/LWP/Protocol.pm'
> 'LWP/UserAgent.pm' => '2.033 from /usr/share/perl5/LWP/UserAgent.pm'
> 'SelectSaver.pm' => '1.01 from /usr/share/perl/5.8/SelectSaver.pm'
> 'SelfLoader.pm' => '1.0904 from /usr/share/perl/5.8/SelfLoader.pm'
> 'Symbol.pm' => '1.06 from /usr/share/perl/5.8/Symbol.pm'
> 'Term/Cap.pm' => '1.09 from /usr/share/perl/5.8/Term/Cap.pm'
> 'Term/ReadKey.pm' => '2.30 from /usr/lib/perl5/Term/ReadKey.pm'
> 'Term/ReadLine.pm' => '1.02 from /usr/share/perl/5.8/Term/ReadLine.pm'
> 'Term/ReadLine/Perl.pm' => '1.0302 from /usr/local/share/perl/5.8.4/
> Term/ReadLine/Perl.pm'
> 'Term/ReadLine/readline.pm' => '1.0302 from /usr/local/share/perl/
> 5.8.4/Term/ReadLine/readline.pm'
> 'Time/Local.pm' => '1.11 from /usr/share/perl/5.8/Time/Local.pm'
> 'URI.pm' => '1.35 from /usr/share/perl5/URI.pm'
> 'URI/Escape.pm' => '3.28 from /usr/share/perl5/URI/Escape.pm'
> 'XSLoader.pm' => '0.06 from /usr/lib/perl/5.8/XSLoader.pm'
> 'attributes.pm' => '0.06 from /usr/share/perl/5.8/attributes.pm'
> 'constant.pm' => '1.05 from /usr/share/perl/5.8/constant.pm'
> 'integer.pm' => '1.00 from /usr/share/perl/5.8/integer.pm'
> 'overload.pm' => '1.04 from /usr/share/perl/5.8/overload.pm'
> 'perl5db.pl' => '1.28 from /usr/share/perl/5.8/perl5db.pl'
> 'strict.pm' => '1.03 from /usr/share/perl/5.8/strict.pm'
> 'threads.pm' => '1.07 from /usr/lib/perl/5.8/threads.pm'
> 'threads/shared.pm' => '0.94 from /usr/lib/perl/5.8/threads/shared.pm'
> 'vars.pm' => '1.01 from /usr/share/perl/5.8/vars.pm'
> 'warnings.pm' => '1.05 from /usr/share/perl/5.8/warnings.pm'
> 'warnings/register.pm' => '1.01 from /usr/share/perl/5.8/warnings/
> register.pm'
>
> If I run the program with multiple threads and HTTPS inside perl -d in
> Linux I get this error:
>
> $perl -d program.pl
> Attempt to free unreferenced scalar: SV 0xa579768, Perl interpreter:
> 0xa4154e0 during global destruction.
> *** glibc detected *** corrupted double-linked list: 0x089dc180 ***
> Aborted.
>
> In Windows I get this one:
>
> Unhandled exception in SSLEAVY32.DLL: 0xC0000005: Access Violation.
>
> A disasm part of this exception is:
> 01EC7FCB   push        2A7h
> 01EC7FD0   push        1ED5990h
> 01EC7FD5   push        0Ch
> 01EC7FD7   push        9
> 01EC7FD9   mov         dword ptr [esp+18h],eax
> 01EC7FDD   call        01ECB17A
> 01EC7FE2   mov         eax,dword ptr [esp+1Ch]
> 01EC7FE6   mov         esi,dword ptr [eax+20h]   <- BREAK here
> 01EC7FE9   lea         ecx,[esp+14h]
> 01EC7FED   push        ecx
> 01EC7FEE   mov         dword ptr [eax+20h],0
> 01EC7FF5   mov         edx,dword ptr [esp+20h]
> 01EC7FF9   push        1EC8030h
> 01EC7FFE   push        edx
> 01EC7FFF   call        01ECB564
> 01EC8004   mov         eax,dword ptr [esp+28h]
> 01EC8008   push        2ACh
> 01EC800D   push        1ED5990h
> 01EC8012   push        0Ch
> 01EC8014   push        0Ah
> 01EC8016   mov         dword ptr [eax+20h],esi
> 01EC8019   call        01ECB17A
> 01EC801E   add         esp,2Ch
> 01EC8021   pop         esi
> 01EC8022   add         esp,0Ch
> 01EC8025   ret
> 01EC8026   nop
> 01EC8027   nop
> 01EC8028   nop
> 01EC8029   nop
>
> My SSL libs in windows are:
>
> libeay32.dll 908 KB (929.792 bytes)
> SSLeay32.dll 192 KB (196.608 bytes)
>
> They do not have versions, so I pasted the size.
>
> I do my requests like this:
>
> $req = new HTTP::Request GET => "http://$host/$url";
>
> Or for HTTPS:
>
> $req = new HTTP::Request GET => "https://$host/$url";
>
> Is this a know problem in perl? How to fix it?
>
> Thank you a lot.
>
> Regards,




------------------------------

Date: Tue, 16 Oct 2007 12:53:37 +0100
From: Brian Wakem <no@email.com>
Subject: Re: Perl threads + HTTPS = Crash :(
Message-Id: <5njn21FikddcU1@mid.individual.net>

Dan wrote:

> Hi,
> 
> I have a program in perl which do several HTTP requests, so I
> implemented some threads to get it running more fast, in general I use
> 5 threads at the same time.
> 
> The program work perfectly when i'm requesting only HTTP pages with
> multiple threads, however when I change HTTP to HTTPS with multiple
> threads the program crash (segmentation fault / access violation). If
> I use HTTPS and only one thread the program work perfectly. :(
> 
> That's looks like really strange for me, which come to my mind is that
> HTTPS is not thread safe in perl?


I don't know what could cause that, but have you tried using
LWP::Parallel::UserAgent?

http://search.cpan.org/~marclang/ParallelUserAgent-2.57/lib/LWP/Parallel/UserAgent.pm


-- 
Brian Wakem


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V11 Issue 939
**************************************


home help back first fref pref prev next nref lref last post