This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sbt
Recipients Giovanni.Bajo, avian, bobbyi, gregory.p.smith, jcea, lesha, neologix, nirai, pitrou, sbt, sdaoden, vinay.sajip, vstinner
Date 2012-06-01.00:11:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> a) fork() is called with the DB lock held by thread1.
> b) Some time passes before the child gets to exec().
> c) In that time, the child's thread2 gets to doWork(). 
> d) Simultaneously, the parent's doWork is still running and holding a lock.
> e) Thanks to reinit_locks, the child's thread2 does not have a lock, and 
> it will merrily proceed to corrupt the parent's work.

You seem to be saying that all three threads survive the fork.

I think forkall() on Solaris acts like that, but the normal fork() function does not.  Only the thread which performs fork() will survive in the child process.

So doWork() never runs in the child process, and the lock is never used in the child process.
Date User Action Args
2012-06-01 00:11:01sbtsetrecipients: + sbt, gregory.p.smith, vinay.sajip, jcea, pitrou, vstinner, nirai, bobbyi, neologix, Giovanni.Bajo, sdaoden, avian, lesha
2012-06-01 00:11:00sbtsetmessageid: <>
2012-06-01 00:11:00sbtlinkissue6721 messages
2012-06-01 00:11:00sbtcreate