Skip Menu |

This queue is for tickets about the IO-Socket-SSL CPAN distribution.

Report information
The Basics
Id: 79685
Status: resolved
Priority: 0/
Queue: IO-Socket-SSL

People
Owner: Nobody in particular
Requestors: kmx [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: thread-safey issue (MS Windows)
Hi,

I have experienced a crash on strawberry perl 5.14.2 + 5.16.1 and active perl 5.14.2 with the following oneliner:

perl -Mthreads -e "threads->new(sub {require IO::Socket::SSL})->join for(1..500)"

Using:
- IO::Socket::SSL 1.76
- Net::SSLeay 1.48

Workaround to avoid the crash is to load IO::Socket::SSL in the main thread:

perl -Mthreads -e "use IO::Socket::SSL; threads->new(sub {require IO::Socket::SSL})->join for(1..500)"

--
kmx
Hi, I guess this might be because Net::SSLeay gets loaded and initialized multiple times and in parallel. IO::Socket::SSL itself is perl-only, so it should at least not cause a crash. Did you try it with Net::SSLeay directly instead? But, I think it is a bad idea anyway to require (and initialize) the package in each thread again and even if it does not crash it costs lots of performance. So next release of IO::Socket::SSL will have an appropriate entry in the BUGS section. Steffen On Mon Sep 17 04:12:05 2012, KMX wrote: Show quoted text
> Hi, > > I have experienced a crash on strawberry perl 5.14.2 + 5.16.1 and > active perl > 5.14.2 with the following oneliner: > > perl -Mthreads -e "threads->new(sub {require IO::Socket::SSL})->join > for(1..500)" > > Using: > - IO::Socket::SSL 1.76 > - Net::SSLeay 1.48 > > Workaround to avoid the crash is to load IO::Socket::SSL in the main > thread: > > perl -Mthreads -e "use IO::Socket::SSL; threads->new(sub {require > IO::Socket::SSL})->join for(1..500)" > > -- > kmx