-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recurrent but not reproducible crash when writing to cache #12475
Comments
I encountered the same problem just yesterday, after installing |
We also encountered this issue a few times, but not able to reproduce it. For us it always fails when writing a cache for Exception:
We saw this issue on 0.940, 0.941, and 0.942. If we run mypy without cache we don't face this issue. |
I encountered this after upgrading sqlalchemy and sqlalchemy2-stubs. So, maybe changes after upgrading a package can cause this crash. |
I'm raising the priority to "high" given that this appears to be causing problems for lots of users |
My team has also been experiencing this issue. We also noticed it has something to do with the cache + switching branches but I haven't been able to get a reproducible set of steps. We're also using sqlalchemy stubs as @Dreamsorcerer mentioned so that very well might be part of it. |
Unfortunately it is quite difficult to debug an issue without a reproducer (even a "maximal" reproducer is better than no reproducer at all). If anybody who's experienced this issue is able to put in time trying to get a reproducer, that would be very helpful. |
I've not experienced the problem for many releases, so this is basically resolved to me. Maybe it might be caused by a specific change in sqlachemy2-stubs and upgrading from a specific version (after running mypy on your code) might trigger it.. |
I've bumped our Mypy version from 0.942 to 0.950 and I've also replaced types-sqlalchemy for sqlalchemy-stubs. After trying various situations to trigger this crash I haven't been able to. I'll loop back to this thread after a few days of use to report if the issue's been solved for us. |
Is everyone here using the sqlalchemy mypy plugin? If so, there's a decent chance that's what is causing the crash, so it might be worth disabling it for a few days and seeing if that stops the crashes. Looking at the error message in the traceback, the thing that seems weird is that I can't find any code paths where Some other things I've noticed that may or may not be related:
There's a chance that the One other strange thing I noticed is that the line we're crashing on in the Line 611 in 4e18c78
The docstring says the upper bound is always just |
Posting some of my research here - I'm reproduced this with and without the
I was getting the same error as OP initially, before installing mypy with Digging deeper, lines like these seem to be the problem, with the Steps to reproduce (at least for me):
Might be related to #8645? |
@pranavrajpal As the crash persists until the cache is cleaned - is there anything we could debug while being in the broken state? |
Hmm, now that I read about |
I'm running into the same problem after adding |
Over in #13099 @copperfield42 was able to reduce things to a minimal reproducer:
|
Note this may be fixed by #13381 (you can check when the PR is merged) |
I tried reproducing and it does seem to work now on mypy 0.982. Are people still able to reproduce this? |
Crash Report
Recently we (different team members) are now and then running into a mypy crash which can only be resolved by deleting
.mypy_cache
. We have no idea yet how to reproduce it - it likely is triggered after changing branches. But we could so far not figure out the problematic code path.Traceback
To Reproduce
Well yeah, seems to be some constellation of stars and cache state.
Your Environment
-p
and a config file.mypy.ini
(and other config files):The text was updated successfully, but these errors were encountered: