http://www.perlmonks.org?node_id=843806


in reply to Randomness encountered with CGI Session

How are you seeing this behavior?

Create a test program , with verbose logging, and run it for a few thousand interation locally, through localhost webserver, and through non-localhost webserver. Examine the log files.

You should be able to discover if the problem exists and where, or if its merely an illusion problem :)

  • Comment on Re: Randomness encountered with CGI Session

Replies are listed 'Best First'.
Re^2: Randomness encountered with CGI Session
by Anonymous Monk on Jun 09, 2010 at 06:45 UTC

    Because it happens randomly, it was discovered by chance.

    I followed up with more tests - manually - and confirmed the existence of the unexpected behaviour.

    I'm clueless at this point - it's a bit like you have a variable set to "Hello World" and it's always printing "Hello World" but once in the blue moon you see "hello there" printed ;)

      Clueless about what?

      You contend there is a problem with CGI::Session, it happens randomly, but that you've confirmed it manually.

      Great, here is how you go about fixing it.

        I didn't mean to say there is a problem with CGI::Session directly. I said I had encountered a problem (a strange phenomenon that happens randomly) when using CGI::Session.

        With a good night's sleep, I was able to run more tests and came out with new hypotheses about how the bug was triggered. But I need to confirm these hypotheses with real users. So I've taken your advice - thanks :) - to do logging at suspicious points in my code.

        I was clueless yesterday because I was looking at the code and could not figure out any parts that could trigger that bug, so I wouldn't know what to log and where.