Open kenneth-marut-work opened 1 year ago
@tortmayr, this and #12194 seems in part to be a weakness in the RPC system. It seems that if the backend is 'busy' long enough, the websocket connections providing communication between front and backends will be closed, but when that happens, pending requests won't be rejected. In the case of editors open against files, when they try to save, a request is made to update the file resource, but eventually the channels that would inform the resource that its request had succeded are disposed of entirely, leaving the associated Promise hanging indefinitely. Although it's easy to trigger in the editor system, and it appears that the ConnectionStatusService
is also subject to the same issue, it's likely that those aren't the only place RPC calls can hang even though we know that they can no longer succeed.
@colin-grant-work Good catch, you are right pending requests of RPC calls are currently not properly rejected when underlying channels is closed/disposed. I'm going to have a look at it
@colin-grant-work https://github.com/eclipse-theia/theia/pull/12581 improves the RPC system. With this change pending requests are now properly rejected if the underlying channel is closed (i.e. the connection to the backend is lost)
@tortmayr The issue seems to persist (at least in 1.47), see https://github.com/eclipse-theia/theia/issues/13702.
Bug Description:
If a backend process hogs resources and blocks frontend<->backend communication the application will go "offline" and eventually recover. During this time, the frontend can be slow to recognize that connection is interrupted as per #12194 and a user may continue to make edits to a file, putting it into a dirty state. When the application finally recovers from "offline" mode, it is impossible to save any new changes to the existing editor. The editor must be closed and reopened.
Steps to Reproduce:
FileA.txt
)FileA.txt
and try to save them (they will fail because the backend is blocked, notice also that there is no indication that there is a failure)FileA.txt
Additional Information