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
Hello.
My team uses this package to send files. While testing my project, I discovered the following thing: on all tested systems (Windows 10 & Ubuntu 22.04.1) there is a memory leak.
To be more precise, the application sends the file in parts in several isolates, its own IOWebSocketChannel is created for each isolate, logically, after sending all the parts, the connection closes, after which the isolate closes. But I've found that not all sockets are closed, some of them changes to CLOSE_WAIT state and do not exit it until the application is closed.
In my further research , I found the following: I wrote a small server application (HttpServer upgraded to WebSocket, which simply responds to incoming requests) and a client application in which I create 2 isolates, each of which creates an IOWebSocketChannel, one of which just sends a message once and then just listens to its stream, and the second sends a message, starts listening its stream (whose onDone and onError methods are never called), after which it closes its isolate (which in VSC debug mode then has the status "Paused on Pause"), after which it closes the socket itself (isolate closes only after this).
After such a sequence in Ubuntu via lsof, the second connection is displayed as ESTABLISHED, but if you close the server, it will switch to the CLOSE_WAIT state, any manipulations on the socket will not be available in the client application itself, because it seems to be closed. The client application itself does not terminate after all of this, although the isolates are displayed off and it is not waiting/listening to anything in the main isolate.
These manipulations are performed to simulate the behavior of my application and the final error looks similar to what we get in the project itself.
The text was updated successfully, but these errors were encountered:
Hello.
My team uses this package to send files. While testing my project, I discovered the following thing: on all tested systems (Windows 10 & Ubuntu 22.04.1) there is a memory leak.
To be more precise, the application sends the file in parts in several isolates, its own
IOWebSocketChannel
is created for each isolate, logically, after sending all the parts, the connection closes, after which the isolate closes. But I've found that not all sockets are closed, some of them changes to CLOSE_WAIT state and do not exit it until the application is closed.In my further research , I found the following: I wrote a small server application (
HttpServer
upgraded toWebSocket
, which simply responds to incoming requests) and a client application in which I create 2 isolates, each of which creates anIOWebSocketChannel
, one of which just sends a message once and then just listens to its stream, and the second sends a message, starts listening its stream (whoseonDone
andonError
methods are never called), after which it closes its isolate (which in VSC debug mode then has the status "Paused on Pause"), after which it closes the socket itself (isolate closes only after this).After such a sequence in Ubuntu via lsof, the second connection is displayed as ESTABLISHED, but if you close the server, it will switch to the CLOSE_WAIT state, any manipulations on the socket will not be available in the client application itself, because it seems to be closed. The client application itself does not terminate after all of this, although the isolates are displayed off and it is not waiting/listening to anything in the main isolate.
These manipulations are performed to simulate the behavior of my application and the final error looks similar to what we get in the project itself.
The text was updated successfully, but these errors were encountered: