Skip to content
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

Infinite loop with increasing memory #67

Closed
axelson opened this issue Dec 13, 2019 · 0 comments
Closed

Infinite loop with increasing memory #67

axelson opened this issue Dec 13, 2019 · 0 comments

Comments

@axelson
Copy link
Member

axelson commented Dec 13, 2019

Okay, was finally able to capture detailed info about the loop/memory issue mentioned in elixir-lsp/elixir-ls#82

Here are the screenshots that I captured

memory-processinfo

memory-stacktrace

We can see that there is an infinite loop of lines 700, 712, 710 (this is on commit 2dc70af):

https://github.com/elixir-lsp/elixir_sense/blob/2dc70afe9880ab8dc1/lib/elixir_sense/core/introspection.ex#L700

What is happening appears to be that find_metadata_function is currently operating on a nil module and then it recursively calls itself. So a solution would probably involve adding a case to the Enum.find/2 call that handles a nil module non-recursively.

While I ran into this on commit 2dc70af, the same issue appears to still exist on the master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant