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

Issues with ocamllsp #4

Open
sebastiansturm opened this issue Nov 15, 2022 · 3 comments
Open

Issues with ocamllsp #4

sebastiansturm opened this issue Nov 15, 2022 · 3 comments

Comments

@sebastiansturm
Copy link

just a heads-up, as I haven't yet had time to look into this in detail: when trying to use ocamllsp with the latest implementation of native json-rpc (f34bbbdc8561f5e...), starting up the server will usually fail for me with "process TBD exited". One time I've also seen a crash while doing that, unfortunately ocamllsp worked fine when running emacs under gdb so I don't have a backtrace, and I assume this is a very timing-sensitive issue. A vanilla Emacs build without native json-rpc works as expected.

Since having a slower Emacs (gdb) seems to improve stability, I'll try slowing down the language server this evening by either recompiling it with different optimization settings or running it under strace/valgrind/whatever seems to work

@yyoncho
Copy link
Member

yyoncho commented Nov 15, 2022

I am having a similar issue (it does not start from time to time). I am still gaining knowledge of how to diagnose issues like that.

@sebastiansturm
Copy link
Author

could it be that param->done sometimes starts out as true? AFAICS, the json rpc state is only malloc'ed without any explicit initialization of the done field, and param->done is checked before the first call to json_rpc_callback (which will then set the flag correctly)?

@sebastiansturm
Copy link
Author

likewise, I'm sometimes seeing calls to ssp_recv with insane values of sz2 (18446744071878777500 in the log I'm currently looking at), which might be caused by error_buffer_read not being initialized on state construction? (guessing, haven't looked deeper into this yet as I'm currently at work)

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

2 participants