The problem is basically bug 396819 which still needs a more complete fix, and isn't sensible to backport to 2.3 unfortunately. The workaround to do the following before spawning threads did seem to help though:
from bzrlib import config
config.StringIO()
This does the thunk before beforehand so there's no chance for a race when it's used later.
See also IRC log: <http:// irclogs. ubuntu. com/2011/ 12/16/% 23bzr.html# t14:59>
The problem is basically bug 396819 which still needs a more complete fix, and isn't sensible to backport to 2.3 unfortunately. The workaround to do the following before spawning threads did seem to help though:
from bzrlib import config StringIO( )
config.
This does the thunk before beforehand so there's no chance for a race when it's used later.