List Info

Thread: Re: Perl threads + HTTPS = Crash




Re: Perl threads + HTTPS = Crash
user name
2007-10-16 10:10:27
Moin,

On Tuesday 16 October 2007 16:59:15 Jerry D. Hedden wrote:
> Danett song wrote:
> > 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?
>
> It has nothing to do with the protocol per se, but with
the
> modules that implement it.
>
> > I have SSL modules instaled...
> >
> > libcrypt-ssleay-perl            0.51-5
> > libio-socket-ssl-perl           1.01-1
> > libnet-ssleay-perl              1.30-1
>
> Most likely, one or more of these modules is not
> thread-safe.  You need to file bug reports against
whichever
> of these you can determine is the problem (or all if
you can
> not).
>
> If you read the POD for the 'threads' module, it
discusses
> possible work arounds for non-thread-safe modules.
>
> This is not a bug with the Perl interpreter.  As such,
this
> bug report should be closed.

Not so fast. I remember there was a bug in blead fixed very
recently 
that showed that if you grabbed enough things with LWP fast
enough (or 
loaded enough modules fast enough?), it would go *boom*.
Sorry, but I 
can't remeber which bug that was.

Tels

-- 
 Signed on Tue Oct 16 17:09:22 2007 with key 0x93B84C15.
 Get one of my photo posters: http://bloodgate.com/pos
ters
 PGP key on http://bloodgate.com/te
ls.asc or per email.

 "Build a man a fire, and he'll be warm for a day. Set
a man on fire, 
and
 he'll be warm for the rest of his life."

  -- Terry Pratchett
Re: Perl threads + HTTPS = Crash
user name
2007-10-16 10:30:50
Danett song wrote:
> 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?

It has nothing to do with the protocol per se, but with the
modules that implement it.

> I have SSL modules instaled...
>
> libcrypt-ssleay-perl            0.51-5
> libio-socket-ssl-perl           1.01-1
> libnet-ssleay-perl              1.30-1

Jerry D. Hedden wrote:
> Most likely, one or more of these modules is not
> thread-safe.  You need to file bug reports against
whichever
> of these you can determine is the problem (or all if
you can
> not).
>
> If you read the POD for the 'threads' module, it
discusses
> possible work arounds for non-thread-safe modules.
>
> This is not a bug with the Perl interpreter.  As such,
this
> bug report should be closed.

Tels wrote:
> Not so fast. I remember there was a bug in blead fixed
very recently
> that showed that if you grabbed enough things with LWP
fast enough (or
> loaded enough modules fast enough?), it would go
*boom*. Sorry, but I
> can't remeber which bug that was.

However, the originator reported that the threaded app
works
perfectly with HTTP (i.e., without the suspect modules),
but
fails with HTTPS (i.e., with the suspect modules).

Net::SSLeay and Crypt::SSLeay are both XS modules which are
notorious for not being thread-safe.  Additionally, the POD
for Net::SSLeay has caveats related to thread usage.

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )