On 05/14/2017 03:45 AM, Karl Lehenbauer wrote:
This is kind of cool. If the mod_rivet master interpreter has gotten
its random seed initialized, say by some Tcl code requesting a random
number, then when Apache forks off children they will inherit the same
random seed and hence produce the same sequence.
This can be fixed from the Rivet config by forcing children to re-seed
the RNG, something like:
RivetServerConf ChildInitScript "expr {srand([clock clicks] + [pid])}”
It might be a good idea to do this in C in Rivet whenever running
SeparateVirtualInterps off.
Did you actually try also the case with separate interpreters? In
mod_rivet 2.3 these interpreters are slaves of a single root
interpreter. How deeply are slave interpreters initialized wrt their
parent?
In mod_rivet 3.0 the problem should be confined in the prefork bridge
when SeparateVirtualInterps Off, otherwise separate interpreters are
interpreters in their own right, not slaves
-- Massimo
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]