[issue43546] "Impossible" KeyError from importlib._bootstrap acquire line 110

2021-03-19 Thread Anentropic
Anentropic added the comment: Upgrading ddtrace lib to latest version did not help. Disabling ddtrace patching of django module does make the error go away. Thanks again for your help, I will move my bug report over to ddtrace. -- ___ Python

[issue43546] "Impossible" KeyError from importlib._bootstrap acquire line 110

2021-03-19 Thread Anentropic
Anentropic added the comment: Thank you for your explanation. I am baffled why this has never happened to us before, and why a specific number of test cases should trigger it (comment one out or add an extra one, it goes away). I've pasted our full stack trace below. It always fai

[issue43546] "Impossible" KeyError from importlib._bootstrap acquire line 110

2021-03-18 Thread Anentropic
Anentropic added the comment: It turns out splitting the tests across 2 nodes rather than 4 also prevents the error. So it's not a case of "too many" tests. So then I think maybe it needs to be a specific number to trigger the error? And yes, if I duplicate one of our tes

[issue43546] "Impossible" KeyError from importlib._bootstrap acquire line 110

2021-03-18 Thread Anentropic
Anentropic added the comment: https://docs.python.org/3/library/_thread.html#_thread.get_ident > Thread identifiers may be recycled when a thread exits and another thread is > created. I still don't see how we get that KeyError but it feels like it might be something to d

[issue43546] "Impossible" KeyError from importlib._bootstrap acquire line 110

2021-03-18 Thread Anentropic
Anentropic added the comment: FWIW... django-nose==1.4.6 nose==1.3.7 The only use of threading I can see in Nose is here: https://github.com/nose-devs/nose/blob/release_1.3.7/nose/plugins/logcapture.py But we are passing --nologcapture flag and nosetests echoes that flag back to us at the

[issue43546] "Impossible" KeyError from importlib._bootstrap acquire line 110

2021-03-18 Thread Anentropic
New submission from Anentropic : We have a Django 2.2.19 project on Python 3.9.2 on Debian (slim-buster) in Docker. A bizarre problem started happening to us this week. First I'll show the symptom, we started getting the following error: ... File "/root/.pyenv/versions