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

2021-09-11 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python

[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 track

[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 fails in this

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

2021-03-18 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

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

2021-03-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It looks like method _ModuleLock.acquire() was re-entered in the same thread. * Enter acquire() first time, set _blocking_on[tid]. * Trigger some callback (profiler, debugger, tracemalloc) which uses import and calls acquire() again from the same thread. *

[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 test cases (I mean 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 do with this --

[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 t

[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/3.9.2/lib/python3.9