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

els_server deadlocks/hangs in filelib:wildcard #1569

Open
rlipscombe opened this issue Oct 21, 2024 · 2 comments
Open

els_server deadlocks/hangs in filelib:wildcard #1569

rlipscombe opened this issue Oct 21, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@rlipscombe
Copy link

Describe the bug

Since upgrading to the current version of ErlangLS, I've noticed it just ... stop working after a while.

To Reproduce

Dunno. Run it. Wait for a bit.

Actual behavior

Attaching observer to the erlang_ls node reveals that the els_server process has a huge number of reductions, is stuck in gen:do_call and has ~3300 messages (mostly process_requests casts) in its queue. This would explain why it's not responding to VS Code. Looking at the stack trace, it appears to be stuck in filelib:wildcard/1.

The file_server_2 process seems to be thrashing around in prim_file:list_dir_nif/1 and associated dirty_nif_finalizer calls.

Context

  • erlang_ls version (tag/sha): 1.1.0
  • Editor used: VS Code
  • LSP client used: erlang-ls.erlang-ls v0.0.46
  • Erlang/OTP: 26.2.5.3

Reverting to an earlier version (v0.0.43) of the VS Code plugin and ErlangLS fixes the problem (but breaks elvis, so I can't do that).

@rlipscombe rlipscombe added the bug Something isn't working label Oct 21, 2024
@rlipscombe
Copy link
Author

Gotcha. I've got a circular symlink chain in my _checkouts directory. myapp/examples/whatever/_checkouts/myapp points back to myapp, which contains examples/whatever/..., and so on.

This would be a bug in Erlang/OTP, then, I guess...

@rlipscombe
Copy link
Author

This would be a bug in Erlang/OTP, then, I guess...

Maybe not. With a minimal repro, filelib:wildcard("**"). stops after ~130 entries. Is it that erlang-ls keeps refreshing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant