-
Notifications
You must be signed in to change notification settings - Fork 126
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
Cryptol RPC server sometimes hangs #1250
Comments
As it was described to me, the client hangs on
N.B., the above script and it's accompanying instructions don't quite work as is, as the cryptol-specs repository has some modules that fail to load at present. |
This may be reproducing the error we've had reported. At least observationally it appears similar:
It happily loads module after module until it gets to
then you immediately get an error reported from the server regarding an error that occurred while loading:
So, my currently hypothesis is that something exceptional is happening in the server but for some reason the error sometimes isn't properly getting reported/received/etc. Will have to dig a little deeper. Semi-related: some updates to both the cryptol server and client are about to land which should hopefully make it easier to narrow these kinds of errors without necessarily rebuilding the server to add log statements. (Well we'll see if it helps in this particular case I guess...) |
Some difficult to reproduce bugs regarding the RPC server hanging (#1250) seemed to be related to the type checker solver (Z3) hanging after periods of extended use. I.e., a module would load/error quickly normally, but if preceded by enough prior solver/server activity, Z3 would consistently hang. To avoid this, we can simply reset the solver and reload the type checker prelude when the server is asked to load a file or module. This solves the Z3 hang issues in observed cases and requires no additional forking (which we're trying to minimize when possible).
* fix(rpc): reset TC solver on file/module load Some difficult to reproduce bugs regarding the RPC server hanging (#1250) seemed to be related to the type checker solver (Z3) hanging after periods of extended use. I.e., a module would load/error quickly normally, but if preceded by enough prior solver/server activity, Z3 would consistently hang. To avoid this, we can simply reset the solver and reload the type checker prelude when the server is asked to load a file or module. This solves the Z3 hang issues in observed cases and requires no additional forking (which we're trying to minimize when possible).
I believe we confirmed in all the observed cases where this was occurring, it was related to SMT solvers hanging on the server side. #1258 appears to effectively help mitigate this. |
Thank you @pnwamk! |
We've seen mention of cases where the Cryptol RPC server can hang when loading Cryptol modules, but haven't been able to reproduce it locally yet.
@pnwamk, do you have some more detail you can fill in?
The text was updated successfully, but these errors were encountered: