Thanks Chris and David,
   Very helpful information.
    Chris said SSLeay itself could be non-thread safe.  Is  SSLeay the same
as openssl ?

openssl claims that it it thread safe.
http://www.openssl.org/support/faq.html#PROG2

When I use LWP with https, even thread has it's own UserAgent instances, but
it still crashes  sometimes.

When I use 5 threads to access https site,   it crashes 25% of times when I
run it.

But when run two  programs (processes) at the same time on one PC, each
processes with multiple threads to access https pages,   the programs will
crash almost 100%.

I just do not understand why different processes interfere each other. Is
that because different processes are using the same files or socket ?

If I can make https working in Perl thread environment,  I have to write
program in C/openssl.  I love Perl/LWP so much and I hate to not use it.

Any suggestions of LWP like library in C/C++ ?


Thanks

Harry

On Tue, Jun 24, 2008 at 3:03 PM, Christopher Hart <[EMAIL PROTECTED]> wrote:

> I found the same issues after extensive usage with Crypt::SSLeay.  My
> limited testing with sites that allowed both HTTP and HTTPS led me to
> believe that Crypt::SSLeay is not thread safe.  When I looked into
> this about two years ago, my suspicion was that it was SSLeay itself,
> not the Perl wrapper code.  I basically gave up on trying to find a
> solution and it's been forever since I have thought about this
> problem, so I don't know that I can provide much more detail.
>
> At least it's not just you!
>
> Chris
>
> On Mon, Jun 23, 2008 at 11:57 AM, Harry Wu <[EMAIL PROTECTED]> wrote:
> > Hi,
> >    Thanks for creating the great LWP and
> > Crypt::SSLeay<http://search.cpan.org/%7Edland/Crypt-SSLeay-0.57/>
> > modules. I use it very often.
> >
> >    I am using LWP + https in a multithread perl script.  I found that
> > sometime it crashs.
> >
> > Is Crypt::SSLeay <http://search.cpan.org/%7Edland/Crypt-SSLeay-0.57/>
> > thread safe ?      If not, it is possible to make it thread safe ?
> >
> > Does LWP + https    use
> > Net::SSLeay<http://search.cpan.org/%7Eflora/Net_SSLeay.pm/SSLeay.pm>at
> > all ? I am not sure about the relationship between
> > Crypt::SSLeay <http://search.cpan.org/%7Edland/Crypt-SSLeay-0.57/> and
> > Net::SSLeay <http://search.cpan.org/%7Eflora/Net_SSLeay.pm/SSLeay.pm> .
> > Currently LWP only use
> > Crypt::SSLeay<http://search.cpan.org/%7Edland/Crypt-SSLeay-0.57/>,
> > right ?
> >
> >
> > Thanks a lot.. Great job !!
> >
> > Harry
> >
>

Reply via email to