in reply to Threads calling LWP causes exception

Does it still fail for you if you use a non-secure (https:) url?

I ran your code against the home page of the beeb and got this output:

C:\test>535553 Starting LetsRock() WaitForThreads() started waiting for 1 waiting for 2 waiting for 3 waiting for 4 waiting for 5 WaitForThreads() finished Scalars leaked: 1 Scalars leaked: 1 Scalars leaked: 1 Scalars leaked: 1 Scalars leaked: 1 LetsRock() ended

I've had trouble with SSLeay on my system in the past without threads, but it's possible there is some interaction between them.

If you can fetch non https urls without problems, it will give you (and us) somewhere to concentrate on looking for the problem.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: Threads calling LWP causes exception
by mojoshaneman (Novice) on Mar 10, 2006 at 02:31 UTC
    Thanks for the reply. I tried http://www.google.com and got the exception as well.

      Having just installed Crypt::SSleay from

      C:\Perl\packages>ppm install http://theoryx5.uwinnipeg.ca/ppms/Crypt-S +SLeay.ppd ==================== Install 'Crypt-SSLeay' version 0.51 in ActivePerl 5.8.6.811. ==================== [snip ...] Successfully installed Crypt-SSLeay version 0.51 in ActivePerl 5.8.6.8 +11.

      I ran my cut dwon version of your script against the https url you embedded in your code, and it ran through clean:

      C:\test>535553 https://www.wellsfargo.com Starting LetsRock() Waiting for 1 Waiting for 2 Waiting for 3 Waiting for 4 Waiting for 5 LetsRock() ended

      If you got your version of C::SSLeay from somewhere else or built it yourself you could try re-installing as above. If not, you could try regressing to AS811. I had various problems with AS815 and regressed to fix them. I'm awaiting 5.8.8 before I ungrade.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        I regressed to AS811 and reinstalled the version of C::SSLeay you suggested. Still get the exception. I can repro this on several machines on both Windows 2003 Server, Windows 2000 Server, and XP. Maybe I'm missing a package?

      Hmm. I'm using 5.8.6 and a simplified version of your script (simplified to try and track down where the scalar was being leaked from), and google also gives me no problems:

      C:\test>535553 http://google.com Starting LetsRock() Waiting for 1 Waiting for 2 Waiting for 3 Waiting for 4 Waiting for 5 LetsRock() ended

      Perhaps you could try my code and see what results you get?


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        Your code works. I tried changing my code to look more like yours but have not been successful. The code sample I gave was an example of the bug I'm seeing in a much large set of code. Any ideas why this code works and the sample I gave does not?