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

[wasm][debugger] Tests: Spawn MonoProxy in a separate process to avoid excessive memory usage for tests #95488

Open
radical opened this issue Nov 30, 2023 · 1 comment
Labels
arch-wasm WebAssembly architecture area-Debugger-mono enhancement Product code improvement that does NOT require public API changes/additions
Milestone

Comments

@radical
Copy link
Member

radical commented Nov 30, 2023

Some debugger test runs randomly get aborted on CI. See #89409

Running GetPropertiesTests in codespaces reveals that the RES memory usage of the process keeps increasing, reaching ~10G in 5mins. This suggests a memory leak.

Looking at the test process with dotnet dotnet-counters monitor --refresh-interval 1 -p ...:

Screenshot 2023-11-30 at 17 42 52

One potential solution, and a good thing to do anyway would be to spawn MonoProxy in a separate process, for which we already have wrappers. Right now, we instantiate MonoProxy for each test in the same test process which is overkill and not representative of user scenarios.

relevant code

_debuggerProxy = new DebuggerProxy(loggerFactory, loggerId: Id, options: options);
TestHarnessProxy.RegisterNewProxy(Id, _debuggerProxy);
var browserUri = new Uri(con_str);
WebSocket? ideSocket = await context.WebSockets.AcceptWebSocketAsync().ConfigureAwait(false);
await _debuggerProxy.Run(browserUri, ideSocket, cts).ConfigureAwait(false);
}

cc @thaystg @ilonatommy

@radical radical added arch-wasm WebAssembly architecture area-Debugger-mono labels Nov 30, 2023
@radical radical added this to the 9.0.0 milestone Nov 30, 2023
@ghost
Copy link

ghost commented Nov 30, 2023

Tagging subscribers to this area: @thaystg
See info in area-owners.md if you want to be subscribed.

Issue Details

Some debugger test runs randomly get aborted on CI. See #89409

Running GetPropertiesTests in codespaces reveals that the RES memory usage of the process keeps increasing, reaching ~10G in 5mins. This suggests a memory leak.

Looking at the test process with dotnet dotnet-counters monitor --refresh-interval 1 -p ...:

Screenshot 2023-11-30 at 17 42 52

One potential solution, and a good thing to do anyway would be to spawn MonoProxy in a separate process, for which we already have wrappers. Right now, we instantiate MonoProxy for each test in the same test process which is overkill and not representative of user scenarios.

cc @thaystg @ilonatommy

Author: radical
Assignees: -
Labels:

arch-wasm, area-Debugger-mono

Milestone: 9.0.0

@thaystg thaystg added the enhancement Product code improvement that does NOT require public API changes/additions label Mar 4, 2024
@lewing lewing modified the milestones: 9.0.0, Future Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm WebAssembly architecture area-Debugger-mono enhancement Product code improvement that does NOT require public API changes/additions
Projects
None yet
Development

No branches or pull requests

3 participants