You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
Language server crashes due to Collection was modified exception #943
I'm using the nightly release of the language server, but after spinning up to 100% cpu (400% of 8 cores, 4 of which are dedicated to docker), the server crashes with a System.InvalidOperationException: Collection was modified; enumeration operation may not execute
Unfortunately I just lost the stacktrace, because I reloaded the project to see if it was repeatable. It doesn't seem to be repeatable every time, but I've had the server crash twice today already.
From memory, it stalled at "27 items remaining", and just before the crash the log was warning of 4 unused variables.
VSCode Version: 1.33.1
Python Extension Version: 2019.3.6558
Language Server Version: 0.2.53
If the problem happens to me again, I'll add the stacktrace to this issue. I know not working with a trace would be fruitless.
Most probably collection of scopes. Looks like module analysis still runs (and adding scopes) while scheduler thinks it is completed and started dependent analysis which led to concurrent access.
I haven't seen the collection modified exception since the first time, though the frozen analysis (and high CPU) continued. I see the frozen analysis has been dealt with separately, so let's close this one off.
Activity
MikhailArkhipov commentedon Apr 12, 2019
Most probably collection of scopes. Looks like module analysis still runs (and adding scopes) while scheduler thinks it is completed and started dependent analysis which led to concurrent access.
MikhailArkhipov commentedon Apr 12, 2019
Or #946
MikhailArkhipov commentedon Apr 17, 2019
Still a problem with #947 applied? Should be in 0.2.55+ I believe.
jarshwah commentedon Apr 17, 2019
I haven't seen the collection modified exception since the first time, though the frozen analysis (and high CPU) continued. I see the frozen analysis has been dealt with separately, so let's close this one off.
MikhailArkhipov commentedon Apr 17, 2019
Fixes for looping analysis went in today so 0.2.58+ hopefully resolves your CPU case.