in reply to Re: Threads calling LWP causes exception
in thread Threads calling LWP causes exception

Thanks for the reply. I tried http://www.google.com and got the exception as well.
  • Comment on Re^2: Threads calling LWP causes exception

Replies are listed 'Best First'.
Re^3: Threads calling LWP causes exception
by BrowserUk (Patriarch) on Mar 10, 2006 at 04:27 UTC

    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?

        Sorry, I'm afraid you've moved beyond my ability to diagnose. This is your code exactly as posted, and the second run with the number of threads increased to 10, but otherwise unchanged:

        c:\test>perl1 Starting LetsRock() WaitForThreads() started waiting for 1 Use of uninitialized value in print at perl_module1.pm line 43. Use of uninitialized value in print at perl_module1.pm line 43. waiting for 2 waiting for 3 Use of uninitialized value in print at perl_module1.pm line 43. waiting for 4 Use of uninitialized value in print at perl_module1.pm line 43. waiting for 5 Use of uninitialized value in print at perl_module1.pm line 43. WaitForThreads() finished Scalars leaked: 1 Scalars leaked: 1 Scalars leaked: 1 Scalars leaked: 1 Scalars leaked: 1 LetsRock() ended c:\test>perl1 Starting LetsRock() WaitForThreads() started waiting for 1 Use of uninitialized value in print at perl_module1.pm line 43. Use of uninitialized value in print at perl_module1.pm line 43. Use of uninitialized value in print at perl_module1.pm line 43. waiting for 2 waiting for 3 waiting for 4 Use of uninitialized value in print at perl_module1.pm line 43. waiting for 5 Use of uninitialized value in print at perl_module1.pm line 43. waiting for 6 Use of uninitialized value in print at perl_module1.pm line 43. waiting for 7 Use of uninitialized value in print at perl_module1.pm line 43. Use of uninitialized value in print at perl_module1.pm line 43. waiting for 8 waiting for 9 Use of uninitialized value in print at perl_module1.pm line 43. waiting for 10 Use of uninitialized value in print at perl_module1.pm line 43. WaitForThreads() finished Scalars leaked: 1 Scalars leaked: 1 Scalars leaked: 1 Scalars leaked: 1 Scalars leaked: 1 Scalars leaked: 1 Scalars leaked: 1 Scalars leaked: 1 Scalars leaked: 1 Scalars leaked: 1 LetsRock() ended

        I'm at a loss to know what else to suggest. If you had a missing required package, I would expect you to be seeing an error message detailing that, not an exception.


        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.
Re^3: Threads calling LWP causes exception
by BrowserUk (Patriarch) on Mar 10, 2006 at 03:10 UTC

    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?

        I just re-downloaded your code and ran it as is except for commenting out the empty print statement in the GetIt() subroutine and taking the url from the command line.

        It runs fine (except for the leaked scalars which are an unrelated problem), on my system now I have installed Crypt::SSLeay:

        C:\test>perl1 https://www.wellsfargo.com 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

        as I suggested elsewhere, I'd try grabbing a fresh copy of Crypt::SSLeasy from the Theory5 respoitory and if that doesn't work, install AS5.8.6. Beyond that, it's difficult to suggest anything without being able to reproduce teh error.


        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.