It is a lazy import race condition. I thought I documented that in a different bug.
It is pretty easy to reproduce, if you do:
bzr serve --http
And then spawn a bunch of concurrent requests against that.
Note that it only happens one time, the first time anything is opened. So *if* you start loggerhead, have 1 successful page request, then none of the others will fail with this error (at least that I've found).
One thought was to force lazy_import to not be lazy, but you can't actually do that in bzrlib, because we use lazy_import to work around circular import issues.
It is a lazy import race condition. I thought I documented that in a different bug.
It is pretty easy to reproduce, if you do:
bzr serve --http
And then spawn a bunch of concurrent requests against that.
Note that it only happens one time, the first time anything is opened. So *if* you start loggerhead, have 1 successful page request, then none of the others will fail with this error (at least that I've found).
One thought was to force lazy_import to not be lazy, but you can't actually do that in bzrlib, because we use lazy_import to work around circular import issues.