in reply to A review/question on Mason::Globals
It is not possible for two processes to be changing the same $S at the same time. It is a separate variable in every process. If you don't do anything to clear the value out though, it will persist, and the next user to hit that same process will see the $S from the last request. Try logging $$ (the current process ID) along with the relevant values from $S to help you debug it. It can also be useful to run in single process mode, which is done with the -X switch to httpd if you are using apache 1.x.