Found: manipulations on the symbols under mod_perl are visible to all threads, therefore the pointer mess I am seeing. I should manipulate the thread main function scratchpad, instead of the symbol table, but I do not know how to achieve such a thing.