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
This task is automatically imported from the old Task Issue Board and it was originally created by jaroslavtulach.
Original issue is here.
Investigating problems with ConnectException I realized that when InterruptedException is thrown from language server, it may remain unnoticed due to the way Scala deals with (checked) exceptions and classifies them to NonFatal and other.
The issue was discovered when searching for reasons why the connection between IDE/engine breaks. One of the hypothesis was: there is an exception in the engine, but we don't know about it as it is "swallowed". Then it doesn't appear in the logs and we cannot fix it, as we don't have any trace of it. This pivotal demonstrates such a situation can really happen - at least with InterruptedException.
To reproduce use following modification to simulate InterruptedException somewhere in the engine/language server code:
The `InterruptedException` is not logged. I've got just:
```
[info] [2023-02-01T17:23:04.681Z] [org.enso.languageserver.protocol.binary.BinaryConnectionController] Connection closed [127.0.0.1:41502].
[info] [2023-02-01T17:23:04.683Z] [org.enso.languageserver.runtime.RuntimeKiller] Shutting down the runtime server [Actor[akka://language-server/user/runtime-connector#-183675620]].
[info] [2023-02-01T17:23:04.695Z] [org.enso.languageserver.runtime.RuntimeKiller] Shutting down the Truffle context [org.graalvm.polyglot.Context@75c86d65]. Attempt #1.
[internal-logger-error] One of the printers failed to write a message: java.lang.NullPointerException
[internal-logger-error] The dropped message was: [error] [2023-02-01T17:23:04.702Z] [akka.actor.OneForOneStrategy] null
[error] [2023-02-01T17:23:16.695Z] [org.enso.languageserver.boot.LanguageServerComponent] An error occurred during stopping server
[info] [2023-02-01T17:23:16.696Z] [org.enso.languageserver.boot.LanguageServerComponent] Terminated truffle context
[info] [2023-02-01T17:23:16.702Z] [org.enso.languageserver.boot.LanguageServerComponent] Terminated json connections
[info] [2023-02-01T17:23:16.703Z] [org.enso.languageserver.boot.LanguageServerComponent] Terminated binary connections
[info] [2023-02-01T17:23:16.717Z] [akka.actor.CoordinatedShutdown] Running CoordinatedShutdown with reason [ActorSystemTerminateReason]
[info] [2023-02-01T17:23:16.738Z] [org.enso.languageserver.boot.LanguageServerComponent] Terminated actor system
[info] [2023-02-01T17:23:16.846Z] [org.enso.languageserver.boot.LanguageServerComponent] Terminated main module
```
(jaroslavtulach - Feb 1, 2023)
The text was updated successfully, but these errors were encountered:
Dmitry Bushev reports a new STANDUP for yesterday (2023-03-07):
Progress: Started working on the task. Started updating the log statements. Found a quirk in the language server initialization. The initial ping handler saves all the senders and replies then once the language server is initialized, while the project manager retries the initial ping attempts every 100 millis. While it is a suboptimal behavior, it doesn't break the initialization. It should be finished by 2023-03-09.
Next Day: Next day I will be working on the #5068 task. Continue working on the task
Dmitry Bushev reports a new STANDUP for today (2023-03-08):
Progress: Continue working on the task. Updated the language server log statements. Started working on the runtime. It should be finished by 2023-03-09.
Next Day: Next day I will be working on the #5068 task. Continue working on the task
Dmitry Bushev reports a new STANDUP for today (2023-03-09):
Progress: Continue working on the task. Updated runtime log statements, added debug logging for the Akka actor's lifecycle, and lowered the log level for interruption events. Created PR with the task. Created PR adding the formatting check of SBT build definition. It should be finished by 2023-03-09.
Next Day: Next day I will be working on the #5070 task. Continue working on the task
close#5070
Changelog:
- Include the original exception to log expressions
- Enable logging of Akka Actors' lifecycle events on debug logging level
- Decrease the severity of interruption log messages because interruptions are part of the workflow. The computation can be interrupted at any time, and still be recomputed after. Warnings are just misleading in this case.
This task is automatically imported from the old Task Issue Board and it was originally created by jaroslavtulach.
Original issue is here.
Investigating problems with
ConnectException
I realized that whenInterruptedException
is thrown from language server, it may remain unnoticed due to the way Scala deals with (checked) exceptions and classifies them toNonFatal
and other.The issue was discovered when searching for reasons why the connection between IDE/engine breaks. One of the hypothesis was: there is an exception in the engine, but we don't know about it as it is "swallowed". Then it doesn't appear in the logs and we cannot fix it, as we don't have any trace of it. This pivotal demonstrates such a situation can really happen - at least with
InterruptedException
.To reproduce use following modification to simulate
InterruptedException
somewhere in the engine/language server code:connect to the LS with IDE and then kill the IDE. The
InterruptedException
gets yielded, but it doesn't appear anywhere in the logs.Tasks:
InterruptedException
Blockers:
#184340534 blocked
Comments:
Isn't it logged in https://github.com/enso-org/enso/blob/develop/engine/runtime/src/main/scala/org/enso/interpreter/instrument/job/ProgramExecutionSupport.scala#L239 (Hubert Plociniczak - Feb 1, 2023)
The `InterruptedException` is not logged. I've got just: ``` [info] [2023-02-01T17:23:04.681Z] [org.enso.languageserver.protocol.binary.BinaryConnectionController] Connection closed [127.0.0.1:41502]. [info] [2023-02-01T17:23:04.683Z] [org.enso.languageserver.runtime.RuntimeKiller] Shutting down the runtime server [Actor[akka://language-server/user/runtime-connector#-183675620]]. [info] [2023-02-01T17:23:04.695Z] [org.enso.languageserver.runtime.RuntimeKiller] Shutting down the Truffle context [org.graalvm.polyglot.Context@75c86d65]. Attempt #1. [internal-logger-error] One of the printers failed to write a message: java.lang.NullPointerException [internal-logger-error] The dropped message was: [error] [2023-02-01T17:23:04.702Z] [akka.actor.OneForOneStrategy] null [error] [2023-02-01T17:23:16.695Z] [org.enso.languageserver.boot.LanguageServerComponent] An error occurred during stopping server [info] [2023-02-01T17:23:16.696Z] [org.enso.languageserver.boot.LanguageServerComponent] Terminated truffle context [info] [2023-02-01T17:23:16.702Z] [org.enso.languageserver.boot.LanguageServerComponent] Terminated json connections [info] [2023-02-01T17:23:16.703Z] [org.enso.languageserver.boot.LanguageServerComponent] Terminated binary connections [info] [2023-02-01T17:23:16.717Z] [akka.actor.CoordinatedShutdown] Running CoordinatedShutdown with reason [ActorSystemTerminateReason] [info] [2023-02-01T17:23:16.738Z] [org.enso.languageserver.boot.LanguageServerComponent] Terminated actor system [info] [2023-02-01T17:23:16.846Z] [org.enso.languageserver.boot.LanguageServerComponent] Terminated main module ``` (jaroslavtulach - Feb 1, 2023)
The text was updated successfully, but these errors were encountered: