||amoebam, jeff.allen, tcdelaney
|Marked as misclassified
Just dropping in to report that contrary to Jeff's hope, #2609 did not fix this.
I've checked with a 2.7.2a1+ built from hg master at the time of posting, and it is still necessary to prevent Python imports from coinciding on different JVM threads -- otherwise we observe "impossible" errors such as the Python code "from collections import deque" failing with an ImportError "cannot import name deque".
The underlying cause is, as you might guess, that the first thread to request an import starts initializing the new object, but the second thread receives a reference to the same object while the first thread is still only halfway through the classDictInit method, requests an attribute that has not been added yet, and dies.
So, a global lock it is, for now. But we're not quite confident we're locking the right things - we've stopped seeing crashes, but maybe we've just made them much rarer? - and it would be much better if whatever locking is actually required were done by Jython itself.
|2019-08-08 20:20:06||amoebam||set||messageid: <email@example.com>|
+ amoebam, jeff.allen, tcdelaney|
|2019-08-08 20:20:06||amoebam||link||issue2642 messages|