Message195802
Oh heck, signal, threads and fork really don't mix. :(
Under which condition can a non-async safe function cause trouble? Is it just fork() inside a signal handler or can an incoming signal during fork() also cause havoc?
The OpenSSL PRNG is only buggy when used in a forking application where the master process initializes the PRNG but never uses it. All child processes inherit the same state. OpenSSL tries to work around the problem by feeding the PID into the PRNG state. But as soon as PIDs get recycled, subsequent child processes get the same random numbers.
Antoine's proposal works, too, because it perturbs the master's PRNG state regularly. |
|
Date |
User |
Action |
Args |
2013-08-21 16:22:22 | christian.heimes | set | recipients:
+ christian.heimes, barry, georg.brandl, pitrou, vstinner, benjamin.peterson, neologix, python-dev, sbt |
2013-08-21 16:22:22 | christian.heimes | set | messageid: <1377102142.6.0.811685482026.issue18747@psf.upfronthosting.co.za> |
2013-08-21 16:22:22 | christian.heimes | link | issue18747 messages |
2013-08-21 16:22:22 | christian.heimes | create | |
|